From c70e4f86e80a57629ac50d98e691436122d61ac2 Mon Sep 17 00:00:00 2001 From: Spencer Finnell Date: Tue, 5 Dec 2023 12:15:52 -0500 Subject: [PATCH 1/8] Sync from Pro --- .gitignore | 17 +- .../apple-pay-google-pay-payment-form.json | 9 +- data/templates/bacs-direct-debit-form.json | 42 ++ data/templates/grabpay-payment-form.json | 42 ++ .../admin/admin-dashboard-widget-report.scss | 6 + .../css/admin/form-template-explorer.scss | 4 + includes/core/assets/css/admin/help.scss | 4 + .../core/assets/css/admin/notifications.scss | 4 + .../css/admin/page-activity-reports.scss | 4 + .../assets/css/admin/page-setup-wizard.scss | 4 + ...mpay-admin-dashboard-widget-report.min.css | 2 +- ...impay-admin-form-template-explorer.min.css | 2 +- .../core/assets/css/simpay-admin-help.min.css | 2 +- .../css/simpay-admin-notifications.min.css | 2 +- ...simpay-admin-page-activity-reports.min.css | 2 +- .../simpay-admin-page-setup-wizard.min.css | 2 +- .../assets/images/about/plugin-charitable.png | Bin 0 -> 3323 bytes .../assets/images/about/plugin-duplicator.png | Bin 0 -> 5151 bytes .../assets/images/about/plugin-wpcode.png | Bin 0 -> 23059 bytes .../components/config/index.js | 4 +- ...-dashboard-widget-report-css.min.asset.php | 2 +- ...n-form-template-explorer-css.min.asset.php | 2 +- .../js/simpay-admin-help-css.min.asset.php | 2 +- ...mpay-admin-notifications-css.min.asset.php | 2 +- ...in-page-activity-reports-css.min.asset.php | 2 +- ...-admin-page-activity-reports.min.asset.php | 2 +- .../simpay-admin-page-activity-reports.min.js | 2 +- ...-admin-page-setup-wizard-css.min.asset.php | 2 +- includes/core/functions/shared.php | 12 +- includes/core/payments/class-stripe-api.php | 38 -- includes/core/recaptcha/index.php | 158 ------ lib/Stripe/CHANGELOG.md | 449 +++++++++++++----- lib/Stripe/CODE_OF_CONDUCT.md | 77 --- lib/Stripe/Makefile | 39 -- lib/Stripe/OPENAPI_VERSION | 2 +- lib/Stripe/README.md | 6 +- lib/Stripe/VERSION | 2 +- lib/Stripe/build.php | 25 - lib/Stripe/composer.json | 4 +- lib/Stripe/init.php | 170 +++---- lib/Stripe/lib/Account.php | 45 +- lib/Stripe/lib/AccountLink.php | 9 +- lib/Stripe/lib/AccountSession.php | 16 +- .../lib/ApiOperations/NestedResource.php | 2 +- lib/Stripe/lib/ApiOperations/Request.php | 8 +- .../lib/ApiOperations/SingletonRetrieve.php | 3 +- lib/Stripe/lib/ApiRequestor.php | 16 +- lib/Stripe/lib/ApiResource.php | 3 +- lib/Stripe/lib/ApplicationFee.php | 20 +- lib/Stripe/lib/ApplicationFeeRefund.php | 12 +- lib/Stripe/lib/Apps/Secret.php | 21 +- lib/Stripe/lib/Balance.php | 20 +- lib/Stripe/lib/BalanceTransaction.php | 39 +- lib/Stripe/lib/BankAccount.php | 17 +- lib/Stripe/lib/BaseStripeClient.php | 41 +- .../lib/BillingPortal/Configuration.php | 3 +- lib/Stripe/lib/BillingPortal/Session.php | 28 +- lib/Stripe/lib/Capability.php | 8 +- lib/Stripe/lib/Capital/FinancingOffer.php | 70 --- lib/Stripe/lib/Capital/FinancingSummary.php | 25 - .../lib/Capital/FinancingTransaction.php | 32 -- lib/Stripe/lib/Card.php | 9 +- lib/Stripe/lib/CashBalance.php | 4 +- lib/Stripe/lib/Charge.php | 32 +- lib/Stripe/lib/Checkout/Session.php | 51 +- lib/Stripe/lib/CountrySpec.php | 4 +- lib/Stripe/lib/Coupon.php | 20 +- lib/Stripe/lib/CreditNote.php | 21 +- lib/Stripe/lib/CreditNoteLineItem.php | 12 +- lib/Stripe/lib/Customer.php | 41 +- lib/Stripe/lib/CustomerBalanceTransaction.php | 15 +- .../lib/CustomerCashBalanceTransaction.php | 22 +- lib/Stripe/lib/Discount.php | 25 +- lib/Stripe/lib/Dispute.php | 23 +- lib/Stripe/lib/EphemeralKey.php | 2 +- lib/Stripe/lib/ErrorObject.php | 27 ++ lib/Stripe/lib/Event.php | 316 ++++++++++-- .../lib/Exception/ApiErrorException.php | 3 +- lib/Stripe/lib/ExchangeRate.php | 37 +- lib/Stripe/lib/File.php | 24 +- lib/Stripe/lib/FileLink.php | 10 +- .../lib/FinancialConnections/Account.php | 25 +- .../lib/FinancialConnections/AccountOwner.php | 2 + .../FinancialConnections/InferredBalance.php | 22 - .../lib/FinancialConnections/Session.php | 15 +- .../lib/FinancialConnections/Transaction.php | 33 -- lib/Stripe/lib/FundingInstructions.php | 13 +- lib/Stripe/lib/GiftCards/Card.php | 49 -- lib/Stripe/lib/GiftCards/Transaction.php | 77 --- lib/Stripe/lib/HttpClient/ClientInterface.php | 2 +- .../HttpClient/StreamingClientInterface.php | 2 +- .../lib/Identity/VerificationReport.php | 33 +- .../lib/Identity/VerificationSession.php | 25 +- lib/Stripe/lib/Invoice.php | 100 ++-- lib/Stripe/lib/InvoiceItem.php | 19 +- lib/Stripe/lib/InvoiceLineItem.php | 17 +- lib/Stripe/lib/Issuing/Authorization.php | 22 +- lib/Stripe/lib/Issuing/Card.php | 27 +- lib/Stripe/lib/Issuing/Cardholder.php | 17 +- lib/Stripe/lib/Issuing/Dispute.php | 14 +- lib/Stripe/lib/Issuing/Token.php | 42 ++ lib/Stripe/lib/Issuing/Transaction.php | 20 +- lib/Stripe/lib/LineItem.php | 5 +- lib/Stripe/lib/LoginLink.php | 2 + lib/Stripe/lib/Mandate.php | 17 +- lib/Stripe/lib/Order.php | 124 ----- lib/Stripe/lib/PaymentIntent.php | 50 +- lib/Stripe/lib/PaymentLink.php | 20 +- lib/Stripe/lib/PaymentMethod.php | 117 +++-- lib/Stripe/lib/PaymentMethodConfiguration.php | 77 +++ lib/Stripe/lib/PaymentMethodDomain.php | 49 ++ lib/Stripe/lib/Payout.php | 67 +-- lib/Stripe/lib/Person.php | 40 +- lib/Stripe/lib/Plan.php | 45 +- lib/Stripe/lib/Price.php | 32 +- lib/Stripe/lib/Product.php | 25 +- lib/Stripe/lib/PromotionCode.php | 5 +- lib/Stripe/lib/Quote.php | 165 +------ lib/Stripe/lib/QuotePhase.php | 62 --- lib/Stripe/lib/Radar/EarlyFraudWarning.php | 6 +- lib/Stripe/lib/Radar/ValueList.php | 20 +- lib/Stripe/lib/Radar/ValueListItem.php | 7 +- lib/Stripe/lib/Refund.php | 32 +- lib/Stripe/lib/Reporting/ReportRun.php | 14 +- lib/Stripe/lib/Reporting/ReportType.php | 16 +- lib/Stripe/lib/Review.php | 18 +- lib/Stripe/lib/Service/AbstractService.php | 14 +- lib/Stripe/lib/Service/AccountService.php | 31 +- .../Service/Capital/CapitalServiceFactory.php | 29 -- .../Service/Capital/FinancingOfferService.php | 58 --- .../Capital/FinancingSummaryService.php | 24 - .../Capital/FinancingTransactionService.php | 40 -- lib/Stripe/lib/Service/ChargeService.php | 22 +- lib/Stripe/lib/Service/CoreServiceFactory.php | 22 +- lib/Stripe/lib/Service/CustomerService.php | 30 +- lib/Stripe/lib/Service/FileService.php | 13 +- .../FinancialConnections/AccountService.php | 17 - .../FinancialConnectionsServiceFactory.php | 2 - .../TransactionService.php | 23 - .../GiftCards/GiftCardsServiceFactory.php | 27 -- .../Service/GiftCards/TransactionService.php | 102 ---- .../Identity/VerificationSessionService.php | 2 +- .../Service/Issuing/AuthorizationService.php | 20 +- .../Service/Issuing/IssuingServiceFactory.php | 2 + .../TokenService.php} | 30 +- lib/Stripe/lib/Service/OAuthService.php | 2 +- lib/Stripe/lib/Service/OrderService.php | 144 ------ .../lib/Service/PaymentIntentService.php | 67 +-- ... => PaymentMethodConfigurationService.php} | 44 +- .../Service/PaymentMethodDomainService.php | 97 ++++ lib/Stripe/lib/Service/PayoutService.php | 46 +- lib/Stripe/lib/Service/QuoteService.php | 129 +---- lib/Stripe/lib/Service/RefundService.php | 29 +- .../lib/Service/SetupAttemptService.php | 2 +- lib/Stripe/lib/Service/SetupIntentService.php | 11 +- lib/Stripe/lib/Service/SourceService.php | 2 +- .../Service/SubscriptionScheduleService.php | 16 - .../lib/Service/SubscriptionService.php | 53 ++- .../lib/Service/Tax/CalculationService.php | 2 +- .../lib/Service/Tax/TransactionService.php | 21 +- .../Service/TestHelpers/CustomerService.php | 2 +- .../Issuing/AuthorizationService.php | 87 ++++ .../Issuing/IssuingServiceFactory.php | 4 + .../Issuing/TransactionService.php | 54 +++ lib/Stripe/lib/Service/TokenService.php | 6 +- .../Treasury/FinancialAccountService.php | 4 +- lib/Stripe/lib/SetupAttempt.php | 10 +- lib/Stripe/lib/SetupIntent.php | 57 +-- lib/Stripe/lib/ShippingRate.php | 7 +- lib/Stripe/lib/Sigma/ScheduledQueryRun.php | 11 +- lib/Stripe/lib/Source.php | 90 ++-- lib/Stripe/lib/SourceTransaction.php | 46 +- lib/Stripe/lib/Stripe.php | 9 +- lib/Stripe/lib/StripeClient.php | 23 +- lib/Stripe/lib/StripeClientInterface.php | 2 +- lib/Stripe/lib/StripeObject.php | 2 + lib/Stripe/lib/Subscription.php | 34 +- lib/Stripe/lib/SubscriptionItem.php | 11 +- lib/Stripe/lib/SubscriptionSchedule.php | 34 +- lib/Stripe/lib/Tax/Calculation.php | 13 +- lib/Stripe/lib/Tax/CalculationLineItem.php | 26 + lib/Stripe/lib/Tax/Registration.php | 20 +- lib/Stripe/lib/Tax/Settings.php | 13 +- lib/Stripe/lib/Tax/Transaction.php | 29 +- lib/Stripe/lib/Tax/TransactionLineItem.php | 31 ++ lib/Stripe/lib/TaxCode.php | 3 +- lib/Stripe/lib/TaxId.php | 25 +- lib/Stripe/lib/TaxRate.php | 18 +- lib/Stripe/lib/Terminal/Configuration.php | 10 +- lib/Stripe/lib/Terminal/ConnectionToken.php | 5 +- lib/Stripe/lib/Terminal/Location.php | 5 +- lib/Stripe/lib/Terminal/Reader.php | 11 +- lib/Stripe/lib/TestHelpers/TestClock.php | 9 +- lib/Stripe/lib/Token.php | 45 +- lib/Stripe/lib/Topup.php | 3 +- lib/Stripe/lib/Transfer.php | 28 +- lib/Stripe/lib/TransferReversal.php | 23 +- lib/Stripe/lib/Treasury/CreditReversal.php | 5 +- lib/Stripe/lib/Treasury/DebitReversal.php | 5 +- lib/Stripe/lib/Treasury/FinancialAccount.php | 17 +- .../lib/Treasury/FinancialAccountFeatures.php | 19 +- lib/Stripe/lib/Treasury/InboundTransfer.php | 7 +- lib/Stripe/lib/Treasury/OutboundPayment.php | 9 +- lib/Stripe/lib/Treasury/OutboundTransfer.php | 12 +- lib/Stripe/lib/Treasury/ReceivedCredit.php | 6 +- lib/Stripe/lib/Treasury/ReceivedDebit.php | 7 +- lib/Stripe/lib/Treasury/Transaction.php | 4 +- lib/Stripe/lib/Treasury/TransactionEntry.php | 3 +- lib/Stripe/lib/UsageRecord.php | 4 +- lib/Stripe/lib/Util/ApiVersion.php | 2 +- lib/Stripe/lib/Util/CaseInsensitiveArray.php | 8 +- lib/Stripe/lib/Util/ObjectTypes.php | 241 +++++----- lib/Stripe/lib/Util/Util.php | 4 + lib/Stripe/lib/WebhookEndpoint.php | 15 +- lib/Stripe/phpdoc.dist.xml | 31 -- lib/Stripe/phpstan-baseline.neon | 0 lib/Stripe/phpstan.neon.dist | 13 - lib/Stripe/update_certs.php | 19 - src/AdminPage/AboutUsPage.php | 126 +++-- src/AntiSpam/EmailVerification.php | 80 ---- src/AntiSpam/RequireAuthentication.php | 1 - .../IntegrationServiceProvider.php | 1 + src/Integration/WPCode/WPCodeIntegration.php | 66 +++ .../WPCode/WPCodeLibrarySubscriber.php | 52 ++ .../Payment/Traits/PaymentIntentTrait.php | 2 +- .../Payment/Utils/PaymentRequestUtils.php | 4 +- src/StripeConnect/ApplicationFee.php | 31 -- src/Transaction/TransactionObserver.php | 154 ------ vendor/autoload.php | 20 +- vendor/composer/ClassLoader.php | 164 +++++-- vendor/composer/InstalledVersions.php | 44 +- vendor/composer/autoload_classmap.php | 2 +- vendor/composer/autoload_namespaces.php | 2 +- vendor/composer/autoload_psr4.php | 9 +- vendor/composer/autoload_real.php | 35 +- vendor/composer/autoload_static.php | 58 ++- vendor/composer/installed.json | 18 +- vendor/composer/installed.php | 26 +- views/admin-page-about-us-about-us.php | 9 +- 239 files changed, 3373 insertions(+), 3822 deletions(-) create mode 100644 data/templates/bacs-direct-debit-form.json create mode 100644 data/templates/grabpay-payment-form.json create mode 100644 includes/core/assets/images/about/plugin-charitable.png create mode 100644 includes/core/assets/images/about/plugin-duplicator.png create mode 100644 includes/core/assets/images/about/plugin-wpcode.png delete mode 100644 lib/Stripe/CODE_OF_CONDUCT.md delete mode 100644 lib/Stripe/Makefile delete mode 100644 lib/Stripe/build.php delete mode 100644 lib/Stripe/lib/Capital/FinancingOffer.php delete mode 100644 lib/Stripe/lib/Capital/FinancingSummary.php delete mode 100644 lib/Stripe/lib/Capital/FinancingTransaction.php delete mode 100644 lib/Stripe/lib/FinancialConnections/InferredBalance.php delete mode 100644 lib/Stripe/lib/FinancialConnections/Transaction.php delete mode 100644 lib/Stripe/lib/GiftCards/Card.php delete mode 100644 lib/Stripe/lib/GiftCards/Transaction.php create mode 100644 lib/Stripe/lib/Issuing/Token.php delete mode 100644 lib/Stripe/lib/Order.php create mode 100644 lib/Stripe/lib/PaymentMethodConfiguration.php create mode 100644 lib/Stripe/lib/PaymentMethodDomain.php delete mode 100644 lib/Stripe/lib/QuotePhase.php delete mode 100644 lib/Stripe/lib/Service/Capital/CapitalServiceFactory.php delete mode 100644 lib/Stripe/lib/Service/Capital/FinancingOfferService.php delete mode 100644 lib/Stripe/lib/Service/Capital/FinancingSummaryService.php delete mode 100644 lib/Stripe/lib/Service/Capital/FinancingTransactionService.php delete mode 100644 lib/Stripe/lib/Service/FinancialConnections/TransactionService.php delete mode 100644 lib/Stripe/lib/Service/GiftCards/GiftCardsServiceFactory.php delete mode 100644 lib/Stripe/lib/Service/GiftCards/TransactionService.php rename lib/Stripe/lib/Service/{QuotePhaseService.php => Issuing/TokenService.php} (50%) delete mode 100644 lib/Stripe/lib/Service/OrderService.php rename lib/Stripe/lib/Service/{GiftCards/CardService.php => PaymentMethodConfigurationService.php} (50%) create mode 100644 lib/Stripe/lib/Service/PaymentMethodDomainService.php create mode 100644 lib/Stripe/lib/Service/TestHelpers/Issuing/AuthorizationService.php create mode 100644 lib/Stripe/lib/Service/TestHelpers/Issuing/TransactionService.php create mode 100644 lib/Stripe/lib/Tax/CalculationLineItem.php create mode 100644 lib/Stripe/lib/Tax/TransactionLineItem.php delete mode 100644 lib/Stripe/phpdoc.dist.xml delete mode 100644 lib/Stripe/phpstan-baseline.neon delete mode 100644 lib/Stripe/phpstan.neon.dist delete mode 100644 lib/Stripe/update_certs.php create mode 100644 src/Integration/WPCode/WPCodeIntegration.php create mode 100644 src/Integration/WPCode/WPCodeLibrarySubscriber.php diff --git a/.gitignore b/.gitignore index d6f62b99..56de5c76 100644 --- a/.gitignore +++ b/.gitignore @@ -1,17 +1,20 @@ +.env + .DS_Store ehthumbs.db Thumbs.db - *.cache + composer.lock phpunit.xml + node_modules -/.sass-cache -/logs -/build -/vendor/*/ +artifacts +logs +build +vendor +test-results !/vendor/autoload.php !/vendor/composer/ -# PhpStorm -.idea +/.sass-cache diff --git a/data/templates/apple-pay-google-pay-payment-form.json b/data/templates/apple-pay-google-pay-payment-form.json index c5f30a19..7b8c6e28 100644 --- a/data/templates/apple-pay-google-pay-payment-form.json +++ b/data/templates/apple-pay-google-pay-payment-form.json @@ -13,7 +13,14 @@ "title": "Apple Pay / Google Pay Payment Form", "description": "", "type": "embedded", - "payment_methods": [ "card" ], + "payment_methods": [ + { + "id": "card", + "wallets": { + "enabled": "yes" + } + } + ], "fields": [ { "type": "payment_request_button" diff --git a/data/templates/bacs-direct-debit-form.json b/data/templates/bacs-direct-debit-form.json new file mode 100644 index 00000000..79f5be0d --- /dev/null +++ b/data/templates/bacs-direct-debit-form.json @@ -0,0 +1,42 @@ +{ + "id": "f36e03bc-468a-49fb-8328-d63f8c3148f5", + "created_at": "2023-12-04 00:00:00", + "updated_at": "2023-12-04 00:00:00", + "license": [ "professional", "ultimate", "elite" ], + "categories": [ "features-functionality" ], + "keywords": [ "bacs", "debit", "on-site" ], + "slug": "bacs-direct-debit-form", + "name": "Bacs Direct Debit Form", + "description": "Collect payments through Bacs Direct Debit.", + "url": "", + "data": { + "title": "Bacs Direct Debit Form", + "description": "", + "type": "embedded", + "payment_methods": [ "bacs_debit", "card" ], + "fields": [ + { + "type": "email", + "label": "Email Address" + }, + { + "type": "plan_select", + "label": "" + }, + { + "type": "card", + "label": "", + "icons": "yes" + }, + { + "type": "checkout_button" + } + ], + "prices": [ + { + "unit_amount": 10000, + "currency": "gbp" + } + ] + } +} diff --git a/data/templates/grabpay-payment-form.json b/data/templates/grabpay-payment-form.json new file mode 100644 index 00000000..82c48520 --- /dev/null +++ b/data/templates/grabpay-payment-form.json @@ -0,0 +1,42 @@ +{ + "id": "cd2e5265-8d60-480d-9f6a-290b2158dfbc", + "created_at": "2023-12-04 00:00:00", + "updated_at": "2023-12-04 00:00:00", + "license": [ "personal", "plus", "professional", "ultimate", "elite" ], + "categories": [ "features-functionality" ], + "keywords": [ "on-site", "grabpay", "myr", "sgp" ], + "slug": "grabpay-payment-form", + "name": "GrabPay Payment Form", + "description": "Allow customers to pay with GrabPay, a digital wallet in Malaysia and Singapore.", + "url": "", + "data": { + "title": "GrabPay Payment Form", + "description": "", + "type": "embedded", + "payment_methods": [ "grabpay", "card" ], + "fields": [ + { + "type": "email", + "label": "Email Address" + }, + { + "type": "plan_select", + "label": "" + }, + { + "type": "card", + "label": "", + "icons": "yes" + }, + { + "type": "checkout_button" + } + ], + "prices": [ + { + "unit_amount": 1000, + "currency": "myr" + } + ] + } +} diff --git a/includes/core/assets/css/admin/admin-dashboard-widget-report.scss b/includes/core/assets/css/admin/admin-dashboard-widget-report.scss index 1113ef40..6c7219bc 100644 --- a/includes/core/assets/css/admin/admin-dashboard-widget-report.scss +++ b/includes/core/assets/css/admin/admin-dashboard-widget-report.scss @@ -7,6 +7,12 @@ @import "./charts.scss"; +@include wordpress-admin-schemes(); + +body.admin-color-fresh { + @include admin-scheme(#2271b1); +} + .simpay-admin-dashboard-widget-report { * { diff --git a/includes/core/assets/css/admin/form-template-explorer.scss b/includes/core/assets/css/admin/form-template-explorer.scss index 66a3f240..cead7b66 100644 --- a/includes/core/assets/css/admin/form-template-explorer.scss +++ b/includes/core/assets/css/admin/form-template-explorer.scss @@ -7,6 +7,10 @@ @include wordpress-admin-schemes(); +body.admin-color-fresh { + @include admin-scheme(#2271b1); +} + $branding-bar-height: 79px; // Page reset. diff --git a/includes/core/assets/css/admin/help.scss b/includes/core/assets/css/admin/help.scss index e0f610cf..8f1a03e0 100644 --- a/includes/core/assets/css/admin/help.scss +++ b/includes/core/assets/css/admin/help.scss @@ -7,6 +7,10 @@ @include wordpress-admin-schemes(); +body.admin-color-fresh { + @include admin-scheme(#2271b1); +} + .simpay-help-body-locked { overflow: hidden; diff --git a/includes/core/assets/css/admin/notifications.scss b/includes/core/assets/css/admin/notifications.scss index 3891b493..4358d1ed 100644 --- a/includes/core/assets/css/admin/notifications.scss +++ b/includes/core/assets/css/admin/notifications.scss @@ -7,6 +7,10 @@ @include wordpress-admin-schemes(); +body.admin-color-fresh { + @include admin-scheme(#2271b1); +} + .simpay-notifications-body-locked { overflow: hidden; diff --git a/includes/core/assets/css/admin/page-activity-reports.scss b/includes/core/assets/css/admin/page-activity-reports.scss index cf8bc929..a021f7c7 100644 --- a/includes/core/assets/css/admin/page-activity-reports.scss +++ b/includes/core/assets/css/admin/page-activity-reports.scss @@ -7,6 +7,10 @@ @include wordpress-admin-schemes(); +body.admin-color-fresh { + @include admin-scheme(#2271b1); +} + /** * Components */ diff --git a/includes/core/assets/css/admin/page-setup-wizard.scss b/includes/core/assets/css/admin/page-setup-wizard.scss index 0c8151af..4791ba43 100644 --- a/includes/core/assets/css/admin/page-setup-wizard.scss +++ b/includes/core/assets/css/admin/page-setup-wizard.scss @@ -7,6 +7,10 @@ @include wordpress-admin-schemes(); +body.admin-color-fresh { + @include admin-scheme(#2271b1); +} + .simpay-setup-wizard { hr { diff --git a/includes/core/assets/css/simpay-admin-dashboard-widget-report.min.css b/includes/core/assets/css/simpay-admin-dashboard-widget-report.min.css index 9e984ae7..9ed0749e 100644 --- a/includes/core/assets/css/simpay-admin-dashboard-widget-report.min.css +++ b/includes/core/assets/css/simpay-admin-dashboard-widget-report.min.css @@ -1 +1 @@ -.simpay-admin-charts-period-over-period{position:relative;padding-bottom:12px}.simpay-admin-charts-period-over-period *{box-sizing:border-box}.simpay-admin-charts-period-over-period__tooltip{position:absolute;background:#fff;border:1px solid #c3c3c3;box-shadow:0 2px 6px rgba(0,0,0,.05);border-radius:2px;padding:10px 14px;display:flex;flex-direction:column;z-Index:10000;min-width:175px}.simpay-admin-charts-period-over-period__tooltip-data{white-space:nowrap;margin-bottom:8px;display:grid;grid-template-columns:1fr auto;grid-auto-rows:auto;-moz-column-gap:16px;column-gap:16px}.simpay-admin-charts-period-over-period__tooltip-data:last-child{margin-bottom:0}.simpay-admin-charts-period-over-period__tooltip-data[data-dataset="1"]{opacity:.65}.simpay-admin-charts-period-over-period__tooltip-data em{font-style:normal;text-align:right}.simpay-admin-charts-period-over-period__tooltip-delta{font-size:12px;margin:0 -14px -10px;padding:8px 14px;border-top:1px solid #eee;background:#fdfdfd;border-radius:2px;display:flex;align-items:center;justify-content:center}.simpay-admin-charts-period-over-period__tooltip-delta .simpay-admin-charts-badge{margin-right:4px}.simpay-admin-charts-period-over-period__tooltip-delta strong.is-positive{color:#006908}.simpay-admin-charts-period-over-period__tooltip-delta strong.is-negative{color:#b3093c}.simpay-admin-charts-badge{color:#2f2f2f;font-size:12px;font-weight:500;font-style:normal;line-height:1;padding:3px 6px;display:inline-flex;align-items:center;background:#f0f0f0;border-radius:100px}.simpay-admin-charts-badge.is-positive{color:#006908;background-color:#d7f7c2}.simpay-admin-charts-badge.is-negative{color:#b3093c;background-color:#ffe7f2}.simpay-admin-charts-badge__icon{width:15px;height:15px}.simpay-admin-charts-no-data{position:absolute;top:0;left:0;display:flex;justify-content:center;align-items:center;background:rgba(255,255,255,.5);z-index:2}.simpay-admin-charts-no-data>div{text-align:center;padding:24px;background:#fff;border:1px solid #c3c3c3;box-shadow:0 2px 6px rgba(0,0,0,.1);border-radius:2px;max-width:60%}.simpay-admin-charts-no-data strong{font-size:15px;margin-bottom:8px;display:block}.simpay-admin-dashboard-widget-report *{box-sizing:border-box}.simpay-admin-dashboard-widget-report__data{margin:20px -12px -12px;padding:12px;border-top:1px solid #e0e0e0;position:relative;z-index:2}.simpay-admin-dashboard-widget-report__data-filter{display:flex;justify-content:space-between;align-items:center}.simpay-admin-dashboard-widget-report__data-filter .components-base-control__field{margin-bottom:0}.simpay-admin-dashboard-widget-report__data-filter-title{display:flex;align-items:center;flex-shrink:0}.simpay-admin-dashboard-widget-report__data-filter-title>*{margin-right:8px}.simpay-admin-dashboard-widget-report__data-filter-controls{display:flex;align-items:center;flex-shrink:0}.simpay-admin-dashboard-widget-report__data-filter-controls>*{margin-left:8px}.simpay-admin-dashboard-widget-report__data-list{margin:10px -12px -12px}.simpay-admin-dashboard-widget-report__data-list>div{background-color:#fafafa;border-top:1px solid #e0e0e0;padding:10px 12px}.simpay-admin-dashboard-widget-report-recommended-plugin{color:#777;margin:12px -12px -12px;padding:10px 12px;position:relative;border-top:1px solid #e0e0e0}.simpay-admin-dashboard-widget-report-recommended-plugin strong{color:initial}.simpay-admin-dashboard-widget-report-recommended-plugin p{margin:0}.simpay-admin-dashboard-widget-report-recommended-plugin .simpay-notice-dismiss{position:absolute;top:1px;right:8px;font-size:20px;color:#777;text-decoration:none;margin-left:5px;padding:6px 10px;z-index:2}.simpay-admin-dashboard-widget-report-recommended-plugin .simpay-notice-dismiss:hover,.simpay-admin-dashboard-widget-report-recommended-plugin .simpay-notice-dismiss:active,.simpay-admin-dashboard-widget-report-recommended-plugin .simpay-notice-dismiss:focus{color:#666;text-decoration:none} +.simpay-admin-charts-period-over-period{position:relative;padding-bottom:12px}.simpay-admin-charts-period-over-period *{box-sizing:border-box}.simpay-admin-charts-period-over-period__tooltip{position:absolute;background:#fff;border:1px solid #c3c3c3;box-shadow:0 2px 6px rgba(0,0,0,.05);border-radius:2px;padding:10px 14px;display:flex;flex-direction:column;z-Index:10000;min-width:175px}.simpay-admin-charts-period-over-period__tooltip-data{white-space:nowrap;margin-bottom:8px;display:grid;grid-template-columns:1fr auto;grid-auto-rows:auto;-moz-column-gap:16px;column-gap:16px}.simpay-admin-charts-period-over-period__tooltip-data:last-child{margin-bottom:0}.simpay-admin-charts-period-over-period__tooltip-data[data-dataset="1"]{opacity:.65}.simpay-admin-charts-period-over-period__tooltip-data em{font-style:normal;text-align:right}.simpay-admin-charts-period-over-period__tooltip-delta{font-size:12px;margin:0 -14px -10px;padding:8px 14px;border-top:1px solid #eee;background:#fdfdfd;border-radius:2px;display:flex;align-items:center;justify-content:center}.simpay-admin-charts-period-over-period__tooltip-delta .simpay-admin-charts-badge{margin-right:4px}.simpay-admin-charts-period-over-period__tooltip-delta strong.is-positive{color:#006908}.simpay-admin-charts-period-over-period__tooltip-delta strong.is-negative{color:#b3093c}.simpay-admin-charts-badge{color:#2f2f2f;font-size:12px;font-weight:500;font-style:normal;line-height:1;padding:3px 6px;display:inline-flex;align-items:center;background:#f0f0f0;border-radius:100px}.simpay-admin-charts-badge.is-positive{color:#006908;background-color:#d7f7c2}.simpay-admin-charts-badge.is-negative{color:#b3093c;background-color:#ffe7f2}.simpay-admin-charts-badge__icon{width:15px;height:15px}.simpay-admin-charts-no-data{position:absolute;top:0;left:0;display:flex;justify-content:center;align-items:center;background:rgba(255,255,255,.5);z-index:2}.simpay-admin-charts-no-data>div{text-align:center;padding:24px;background:#fff;border:1px solid #c3c3c3;box-shadow:0 2px 6px rgba(0,0,0,.1);border-radius:2px;max-width:60%}.simpay-admin-charts-no-data strong{font-size:15px;margin-bottom:8px;display:block}body.admin-color-light{--wp-admin-theme-color: #0085ba;--wp-admin-theme-color--rgb: 0, 133, 186;--wp-admin-theme-color-darker-10: #0073a1;--wp-admin-theme-color-darker-10--rgb: 0, 115, 161;--wp-admin-theme-color-darker-20: #006187;--wp-admin-theme-color-darker-20--rgb: 0, 97, 135;--wp-admin-border-width-focus: 2px}@media(-webkit-min-device-pixel-ratio: 2),(min-resolution: 192dpi){body.admin-color-light{--wp-admin-border-width-focus: 1.5px}}body.admin-color-modern{--wp-admin-theme-color: #3858e9;--wp-admin-theme-color--rgb: 56, 88, 233;--wp-admin-theme-color-darker-10: #2145e6;--wp-admin-theme-color-darker-10--rgb: 33, 69, 230;--wp-admin-theme-color-darker-20: #183ad6;--wp-admin-theme-color-darker-20--rgb: 24, 58, 214;--wp-admin-border-width-focus: 2px}@media(-webkit-min-device-pixel-ratio: 2),(min-resolution: 192dpi){body.admin-color-modern{--wp-admin-border-width-focus: 1.5px}}body.admin-color-blue{--wp-admin-theme-color: #096484;--wp-admin-theme-color--rgb: 9, 100, 132;--wp-admin-theme-color-darker-10: #07526c;--wp-admin-theme-color-darker-10--rgb: 7, 82, 108;--wp-admin-theme-color-darker-20: #064054;--wp-admin-theme-color-darker-20--rgb: 6, 64, 84;--wp-admin-border-width-focus: 2px}@media(-webkit-min-device-pixel-ratio: 2),(min-resolution: 192dpi){body.admin-color-blue{--wp-admin-border-width-focus: 1.5px}}body.admin-color-coffee{--wp-admin-theme-color: #46403c;--wp-admin-theme-color--rgb: 70, 64, 60;--wp-admin-theme-color-darker-10: #383330;--wp-admin-theme-color-darker-10--rgb: 56, 51, 48;--wp-admin-theme-color-darker-20: #2b2724;--wp-admin-theme-color-darker-20--rgb: 43, 39, 36;--wp-admin-border-width-focus: 2px}@media(-webkit-min-device-pixel-ratio: 2),(min-resolution: 192dpi){body.admin-color-coffee{--wp-admin-border-width-focus: 1.5px}}body.admin-color-ectoplasm{--wp-admin-theme-color: #523f6d;--wp-admin-theme-color--rgb: 82, 63, 109;--wp-admin-theme-color-darker-10: #46365d;--wp-admin-theme-color-darker-10--rgb: 70, 54, 93;--wp-admin-theme-color-darker-20: #3a2c4d;--wp-admin-theme-color-darker-20--rgb: 58, 44, 77;--wp-admin-border-width-focus: 2px}@media(-webkit-min-device-pixel-ratio: 2),(min-resolution: 192dpi){body.admin-color-ectoplasm{--wp-admin-border-width-focus: 1.5px}}body.admin-color-midnight{--wp-admin-theme-color: #e14d43;--wp-admin-theme-color--rgb: 225, 77, 67;--wp-admin-theme-color-darker-10: #dd382d;--wp-admin-theme-color-darker-10--rgb: 221, 56, 45;--wp-admin-theme-color-darker-20: #d02c21;--wp-admin-theme-color-darker-20--rgb: 208, 44, 33;--wp-admin-border-width-focus: 2px}@media(-webkit-min-device-pixel-ratio: 2),(min-resolution: 192dpi){body.admin-color-midnight{--wp-admin-border-width-focus: 1.5px}}body.admin-color-ocean{--wp-admin-theme-color: #627c83;--wp-admin-theme-color--rgb: 98, 124, 131;--wp-admin-theme-color-darker-10: #576e74;--wp-admin-theme-color-darker-10--rgb: 87, 110, 116;--wp-admin-theme-color-darker-20: #4c6066;--wp-admin-theme-color-darker-20--rgb: 76, 96, 102;--wp-admin-border-width-focus: 2px}@media(-webkit-min-device-pixel-ratio: 2),(min-resolution: 192dpi){body.admin-color-ocean{--wp-admin-border-width-focus: 1.5px}}body.admin-color-sunrise{--wp-admin-theme-color: #dd823b;--wp-admin-theme-color--rgb: 221, 130, 59;--wp-admin-theme-color-darker-10: #d97426;--wp-admin-theme-color-darker-10--rgb: 217, 116, 38;--wp-admin-theme-color-darker-20: #c36922;--wp-admin-theme-color-darker-20--rgb: 195, 105, 34;--wp-admin-border-width-focus: 2px}@media(-webkit-min-device-pixel-ratio: 2),(min-resolution: 192dpi){body.admin-color-sunrise{--wp-admin-border-width-focus: 1.5px}}body.admin-color-fresh{--wp-admin-theme-color: #2271b1;--wp-admin-theme-color--rgb: 34, 113, 177;--wp-admin-theme-color-darker-10: #1e639c;--wp-admin-theme-color-darker-10--rgb: 30, 99, 156;--wp-admin-theme-color-darker-20: #1a5686;--wp-admin-theme-color-darker-20--rgb: 26, 86, 134;--wp-admin-border-width-focus: 2px}@media(-webkit-min-device-pixel-ratio: 2),(min-resolution: 192dpi){body.admin-color-fresh{--wp-admin-border-width-focus: 1.5px}}.simpay-admin-dashboard-widget-report *{box-sizing:border-box}.simpay-admin-dashboard-widget-report__data{margin:20px -12px -12px;padding:12px;border-top:1px solid #e0e0e0;position:relative;z-index:2}.simpay-admin-dashboard-widget-report__data-filter{display:flex;justify-content:space-between;align-items:center}.simpay-admin-dashboard-widget-report__data-filter .components-base-control__field{margin-bottom:0}.simpay-admin-dashboard-widget-report__data-filter-title{display:flex;align-items:center;flex-shrink:0}.simpay-admin-dashboard-widget-report__data-filter-title>*{margin-right:8px}.simpay-admin-dashboard-widget-report__data-filter-controls{display:flex;align-items:center;flex-shrink:0}.simpay-admin-dashboard-widget-report__data-filter-controls>*{margin-left:8px}.simpay-admin-dashboard-widget-report__data-list{margin:10px -12px -12px}.simpay-admin-dashboard-widget-report__data-list>div{background-color:#fafafa;border-top:1px solid #e0e0e0;padding:10px 12px}.simpay-admin-dashboard-widget-report-recommended-plugin{color:#777;margin:12px -12px -12px;padding:10px 12px;position:relative;border-top:1px solid #e0e0e0}.simpay-admin-dashboard-widget-report-recommended-plugin strong{color:initial}.simpay-admin-dashboard-widget-report-recommended-plugin p{margin:0}.simpay-admin-dashboard-widget-report-recommended-plugin .simpay-notice-dismiss{position:absolute;top:1px;right:8px;font-size:20px;color:#777;text-decoration:none;margin-left:5px;padding:6px 10px;z-index:2}.simpay-admin-dashboard-widget-report-recommended-plugin .simpay-notice-dismiss:hover,.simpay-admin-dashboard-widget-report-recommended-plugin .simpay-notice-dismiss:active,.simpay-admin-dashboard-widget-report-recommended-plugin .simpay-notice-dismiss:focus{color:#666;text-decoration:none} diff --git a/includes/core/assets/css/simpay-admin-form-template-explorer.min.css b/includes/core/assets/css/simpay-admin-form-template-explorer.min.css index fd616cfc..fc6b41b5 100644 --- a/includes/core/assets/css/simpay-admin-form-template-explorer.min.css +++ b/includes/core/assets/css/simpay-admin-form-template-explorer.min.css @@ -1 +1 @@ -body.admin-color-light{--wp-admin-theme-color: #0085ba;--wp-admin-theme-color--rgb: 0, 133, 186;--wp-admin-theme-color-darker-10: #0073a1;--wp-admin-theme-color-darker-10--rgb: 0, 115, 161;--wp-admin-theme-color-darker-20: #006187;--wp-admin-theme-color-darker-20--rgb: 0, 97, 135;--wp-admin-border-width-focus: 2px}@media(-webkit-min-device-pixel-ratio: 2),(min-resolution: 192dpi){body.admin-color-light{--wp-admin-border-width-focus: 1.5px}}body.admin-color-modern{--wp-admin-theme-color: #3858e9;--wp-admin-theme-color--rgb: 56, 88, 233;--wp-admin-theme-color-darker-10: #2145e6;--wp-admin-theme-color-darker-10--rgb: 33, 69, 230;--wp-admin-theme-color-darker-20: #183ad6;--wp-admin-theme-color-darker-20--rgb: 24, 58, 214;--wp-admin-border-width-focus: 2px}@media(-webkit-min-device-pixel-ratio: 2),(min-resolution: 192dpi){body.admin-color-modern{--wp-admin-border-width-focus: 1.5px}}body.admin-color-blue{--wp-admin-theme-color: #096484;--wp-admin-theme-color--rgb: 9, 100, 132;--wp-admin-theme-color-darker-10: #07526c;--wp-admin-theme-color-darker-10--rgb: 7, 82, 108;--wp-admin-theme-color-darker-20: #064054;--wp-admin-theme-color-darker-20--rgb: 6, 64, 84;--wp-admin-border-width-focus: 2px}@media(-webkit-min-device-pixel-ratio: 2),(min-resolution: 192dpi){body.admin-color-blue{--wp-admin-border-width-focus: 1.5px}}body.admin-color-coffee{--wp-admin-theme-color: #46403c;--wp-admin-theme-color--rgb: 70, 64, 60;--wp-admin-theme-color-darker-10: #383330;--wp-admin-theme-color-darker-10--rgb: 56, 51, 48;--wp-admin-theme-color-darker-20: #2b2724;--wp-admin-theme-color-darker-20--rgb: 43, 39, 36;--wp-admin-border-width-focus: 2px}@media(-webkit-min-device-pixel-ratio: 2),(min-resolution: 192dpi){body.admin-color-coffee{--wp-admin-border-width-focus: 1.5px}}body.admin-color-ectoplasm{--wp-admin-theme-color: #523f6d;--wp-admin-theme-color--rgb: 82, 63, 109;--wp-admin-theme-color-darker-10: #46365d;--wp-admin-theme-color-darker-10--rgb: 70, 54, 93;--wp-admin-theme-color-darker-20: #3a2c4d;--wp-admin-theme-color-darker-20--rgb: 58, 44, 77;--wp-admin-border-width-focus: 2px}@media(-webkit-min-device-pixel-ratio: 2),(min-resolution: 192dpi){body.admin-color-ectoplasm{--wp-admin-border-width-focus: 1.5px}}body.admin-color-midnight{--wp-admin-theme-color: #e14d43;--wp-admin-theme-color--rgb: 225, 77, 67;--wp-admin-theme-color-darker-10: #dd382d;--wp-admin-theme-color-darker-10--rgb: 221, 56, 45;--wp-admin-theme-color-darker-20: #d02c21;--wp-admin-theme-color-darker-20--rgb: 208, 44, 33;--wp-admin-border-width-focus: 2px}@media(-webkit-min-device-pixel-ratio: 2),(min-resolution: 192dpi){body.admin-color-midnight{--wp-admin-border-width-focus: 1.5px}}body.admin-color-ocean{--wp-admin-theme-color: #627c83;--wp-admin-theme-color--rgb: 98, 124, 131;--wp-admin-theme-color-darker-10: #576e74;--wp-admin-theme-color-darker-10--rgb: 87, 110, 116;--wp-admin-theme-color-darker-20: #4c6066;--wp-admin-theme-color-darker-20--rgb: 76, 96, 102;--wp-admin-border-width-focus: 2px}@media(-webkit-min-device-pixel-ratio: 2),(min-resolution: 192dpi){body.admin-color-ocean{--wp-admin-border-width-focus: 1.5px}}body.admin-color-sunrise{--wp-admin-theme-color: #dd823b;--wp-admin-theme-color--rgb: 221, 130, 59;--wp-admin-theme-color-darker-10: #d97426;--wp-admin-theme-color-darker-10--rgb: 217, 116, 38;--wp-admin-theme-color-darker-20: #c36922;--wp-admin-theme-color-darker-20--rgb: 195, 105, 34;--wp-admin-border-width-focus: 2px}@media(-webkit-min-device-pixel-ratio: 2),(min-resolution: 192dpi){body.admin-color-sunrise{--wp-admin-border-width-focus: 1.5px}}@media(min-width: 1440px){body.simpay-template-explorer-open{overflow:hidden}}body.simpay-template-explorer-open .simpay-admin-notice-top-of-page.simpay-notice,body.simpay-template-explorer-open .notice,body.simpay-template-explorer-open #screen-meta,body.simpay-template-explorer-open #screen-meta-links,body.simpay-template-explorer-open #poststuff,body.simpay-template-explorer-open #wpfooter{display:none !important}body.simpay-template-explorer-open.branch-5-6 .components-search-control,body.simpay-template-explorer-open.branch-5-7 .components-search-control,body.simpay-template-explorer-open.branch-5-8 .components-search-control{position:relative}body.simpay-template-explorer-open.branch-5-6 .components-search-control input[type=search].components-search-control__input,body.simpay-template-explorer-open.branch-5-7 .components-search-control input[type=search].components-search-control__input,body.simpay-template-explorer-open.branch-5-8 .components-search-control input[type=search].components-search-control__input{font-family:-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,Oxygen-Sans,Ubuntu,Cantarell,"Helvetica Neue",sans-serif;padding:6px 8px;box-shadow:0 0 0 rgba(0,0,0,0);transition:box-shadow .1s linear;border-radius:2px;border:1px solid #757575;font-size:16px;line-height:normal;display:block;padding:16px 48px 16px 16px;background:#f0f0f0;border:none;width:100%;height:48px;font-size:16px}@media(prefers-reduced-motion: reduce){body.simpay-template-explorer-open.branch-5-6 .components-search-control input[type=search].components-search-control__input,body.simpay-template-explorer-open.branch-5-7 .components-search-control input[type=search].components-search-control__input,body.simpay-template-explorer-open.branch-5-8 .components-search-control input[type=search].components-search-control__input{transition-duration:0s;transition-delay:0s}}@media(min-width: 600px){body.simpay-template-explorer-open.branch-5-6 .components-search-control input[type=search].components-search-control__input,body.simpay-template-explorer-open.branch-5-7 .components-search-control input[type=search].components-search-control__input,body.simpay-template-explorer-open.branch-5-8 .components-search-control input[type=search].components-search-control__input{font-size:13px;line-height:normal}}body.simpay-template-explorer-open.branch-5-6 .components-search-control input[type=search].components-search-control__input:focus,body.simpay-template-explorer-open.branch-5-7 .components-search-control input[type=search].components-search-control__input:focus,body.simpay-template-explorer-open.branch-5-8 .components-search-control input[type=search].components-search-control__input:focus{border-color:var(--wp-admin-theme-color);box-shadow:0 0 0 1px var(--wp-admin-theme-color);outline:2px solid rgba(0,0,0,0)}body.simpay-template-explorer-open.branch-5-6 .components-search-control input[type=search].components-search-control__input::-webkit-input-placeholder,body.simpay-template-explorer-open.branch-5-7 .components-search-control input[type=search].components-search-control__input::-webkit-input-placeholder,body.simpay-template-explorer-open.branch-5-8 .components-search-control input[type=search].components-search-control__input::-webkit-input-placeholder{color:rgba(30,30,30,.62)}body.simpay-template-explorer-open.branch-5-6 .components-search-control input[type=search].components-search-control__input::-moz-placeholder,body.simpay-template-explorer-open.branch-5-7 .components-search-control input[type=search].components-search-control__input::-moz-placeholder,body.simpay-template-explorer-open.branch-5-8 .components-search-control input[type=search].components-search-control__input::-moz-placeholder{opacity:1;color:rgba(30,30,30,.62)}body.simpay-template-explorer-open.branch-5-6 .components-search-control input[type=search].components-search-control__input:-ms-input-placeholder,body.simpay-template-explorer-open.branch-5-7 .components-search-control input[type=search].components-search-control__input:-ms-input-placeholder,body.simpay-template-explorer-open.branch-5-8 .components-search-control input[type=search].components-search-control__input:-ms-input-placeholder{color:rgba(30,30,30,.62)}@media(min-width: 600px){body.simpay-template-explorer-open.branch-5-6 .components-search-control input[type=search].components-search-control__input,body.simpay-template-explorer-open.branch-5-7 .components-search-control input[type=search].components-search-control__input,body.simpay-template-explorer-open.branch-5-8 .components-search-control input[type=search].components-search-control__input{font-size:13px}}body.simpay-template-explorer-open.branch-5-6 .components-search-control input[type=search].components-search-control__input:focus,body.simpay-template-explorer-open.branch-5-7 .components-search-control input[type=search].components-search-control__input:focus,body.simpay-template-explorer-open.branch-5-8 .components-search-control input[type=search].components-search-control__input:focus{background:#fff;box-shadow:0 0 0 2px var(--wp-admin-theme-color)}body.simpay-template-explorer-open.branch-5-6 .components-search-control input[type=search].components-search-control__input::-moz-placeholder, body.simpay-template-explorer-open.branch-5-7 .components-search-control input[type=search].components-search-control__input::-moz-placeholder, body.simpay-template-explorer-open.branch-5-8 .components-search-control input[type=search].components-search-control__input::-moz-placeholder{color:#757575}body.simpay-template-explorer-open.branch-5-6 .components-search-control input[type=search].components-search-control__input::placeholder,body.simpay-template-explorer-open.branch-5-7 .components-search-control input[type=search].components-search-control__input::placeholder,body.simpay-template-explorer-open.branch-5-8 .components-search-control input[type=search].components-search-control__input::placeholder{color:#757575}body.simpay-template-explorer-open.branch-5-6 .components-search-control input[type=search].components-search-control__input::-webkit-search-decoration,body.simpay-template-explorer-open.branch-5-6 .components-search-control input[type=search].components-search-control__input::-webkit-search-cancel-button,body.simpay-template-explorer-open.branch-5-6 .components-search-control input[type=search].components-search-control__input::-webkit-search-results-button,body.simpay-template-explorer-open.branch-5-6 .components-search-control input[type=search].components-search-control__input::-webkit-search-results-decoration,body.simpay-template-explorer-open.branch-5-7 .components-search-control input[type=search].components-search-control__input::-webkit-search-decoration,body.simpay-template-explorer-open.branch-5-7 .components-search-control input[type=search].components-search-control__input::-webkit-search-cancel-button,body.simpay-template-explorer-open.branch-5-7 .components-search-control input[type=search].components-search-control__input::-webkit-search-results-button,body.simpay-template-explorer-open.branch-5-7 .components-search-control input[type=search].components-search-control__input::-webkit-search-results-decoration,body.simpay-template-explorer-open.branch-5-8 .components-search-control input[type=search].components-search-control__input::-webkit-search-decoration,body.simpay-template-explorer-open.branch-5-8 .components-search-control input[type=search].components-search-control__input::-webkit-search-cancel-button,body.simpay-template-explorer-open.branch-5-8 .components-search-control input[type=search].components-search-control__input::-webkit-search-results-button,body.simpay-template-explorer-open.branch-5-8 .components-search-control input[type=search].components-search-control__input::-webkit-search-results-decoration{-webkit-appearance:none}body.simpay-template-explorer-open.branch-5-6 .components-search-control__icon,body.simpay-template-explorer-open.branch-5-7 .components-search-control__icon,body.simpay-template-explorer-open.branch-5-8 .components-search-control__icon{position:absolute;top:0;right:12px;bottom:0;display:flex;align-items:center}body.simpay-template-explorer-open.branch-5-6 .components-search-control__icon>svg,body.simpay-template-explorer-open.branch-5-7 .components-search-control__icon>svg,body.simpay-template-explorer-open.branch-5-8 .components-search-control__icon>svg{margin:8px 0}body.simpay-template-explorer-open.branch-5-6 .components-search-control__input-wrapper,body.simpay-template-explorer-open.branch-5-7 .components-search-control__input-wrapper,body.simpay-template-explorer-open.branch-5-8 .components-search-control__input-wrapper{position:relative}#simpay-form-template-explorer{background:#fff;border:1px solid #c3c4c7;box-shadow:0 1px 1px rgba(0,0,0,.04);margin-top:10px}#simpay-form-template-explorer,#simpay-form-template-explorer *{box-sizing:border-box}@media(min-width: 1440px){#simpay-form-template-explorer{position:fixed;top:111px;right:0;bottom:0;left:160px;margin:20px 22px;overflow-x:hidden;overflow-y:scroll}.folded #simpay-form-template-explorer{left:36px}}#simpay-form-template-explorer #wpcontent{padding-left:0}#simpay-form-template-explorer #wpbody-content{padding-bottom:0}.simpay-form-template-explorer{padding:24px}@media(min-width: 1440px){.simpay-form-template-explorer{height:100%;overflow:auto;padding-top:0}}@media(min-width: 1440px){.simpay-form-template-explorer-header{margin-right:24px;padding:30px 30px 25px;width:100%;background:#fff;border-bottom:1px solid #c3c4c7;box-shadow:0 1px 1px rgba(0,0,0,.04);position:absolute;left:0;right:0;z-index:3}}.simpay-form-template-explorer-header__title{font-size:26px;margin:0}.simpay-form-template-explorer-header__subtitle{color:#555;font-size:15px;margin:16px 0 0}.simpay-form-template-explorer-main{margin-top:24px}.simpay-form-template-explorer-main__sidebar{margin-bottom:24px;padding:2px}.simpay-form-template-explorer-main__sidebar-search{margin-bottom:12px}@media(min-width: 1440px){.simpay-form-template-explorer-main__sidebar-search{margin-bottom:24px}}@media(min-width: 1440px){.simpay-form-template-explorer-main__sidebar-categories{display:flex;flex-direction:column}}.simpay-form-template-explorer-main__sidebar-categories .components-button.is-pressed{background-color:var(--wp-admin-theme-color)}.simpay-form-template-explorer-main__sidebar-categories_category.category-new{font-weight:bold}.simpay-form-template-explorer-main__content{display:grid;grid-gap:24px;grid-template-columns:repeat(1, 1fr);padding:2px}@media(min-width: 782px){.simpay-form-template-explorer-main__content:not(.is-empty){grid-template-columns:repeat(2, minmax(0, 1fr))}}@media(min-width: 960px){.simpay-form-template-explorer-main__content:not(.is-empty){grid-template-columns:repeat(3, minmax(0, 1fr))}}.simpay-form-template-explorer-main__content-list-item{text-align:left;padding:16px;border-radius:4px;border:1px solid #ddd;position:relative;transition:all .15s ease-out;width:100%;height:auto;min-height:100px;flex-direction:column;align-items:flex-start}.simpay-form-template-explorer-main__content-list-item:focus-within,.simpay-form-template-explorer-main__content-list-item:focus,.simpay-form-template-explorer-main__content-list-item:hover{border-color:#1e1e1e;box-shadow:0 0 0 1px #1e1e1e;outline:none}.simpay-form-template-explorer-main__content-list-item:focus-within .simpay-form-template-explorer-main__content-list-item__description,.simpay-form-template-explorer-main__content-list-item:focus .simpay-form-template-explorer-main__content-list-item__description,.simpay-form-template-explorer-main__content-list-item:hover .simpay-form-template-explorer-main__content-list-item__description{opacity:0}.simpay-form-template-explorer-main__content-list-item:focus-within .simpay-form-template-explorer-main__content-list-item__actions,.simpay-form-template-explorer-main__content-list-item:focus .simpay-form-template-explorer-main__content-list-item__actions,.simpay-form-template-explorer-main__content-list-item:hover .simpay-form-template-explorer-main__content-list-item__actions{opacity:1}.simpay-form-template-explorer-main__content-list-item__name{font-size:16px;font-weight:600;line-height:21px;overflow:hidden;position:relative;text-overflow:ellipsis;white-space:nowrap}.simpay-form-template-explorer-main__content-list-item__name--is-locked{padding-right:30px}.simpay-form-template-explorer-main__content-list-item__description{color:#777;font-size:14px;line-height:18px;margin:10px 0 0;max-height:53px;overflow:hidden;opacity:1}.simpay-form-template-explorer-main__content-list-item__actions{background-color:#fff;border-radius:4px;display:flex;justify-content:space-between;align-items:center;padding:16px;position:absolute;top:0;right:0;bottom:0;left:0;width:100%;height:100%;opacity:0;transition:all .15s ease-out}@media(min-width: 782px){.simpay-form-template-explorer-main__content-list-item__actions{padding:0 16px 16px;top:auto;height:auto}}.simpay-form-template-explorer-main__content-list-item__actions .components-button{justify-content:center;flex:1 1 48%}.simpay-form-template-explorer-main__content-list-item__badge{background:#fff;padding:4px;position:absolute;right:10px;top:14px;z-index:2}.simpay-form-template-explorer-main__content-list-item__badge svg{fill:#777}.simpay-form-template-explorer-main__content-suggest{color:#1d2327;padding:24px;grid-column:1/-1;display:flex;align-items:flex-start;border:1px solid #ddd;border-radius:4px;box-shadow:0 1px 2px rgba(0,0,0,.06)}.simpay-form-template-explorer-main__content-suggest>div{margin-left:16px}.simpay-form-template-explorer-main__content-suggest svg{fill:currentColor;flex:1 0 auto;margin-top:-6px}.simpay-form-template-explorer-main__content-suggest h4{margin:0;font-size:20px}.simpay-form-template-explorer-main__content-suggest p{color:#555;font-size:14px}.simpay-form-template-explorer-main__content-upgrade{color:#1d2327;padding:32px;grid-column:1/-1;display:flex;align-items:center;justify-content:space-between;background:#fafcfe;border:1px solid #dce9f6;border-radius:4px;box-shadow:0 1px 3px rgba(66,139,202,.08)}.simpay-form-template-explorer-main__content-upgrade>div{margin-right:50px}.simpay-form-template-explorer-main__content-upgrade h4{font-size:18px;margin:0}.simpay-form-template-explorer-main__content-upgrade p{color:#555;font-size:14px;margin:8px 0 0}@media(min-width: 1440px){.simpay-form-template-explorer-main{margin-top:130px}.simpay-form-template-explorer-main__sidebar{top:130px;bottom:0;left:24px;overflow-x:hidden;overflow-y:auto;position:absolute;width:280px}.simpay-form-template-explorer-main__content{overflow-x:hidden;overflow-y:auto;margin-left:300px}}.simpay-form-template-explorer-upgrade{max-width:600px}.simpay-form-template-explorer-upgrade *{box-sizing:border-box}.simpay-form-template-explorer-upgrade__content{text-align:center;display:flex;flex-direction:column;align-items:center}.simpay-form-template-explorer-upgrade__title{font-size:22px;line-height:1.5;display:block;margin:12px 0 0}.simpay-form-template-explorer-upgrade__description{color:#777;font-size:16px;margin:16px 0 24px}.simpay-form-template-explorer-upgrade__description strong{color:#1d2327}.simpay-form-template-explorer-upgrade .components-button.is-primary{font-size:16px;font-weight:bold;margin:0 0 15px;padding:15px 30px !important;height:auto}.simpay-form-template-explorer-upgrade__purchased{color:#555;display:inline-block;margin:8px 0}.simpay-form-template-explorer-upgrade__discount{font-size:15px;text-align:center;margin:24px -32px -24px;padding:32px 40px 24px;border-bottom-left-radius:2px;border-bottom-right-radius:2px;background-color:#fcf9e8;position:relative}.simpay-form-template-explorer-upgrade__discount svg{background:#00a32a;fill:#fff;border-radius:50%;border:4px solid #fff;width:32px;height:32px;position:absolute;top:-16px;left:50%;margin-left:-16px}.simpay-form-template-explorer-upgrade__discount u{text-decoration:none;font-weight:bold;color:#00a32a}.simpay-form-template-explorer-upgrade__discount a{text-decoration:none} +body.admin-color-light{--wp-admin-theme-color: #0085ba;--wp-admin-theme-color--rgb: 0, 133, 186;--wp-admin-theme-color-darker-10: #0073a1;--wp-admin-theme-color-darker-10--rgb: 0, 115, 161;--wp-admin-theme-color-darker-20: #006187;--wp-admin-theme-color-darker-20--rgb: 0, 97, 135;--wp-admin-border-width-focus: 2px}@media(-webkit-min-device-pixel-ratio: 2),(min-resolution: 192dpi){body.admin-color-light{--wp-admin-border-width-focus: 1.5px}}body.admin-color-modern{--wp-admin-theme-color: #3858e9;--wp-admin-theme-color--rgb: 56, 88, 233;--wp-admin-theme-color-darker-10: #2145e6;--wp-admin-theme-color-darker-10--rgb: 33, 69, 230;--wp-admin-theme-color-darker-20: #183ad6;--wp-admin-theme-color-darker-20--rgb: 24, 58, 214;--wp-admin-border-width-focus: 2px}@media(-webkit-min-device-pixel-ratio: 2),(min-resolution: 192dpi){body.admin-color-modern{--wp-admin-border-width-focus: 1.5px}}body.admin-color-blue{--wp-admin-theme-color: #096484;--wp-admin-theme-color--rgb: 9, 100, 132;--wp-admin-theme-color-darker-10: #07526c;--wp-admin-theme-color-darker-10--rgb: 7, 82, 108;--wp-admin-theme-color-darker-20: #064054;--wp-admin-theme-color-darker-20--rgb: 6, 64, 84;--wp-admin-border-width-focus: 2px}@media(-webkit-min-device-pixel-ratio: 2),(min-resolution: 192dpi){body.admin-color-blue{--wp-admin-border-width-focus: 1.5px}}body.admin-color-coffee{--wp-admin-theme-color: #46403c;--wp-admin-theme-color--rgb: 70, 64, 60;--wp-admin-theme-color-darker-10: #383330;--wp-admin-theme-color-darker-10--rgb: 56, 51, 48;--wp-admin-theme-color-darker-20: #2b2724;--wp-admin-theme-color-darker-20--rgb: 43, 39, 36;--wp-admin-border-width-focus: 2px}@media(-webkit-min-device-pixel-ratio: 2),(min-resolution: 192dpi){body.admin-color-coffee{--wp-admin-border-width-focus: 1.5px}}body.admin-color-ectoplasm{--wp-admin-theme-color: #523f6d;--wp-admin-theme-color--rgb: 82, 63, 109;--wp-admin-theme-color-darker-10: #46365d;--wp-admin-theme-color-darker-10--rgb: 70, 54, 93;--wp-admin-theme-color-darker-20: #3a2c4d;--wp-admin-theme-color-darker-20--rgb: 58, 44, 77;--wp-admin-border-width-focus: 2px}@media(-webkit-min-device-pixel-ratio: 2),(min-resolution: 192dpi){body.admin-color-ectoplasm{--wp-admin-border-width-focus: 1.5px}}body.admin-color-midnight{--wp-admin-theme-color: #e14d43;--wp-admin-theme-color--rgb: 225, 77, 67;--wp-admin-theme-color-darker-10: #dd382d;--wp-admin-theme-color-darker-10--rgb: 221, 56, 45;--wp-admin-theme-color-darker-20: #d02c21;--wp-admin-theme-color-darker-20--rgb: 208, 44, 33;--wp-admin-border-width-focus: 2px}@media(-webkit-min-device-pixel-ratio: 2),(min-resolution: 192dpi){body.admin-color-midnight{--wp-admin-border-width-focus: 1.5px}}body.admin-color-ocean{--wp-admin-theme-color: #627c83;--wp-admin-theme-color--rgb: 98, 124, 131;--wp-admin-theme-color-darker-10: #576e74;--wp-admin-theme-color-darker-10--rgb: 87, 110, 116;--wp-admin-theme-color-darker-20: #4c6066;--wp-admin-theme-color-darker-20--rgb: 76, 96, 102;--wp-admin-border-width-focus: 2px}@media(-webkit-min-device-pixel-ratio: 2),(min-resolution: 192dpi){body.admin-color-ocean{--wp-admin-border-width-focus: 1.5px}}body.admin-color-sunrise{--wp-admin-theme-color: #dd823b;--wp-admin-theme-color--rgb: 221, 130, 59;--wp-admin-theme-color-darker-10: #d97426;--wp-admin-theme-color-darker-10--rgb: 217, 116, 38;--wp-admin-theme-color-darker-20: #c36922;--wp-admin-theme-color-darker-20--rgb: 195, 105, 34;--wp-admin-border-width-focus: 2px}@media(-webkit-min-device-pixel-ratio: 2),(min-resolution: 192dpi){body.admin-color-sunrise{--wp-admin-border-width-focus: 1.5px}}body.admin-color-fresh{--wp-admin-theme-color: #2271b1;--wp-admin-theme-color--rgb: 34, 113, 177;--wp-admin-theme-color-darker-10: #1e639c;--wp-admin-theme-color-darker-10--rgb: 30, 99, 156;--wp-admin-theme-color-darker-20: #1a5686;--wp-admin-theme-color-darker-20--rgb: 26, 86, 134;--wp-admin-border-width-focus: 2px}@media(-webkit-min-device-pixel-ratio: 2),(min-resolution: 192dpi){body.admin-color-fresh{--wp-admin-border-width-focus: 1.5px}}@media(min-width: 1440px){body.simpay-template-explorer-open{overflow:hidden}}body.simpay-template-explorer-open .simpay-admin-notice-top-of-page.simpay-notice,body.simpay-template-explorer-open .notice,body.simpay-template-explorer-open #screen-meta,body.simpay-template-explorer-open #screen-meta-links,body.simpay-template-explorer-open #poststuff,body.simpay-template-explorer-open #wpfooter{display:none !important}body.simpay-template-explorer-open.branch-5-6 .components-search-control,body.simpay-template-explorer-open.branch-5-7 .components-search-control,body.simpay-template-explorer-open.branch-5-8 .components-search-control{position:relative}body.simpay-template-explorer-open.branch-5-6 .components-search-control input[type=search].components-search-control__input,body.simpay-template-explorer-open.branch-5-7 .components-search-control input[type=search].components-search-control__input,body.simpay-template-explorer-open.branch-5-8 .components-search-control input[type=search].components-search-control__input{font-family:-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,Oxygen-Sans,Ubuntu,Cantarell,"Helvetica Neue",sans-serif;padding:6px 8px;box-shadow:0 0 0 rgba(0,0,0,0);transition:box-shadow .1s linear;border-radius:2px;border:1px solid #757575;font-size:16px;line-height:normal;display:block;padding:16px 48px 16px 16px;background:#f0f0f0;border:none;width:100%;height:48px;font-size:16px}@media(prefers-reduced-motion: reduce){body.simpay-template-explorer-open.branch-5-6 .components-search-control input[type=search].components-search-control__input,body.simpay-template-explorer-open.branch-5-7 .components-search-control input[type=search].components-search-control__input,body.simpay-template-explorer-open.branch-5-8 .components-search-control input[type=search].components-search-control__input{transition-duration:0s;transition-delay:0s}}@media(min-width: 600px){body.simpay-template-explorer-open.branch-5-6 .components-search-control input[type=search].components-search-control__input,body.simpay-template-explorer-open.branch-5-7 .components-search-control input[type=search].components-search-control__input,body.simpay-template-explorer-open.branch-5-8 .components-search-control input[type=search].components-search-control__input{font-size:13px;line-height:normal}}body.simpay-template-explorer-open.branch-5-6 .components-search-control input[type=search].components-search-control__input:focus,body.simpay-template-explorer-open.branch-5-7 .components-search-control input[type=search].components-search-control__input:focus,body.simpay-template-explorer-open.branch-5-8 .components-search-control input[type=search].components-search-control__input:focus{border-color:var(--wp-admin-theme-color);box-shadow:0 0 0 1px var(--wp-admin-theme-color);outline:2px solid rgba(0,0,0,0)}body.simpay-template-explorer-open.branch-5-6 .components-search-control input[type=search].components-search-control__input::-webkit-input-placeholder,body.simpay-template-explorer-open.branch-5-7 .components-search-control input[type=search].components-search-control__input::-webkit-input-placeholder,body.simpay-template-explorer-open.branch-5-8 .components-search-control input[type=search].components-search-control__input::-webkit-input-placeholder{color:rgba(30,30,30,.62)}body.simpay-template-explorer-open.branch-5-6 .components-search-control input[type=search].components-search-control__input::-moz-placeholder,body.simpay-template-explorer-open.branch-5-7 .components-search-control input[type=search].components-search-control__input::-moz-placeholder,body.simpay-template-explorer-open.branch-5-8 .components-search-control input[type=search].components-search-control__input::-moz-placeholder{opacity:1;color:rgba(30,30,30,.62)}body.simpay-template-explorer-open.branch-5-6 .components-search-control input[type=search].components-search-control__input:-ms-input-placeholder,body.simpay-template-explorer-open.branch-5-7 .components-search-control input[type=search].components-search-control__input:-ms-input-placeholder,body.simpay-template-explorer-open.branch-5-8 .components-search-control input[type=search].components-search-control__input:-ms-input-placeholder{color:rgba(30,30,30,.62)}@media(min-width: 600px){body.simpay-template-explorer-open.branch-5-6 .components-search-control input[type=search].components-search-control__input,body.simpay-template-explorer-open.branch-5-7 .components-search-control input[type=search].components-search-control__input,body.simpay-template-explorer-open.branch-5-8 .components-search-control input[type=search].components-search-control__input{font-size:13px}}body.simpay-template-explorer-open.branch-5-6 .components-search-control input[type=search].components-search-control__input:focus,body.simpay-template-explorer-open.branch-5-7 .components-search-control input[type=search].components-search-control__input:focus,body.simpay-template-explorer-open.branch-5-8 .components-search-control input[type=search].components-search-control__input:focus{background:#fff;box-shadow:0 0 0 2px var(--wp-admin-theme-color)}body.simpay-template-explorer-open.branch-5-6 .components-search-control input[type=search].components-search-control__input::-moz-placeholder, body.simpay-template-explorer-open.branch-5-7 .components-search-control input[type=search].components-search-control__input::-moz-placeholder, body.simpay-template-explorer-open.branch-5-8 .components-search-control input[type=search].components-search-control__input::-moz-placeholder{color:#757575}body.simpay-template-explorer-open.branch-5-6 .components-search-control input[type=search].components-search-control__input::placeholder,body.simpay-template-explorer-open.branch-5-7 .components-search-control input[type=search].components-search-control__input::placeholder,body.simpay-template-explorer-open.branch-5-8 .components-search-control input[type=search].components-search-control__input::placeholder{color:#757575}body.simpay-template-explorer-open.branch-5-6 .components-search-control input[type=search].components-search-control__input::-webkit-search-decoration,body.simpay-template-explorer-open.branch-5-6 .components-search-control input[type=search].components-search-control__input::-webkit-search-cancel-button,body.simpay-template-explorer-open.branch-5-6 .components-search-control input[type=search].components-search-control__input::-webkit-search-results-button,body.simpay-template-explorer-open.branch-5-6 .components-search-control input[type=search].components-search-control__input::-webkit-search-results-decoration,body.simpay-template-explorer-open.branch-5-7 .components-search-control input[type=search].components-search-control__input::-webkit-search-decoration,body.simpay-template-explorer-open.branch-5-7 .components-search-control input[type=search].components-search-control__input::-webkit-search-cancel-button,body.simpay-template-explorer-open.branch-5-7 .components-search-control input[type=search].components-search-control__input::-webkit-search-results-button,body.simpay-template-explorer-open.branch-5-7 .components-search-control input[type=search].components-search-control__input::-webkit-search-results-decoration,body.simpay-template-explorer-open.branch-5-8 .components-search-control input[type=search].components-search-control__input::-webkit-search-decoration,body.simpay-template-explorer-open.branch-5-8 .components-search-control input[type=search].components-search-control__input::-webkit-search-cancel-button,body.simpay-template-explorer-open.branch-5-8 .components-search-control input[type=search].components-search-control__input::-webkit-search-results-button,body.simpay-template-explorer-open.branch-5-8 .components-search-control input[type=search].components-search-control__input::-webkit-search-results-decoration{-webkit-appearance:none}body.simpay-template-explorer-open.branch-5-6 .components-search-control__icon,body.simpay-template-explorer-open.branch-5-7 .components-search-control__icon,body.simpay-template-explorer-open.branch-5-8 .components-search-control__icon{position:absolute;top:0;right:12px;bottom:0;display:flex;align-items:center}body.simpay-template-explorer-open.branch-5-6 .components-search-control__icon>svg,body.simpay-template-explorer-open.branch-5-7 .components-search-control__icon>svg,body.simpay-template-explorer-open.branch-5-8 .components-search-control__icon>svg{margin:8px 0}body.simpay-template-explorer-open.branch-5-6 .components-search-control__input-wrapper,body.simpay-template-explorer-open.branch-5-7 .components-search-control__input-wrapper,body.simpay-template-explorer-open.branch-5-8 .components-search-control__input-wrapper{position:relative}#simpay-form-template-explorer{background:#fff;border:1px solid #c3c4c7;box-shadow:0 1px 1px rgba(0,0,0,.04);margin-top:10px}#simpay-form-template-explorer,#simpay-form-template-explorer *{box-sizing:border-box}@media(min-width: 1440px){#simpay-form-template-explorer{position:fixed;top:111px;right:0;bottom:0;left:160px;margin:20px 22px;overflow-x:hidden;overflow-y:scroll}.folded #simpay-form-template-explorer{left:36px}}#simpay-form-template-explorer #wpcontent{padding-left:0}#simpay-form-template-explorer #wpbody-content{padding-bottom:0}.simpay-form-template-explorer{padding:24px}@media(min-width: 1440px){.simpay-form-template-explorer{height:100%;overflow:auto;padding-top:0}}@media(min-width: 1440px){.simpay-form-template-explorer-header{margin-right:24px;padding:30px 30px 25px;width:100%;background:#fff;border-bottom:1px solid #c3c4c7;box-shadow:0 1px 1px rgba(0,0,0,.04);position:absolute;left:0;right:0;z-index:3}}.simpay-form-template-explorer-header__title{font-size:26px;margin:0}.simpay-form-template-explorer-header__subtitle{color:#555;font-size:15px;margin:16px 0 0}.simpay-form-template-explorer-main{margin-top:24px}.simpay-form-template-explorer-main__sidebar{margin-bottom:24px;padding:2px}.simpay-form-template-explorer-main__sidebar-search{margin-bottom:12px}@media(min-width: 1440px){.simpay-form-template-explorer-main__sidebar-search{margin-bottom:24px}}@media(min-width: 1440px){.simpay-form-template-explorer-main__sidebar-categories{display:flex;flex-direction:column}}.simpay-form-template-explorer-main__sidebar-categories .components-button.is-pressed{background-color:var(--wp-admin-theme-color)}.simpay-form-template-explorer-main__sidebar-categories_category.category-new{font-weight:bold}.simpay-form-template-explorer-main__content{display:grid;grid-gap:24px;grid-template-columns:repeat(1, 1fr);padding:2px}@media(min-width: 782px){.simpay-form-template-explorer-main__content:not(.is-empty){grid-template-columns:repeat(2, minmax(0, 1fr))}}@media(min-width: 960px){.simpay-form-template-explorer-main__content:not(.is-empty){grid-template-columns:repeat(3, minmax(0, 1fr))}}.simpay-form-template-explorer-main__content-list-item{text-align:left;padding:16px;border-radius:4px;border:1px solid #ddd;position:relative;transition:all .15s ease-out;width:100%;height:auto;min-height:100px;flex-direction:column;align-items:flex-start}.simpay-form-template-explorer-main__content-list-item:focus-within,.simpay-form-template-explorer-main__content-list-item:focus,.simpay-form-template-explorer-main__content-list-item:hover{border-color:#1e1e1e;box-shadow:0 0 0 1px #1e1e1e;outline:none}.simpay-form-template-explorer-main__content-list-item:focus-within .simpay-form-template-explorer-main__content-list-item__description,.simpay-form-template-explorer-main__content-list-item:focus .simpay-form-template-explorer-main__content-list-item__description,.simpay-form-template-explorer-main__content-list-item:hover .simpay-form-template-explorer-main__content-list-item__description{opacity:0}.simpay-form-template-explorer-main__content-list-item:focus-within .simpay-form-template-explorer-main__content-list-item__actions,.simpay-form-template-explorer-main__content-list-item:focus .simpay-form-template-explorer-main__content-list-item__actions,.simpay-form-template-explorer-main__content-list-item:hover .simpay-form-template-explorer-main__content-list-item__actions{opacity:1}.simpay-form-template-explorer-main__content-list-item__name{font-size:16px;font-weight:600;line-height:21px;overflow:hidden;position:relative;text-overflow:ellipsis;white-space:nowrap}.simpay-form-template-explorer-main__content-list-item__name--is-locked{padding-right:30px}.simpay-form-template-explorer-main__content-list-item__description{color:#777;font-size:14px;line-height:18px;margin:10px 0 0;max-height:53px;overflow:hidden;opacity:1}.simpay-form-template-explorer-main__content-list-item__actions{background-color:#fff;border-radius:4px;display:flex;justify-content:space-between;align-items:center;padding:16px;position:absolute;top:0;right:0;bottom:0;left:0;width:100%;height:100%;opacity:0;transition:all .15s ease-out}@media(min-width: 782px){.simpay-form-template-explorer-main__content-list-item__actions{padding:0 16px 16px;top:auto;height:auto}}.simpay-form-template-explorer-main__content-list-item__actions .components-button{justify-content:center;flex:1 1 48%}.simpay-form-template-explorer-main__content-list-item__badge{background:#fff;padding:4px;position:absolute;right:10px;top:14px;z-index:2}.simpay-form-template-explorer-main__content-list-item__badge svg{fill:#777}.simpay-form-template-explorer-main__content-suggest{color:#1d2327;padding:24px;grid-column:1/-1;display:flex;align-items:flex-start;border:1px solid #ddd;border-radius:4px;box-shadow:0 1px 2px rgba(0,0,0,.06)}.simpay-form-template-explorer-main__content-suggest>div{margin-left:16px}.simpay-form-template-explorer-main__content-suggest svg{fill:currentColor;flex:1 0 auto;margin-top:-6px}.simpay-form-template-explorer-main__content-suggest h4{margin:0;font-size:20px}.simpay-form-template-explorer-main__content-suggest p{color:#555;font-size:14px}.simpay-form-template-explorer-main__content-upgrade{color:#1d2327;padding:32px;grid-column:1/-1;display:flex;align-items:center;justify-content:space-between;background:#fafcfe;border:1px solid #dce9f6;border-radius:4px;box-shadow:0 1px 3px rgba(66,139,202,.08)}.simpay-form-template-explorer-main__content-upgrade>div{margin-right:50px}.simpay-form-template-explorer-main__content-upgrade h4{font-size:18px;margin:0}.simpay-form-template-explorer-main__content-upgrade p{color:#555;font-size:14px;margin:8px 0 0}@media(min-width: 1440px){.simpay-form-template-explorer-main{margin-top:130px}.simpay-form-template-explorer-main__sidebar{top:130px;bottom:0;left:24px;overflow-x:hidden;overflow-y:auto;position:absolute;width:280px}.simpay-form-template-explorer-main__content{overflow-x:hidden;overflow-y:auto;margin-left:300px}}.simpay-form-template-explorer-upgrade{max-width:600px}.simpay-form-template-explorer-upgrade *{box-sizing:border-box}.simpay-form-template-explorer-upgrade__content{text-align:center;display:flex;flex-direction:column;align-items:center}.simpay-form-template-explorer-upgrade__title{font-size:22px;line-height:1.5;display:block;margin:12px 0 0}.simpay-form-template-explorer-upgrade__description{color:#777;font-size:16px;margin:16px 0 24px}.simpay-form-template-explorer-upgrade__description strong{color:#1d2327}.simpay-form-template-explorer-upgrade .components-button.is-primary{font-size:16px;font-weight:bold;margin:0 0 15px;padding:15px 30px !important;height:auto}.simpay-form-template-explorer-upgrade__purchased{color:#555;display:inline-block;margin:8px 0}.simpay-form-template-explorer-upgrade__discount{font-size:15px;text-align:center;margin:24px -32px -24px;padding:32px 40px 24px;border-bottom-left-radius:2px;border-bottom-right-radius:2px;background-color:#fcf9e8;position:relative}.simpay-form-template-explorer-upgrade__discount svg{background:#00a32a;fill:#fff;border-radius:50%;border:4px solid #fff;width:32px;height:32px;position:absolute;top:-16px;left:50%;margin-left:-16px}.simpay-form-template-explorer-upgrade__discount u{text-decoration:none;font-weight:bold;color:#00a32a}.simpay-form-template-explorer-upgrade__discount a{text-decoration:none} diff --git a/includes/core/assets/css/simpay-admin-help.min.css b/includes/core/assets/css/simpay-admin-help.min.css index 90865875..e6220d36 100644 --- a/includes/core/assets/css/simpay-admin-help.min.css +++ b/includes/core/assets/css/simpay-admin-help.min.css @@ -1 +1 @@ -body.admin-color-light{--wp-admin-theme-color: #0085ba;--wp-admin-theme-color--rgb: 0, 133, 186;--wp-admin-theme-color-darker-10: #0073a1;--wp-admin-theme-color-darker-10--rgb: 0, 115, 161;--wp-admin-theme-color-darker-20: #006187;--wp-admin-theme-color-darker-20--rgb: 0, 97, 135;--wp-admin-border-width-focus: 2px}@media(-webkit-min-device-pixel-ratio: 2),(min-resolution: 192dpi){body.admin-color-light{--wp-admin-border-width-focus: 1.5px}}body.admin-color-modern{--wp-admin-theme-color: #3858e9;--wp-admin-theme-color--rgb: 56, 88, 233;--wp-admin-theme-color-darker-10: #2145e6;--wp-admin-theme-color-darker-10--rgb: 33, 69, 230;--wp-admin-theme-color-darker-20: #183ad6;--wp-admin-theme-color-darker-20--rgb: 24, 58, 214;--wp-admin-border-width-focus: 2px}@media(-webkit-min-device-pixel-ratio: 2),(min-resolution: 192dpi){body.admin-color-modern{--wp-admin-border-width-focus: 1.5px}}body.admin-color-blue{--wp-admin-theme-color: #096484;--wp-admin-theme-color--rgb: 9, 100, 132;--wp-admin-theme-color-darker-10: #07526c;--wp-admin-theme-color-darker-10--rgb: 7, 82, 108;--wp-admin-theme-color-darker-20: #064054;--wp-admin-theme-color-darker-20--rgb: 6, 64, 84;--wp-admin-border-width-focus: 2px}@media(-webkit-min-device-pixel-ratio: 2),(min-resolution: 192dpi){body.admin-color-blue{--wp-admin-border-width-focus: 1.5px}}body.admin-color-coffee{--wp-admin-theme-color: #46403c;--wp-admin-theme-color--rgb: 70, 64, 60;--wp-admin-theme-color-darker-10: #383330;--wp-admin-theme-color-darker-10--rgb: 56, 51, 48;--wp-admin-theme-color-darker-20: #2b2724;--wp-admin-theme-color-darker-20--rgb: 43, 39, 36;--wp-admin-border-width-focus: 2px}@media(-webkit-min-device-pixel-ratio: 2),(min-resolution: 192dpi){body.admin-color-coffee{--wp-admin-border-width-focus: 1.5px}}body.admin-color-ectoplasm{--wp-admin-theme-color: #523f6d;--wp-admin-theme-color--rgb: 82, 63, 109;--wp-admin-theme-color-darker-10: #46365d;--wp-admin-theme-color-darker-10--rgb: 70, 54, 93;--wp-admin-theme-color-darker-20: #3a2c4d;--wp-admin-theme-color-darker-20--rgb: 58, 44, 77;--wp-admin-border-width-focus: 2px}@media(-webkit-min-device-pixel-ratio: 2),(min-resolution: 192dpi){body.admin-color-ectoplasm{--wp-admin-border-width-focus: 1.5px}}body.admin-color-midnight{--wp-admin-theme-color: #e14d43;--wp-admin-theme-color--rgb: 225, 77, 67;--wp-admin-theme-color-darker-10: #dd382d;--wp-admin-theme-color-darker-10--rgb: 221, 56, 45;--wp-admin-theme-color-darker-20: #d02c21;--wp-admin-theme-color-darker-20--rgb: 208, 44, 33;--wp-admin-border-width-focus: 2px}@media(-webkit-min-device-pixel-ratio: 2),(min-resolution: 192dpi){body.admin-color-midnight{--wp-admin-border-width-focus: 1.5px}}body.admin-color-ocean{--wp-admin-theme-color: #627c83;--wp-admin-theme-color--rgb: 98, 124, 131;--wp-admin-theme-color-darker-10: #576e74;--wp-admin-theme-color-darker-10--rgb: 87, 110, 116;--wp-admin-theme-color-darker-20: #4c6066;--wp-admin-theme-color-darker-20--rgb: 76, 96, 102;--wp-admin-border-width-focus: 2px}@media(-webkit-min-device-pixel-ratio: 2),(min-resolution: 192dpi){body.admin-color-ocean{--wp-admin-border-width-focus: 1.5px}}body.admin-color-sunrise{--wp-admin-theme-color: #dd823b;--wp-admin-theme-color--rgb: 221, 130, 59;--wp-admin-theme-color-darker-10: #d97426;--wp-admin-theme-color-darker-10--rgb: 217, 116, 38;--wp-admin-theme-color-darker-20: #c36922;--wp-admin-theme-color-darker-20--rgb: 195, 105, 34;--wp-admin-border-width-focus: 2px}@media(-webkit-min-device-pixel-ratio: 2),(min-resolution: 192dpi){body.admin-color-sunrise{--wp-admin-border-width-focus: 1.5px}}.simpay-help-body-locked{overflow:hidden}.simpay-help-body-locked ul#adminmenu a.wp-has-current-submenu:after,.simpay-help-body-locked ul#adminmenu>li.current>a.current:after{border-right-color:#797979}.simpay-help-body-locked.branch-5-7 .components-search-control,.simpay-help-body-locked.branch-5-8 .components-search-control{position:relative}.simpay-help-body-locked.branch-5-7 .components-search-control input[type=search].components-search-control__input,.simpay-help-body-locked.branch-5-8 .components-search-control input[type=search].components-search-control__input{font-family:-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,Oxygen-Sans,Ubuntu,Cantarell,"Helvetica Neue",sans-serif;padding:6px 8px;box-shadow:0 0 0 rgba(0,0,0,0);transition:box-shadow .1s linear;border-radius:2px;border:1px solid #757575;font-size:16px;line-height:normal;display:block;padding:16px 48px 16px 16px;background:#f0f0f0;border:none;width:100%;height:48px;font-size:16px}@media(prefers-reduced-motion: reduce){.simpay-help-body-locked.branch-5-7 .components-search-control input[type=search].components-search-control__input,.simpay-help-body-locked.branch-5-8 .components-search-control input[type=search].components-search-control__input{transition-duration:0s;transition-delay:0s}}@media(min-width: 600px){.simpay-help-body-locked.branch-5-7 .components-search-control input[type=search].components-search-control__input,.simpay-help-body-locked.branch-5-8 .components-search-control input[type=search].components-search-control__input{font-size:13px;line-height:normal}}.simpay-help-body-locked.branch-5-7 .components-search-control input[type=search].components-search-control__input:focus,.simpay-help-body-locked.branch-5-8 .components-search-control input[type=search].components-search-control__input:focus{border-color:var(--wp-admin-theme-color);box-shadow:0 0 0 1px var(--wp-admin-theme-color);outline:2px solid rgba(0,0,0,0)}.simpay-help-body-locked.branch-5-7 .components-search-control input[type=search].components-search-control__input::-webkit-input-placeholder,.simpay-help-body-locked.branch-5-8 .components-search-control input[type=search].components-search-control__input::-webkit-input-placeholder{color:rgba(30,30,30,.62)}.simpay-help-body-locked.branch-5-7 .components-search-control input[type=search].components-search-control__input::-moz-placeholder,.simpay-help-body-locked.branch-5-8 .components-search-control input[type=search].components-search-control__input::-moz-placeholder{opacity:1;color:rgba(30,30,30,.62)}.simpay-help-body-locked.branch-5-7 .components-search-control input[type=search].components-search-control__input:-ms-input-placeholder,.simpay-help-body-locked.branch-5-8 .components-search-control input[type=search].components-search-control__input:-ms-input-placeholder{color:rgba(30,30,30,.62)}@media(min-width: 600px){.simpay-help-body-locked.branch-5-7 .components-search-control input[type=search].components-search-control__input,.simpay-help-body-locked.branch-5-8 .components-search-control input[type=search].components-search-control__input{font-size:13px}}.simpay-help-body-locked.branch-5-7 .components-search-control input[type=search].components-search-control__input:focus,.simpay-help-body-locked.branch-5-8 .components-search-control input[type=search].components-search-control__input:focus{background:#fff;box-shadow:0 0 0 2px var(--wp-admin-theme-color)}.simpay-help-body-locked.branch-5-7 .components-search-control input[type=search].components-search-control__input::-moz-placeholder, .simpay-help-body-locked.branch-5-8 .components-search-control input[type=search].components-search-control__input::-moz-placeholder{color:#757575}.simpay-help-body-locked.branch-5-7 .components-search-control input[type=search].components-search-control__input::placeholder,.simpay-help-body-locked.branch-5-8 .components-search-control input[type=search].components-search-control__input::placeholder{color:#757575}.simpay-help-body-locked.branch-5-7 .components-search-control input[type=search].components-search-control__input::-webkit-search-decoration,.simpay-help-body-locked.branch-5-7 .components-search-control input[type=search].components-search-control__input::-webkit-search-cancel-button,.simpay-help-body-locked.branch-5-7 .components-search-control input[type=search].components-search-control__input::-webkit-search-results-button,.simpay-help-body-locked.branch-5-7 .components-search-control input[type=search].components-search-control__input::-webkit-search-results-decoration,.simpay-help-body-locked.branch-5-8 .components-search-control input[type=search].components-search-control__input::-webkit-search-decoration,.simpay-help-body-locked.branch-5-8 .components-search-control input[type=search].components-search-control__input::-webkit-search-cancel-button,.simpay-help-body-locked.branch-5-8 .components-search-control input[type=search].components-search-control__input::-webkit-search-results-button,.simpay-help-body-locked.branch-5-8 .components-search-control input[type=search].components-search-control__input::-webkit-search-results-decoration{-webkit-appearance:none}.simpay-help-body-locked.branch-5-7 .components-search-control__icon,.simpay-help-body-locked.branch-5-8 .components-search-control__icon{position:absolute;top:0;right:12px;bottom:0;display:flex;align-items:center}.simpay-help-body-locked.branch-5-7 .components-search-control__icon>svg,.simpay-help-body-locked.branch-5-8 .components-search-control__icon>svg{margin:8px 0}.simpay-help-body-locked.branch-5-7 .components-search-control__input-wrapper,.simpay-help-body-locked.branch-5-8 .components-search-control__input-wrapper{position:relative}.simpay-help-popover{padding:20px;min-width:300px}.simpay-help-popover h4{margin:0;font-size:16px}.simpay-help-panel{background-color:#fff;height:100%;width:100%;max-width:570px;position:fixed;z-index:1053;top:0;right:0;bottom:0;overflow-x:hidden;transition:.5s;transform:translateX(0%);display:flex;flex-direction:column}.admin-bar .simpay-help-panel{height:calc(100% - 46px);top:46px}@media(min-width: 782px){.admin-bar .simpay-help-panel{height:calc(100% - 32px);top:32px}}.simpay-help-panel__header{font-size:15px;font-weight:bold;padding:12px 24px;background-color:#007cba;background-color:var(--wp-admin-theme-color);position:sticky;top:0;z-index:2;display:flex;align-items:center;justify-content:space-between}.simpay-help-panel__header,.simpay-help-panel__header .components-button{color:#fff}.simpay-help-panel__header:focus,.simpay-help-panel__header .components-button:focus{box-shadow:0 0 0 var(--wp-admin-border-width-focus) rgba(255,255,255,.2)}.simpay-help-panel__footer{margin-top:auto;display:flex;border-top:1px solid #e0e0e0;background:#fff;position:sticky;bottom:0;z-index:2}.simpay-help-panel__footer-action{text-align:center;flex-basis:50%;padding:24px}.simpay-help-panel__footer-action svg{fill:#2f2f2f}.simpay-help-panel__footer-action h4{font-size:18px;margin:0}.simpay-help-panel__footer-action p{font-size:14px}.simpay-help-panel__footer-action h4,.simpay-help-panel__footer-action p{color:#2f2f2f}.simpay-help-panel__footer-action:first-child{border-right:1px solid #e0e0e0}.simpay-help-panel__footer-upgrade-button.components-button{color:#fff;font-weight:bold;background-color:#00aa63 !important;box-shadow:inset 0 0 0 1px #00aa63 !important}.simpay-help-panel__footer-upgrade-button.components-button:hover:not(:disabled){color:#fff;background-color:#07c575 !important}.simpay-help-panel__search{padding:24px}.simpay-help-panel__results{margin-top:24px}.simpay-help-panel__none{font-size:16px;color:#757575}.simpay-help-panel__result{margin-bottom:24px;padding-bottom:24px;border-bottom:1px solid #e0e0e0}.simpay-help-panel__result:last-child{border-bottom:0}.simpay-help-panel__result a{font-size:16px;text-decoration:none}.simpay-help-panel__result p{margin:8px 0 0}.simpay-help-panel__categories{margin-top:-16px}.simpay-help-panel__category{padding:16px 0;border-bottom:1px solid #e0e0e0}.simpay-help-panel__category>div{margin-top:12px}.simpay-help-panel__category a{font-size:14px;text-decoration:none;display:block;margin-bottom:8px}.simpay-help-panel__category-title{color:#2f2f2f;font-size:18px;margin:0;padding:0;width:100%;height:auto;background:none;border:0;box-shadow:none;-webkit-appearance:none;-moz-appearance:none;appearance:none;border-radius:0;display:flex;justify-content:space-between;align-items:center}.simpay-help-panel__category-title svg{fill:#949494}.simpay-help-panel__category-title:hover{cursor:pointer}.simpay-help-backdrop{position:fixed;z-index:1052;top:0;right:0;bottom:0;left:0;background-color:#000;border:0;box-shadow:none;-webkit-appearance:none;-moz-appearance:none;appearance:none;opacity:.5;transition:.5s}@media(min-width: 782px){.simpay-help-backdrop,.folded .simpay-help-backdrop,.auto-fold.folded .simpay-help-backdrop{left:36px}}@media(min-width: 960px){.auto-fold .simpay-help-backdrop{left:160px}} +body.admin-color-light{--wp-admin-theme-color: #0085ba;--wp-admin-theme-color--rgb: 0, 133, 186;--wp-admin-theme-color-darker-10: #0073a1;--wp-admin-theme-color-darker-10--rgb: 0, 115, 161;--wp-admin-theme-color-darker-20: #006187;--wp-admin-theme-color-darker-20--rgb: 0, 97, 135;--wp-admin-border-width-focus: 2px}@media(-webkit-min-device-pixel-ratio: 2),(min-resolution: 192dpi){body.admin-color-light{--wp-admin-border-width-focus: 1.5px}}body.admin-color-modern{--wp-admin-theme-color: #3858e9;--wp-admin-theme-color--rgb: 56, 88, 233;--wp-admin-theme-color-darker-10: #2145e6;--wp-admin-theme-color-darker-10--rgb: 33, 69, 230;--wp-admin-theme-color-darker-20: #183ad6;--wp-admin-theme-color-darker-20--rgb: 24, 58, 214;--wp-admin-border-width-focus: 2px}@media(-webkit-min-device-pixel-ratio: 2),(min-resolution: 192dpi){body.admin-color-modern{--wp-admin-border-width-focus: 1.5px}}body.admin-color-blue{--wp-admin-theme-color: #096484;--wp-admin-theme-color--rgb: 9, 100, 132;--wp-admin-theme-color-darker-10: #07526c;--wp-admin-theme-color-darker-10--rgb: 7, 82, 108;--wp-admin-theme-color-darker-20: #064054;--wp-admin-theme-color-darker-20--rgb: 6, 64, 84;--wp-admin-border-width-focus: 2px}@media(-webkit-min-device-pixel-ratio: 2),(min-resolution: 192dpi){body.admin-color-blue{--wp-admin-border-width-focus: 1.5px}}body.admin-color-coffee{--wp-admin-theme-color: #46403c;--wp-admin-theme-color--rgb: 70, 64, 60;--wp-admin-theme-color-darker-10: #383330;--wp-admin-theme-color-darker-10--rgb: 56, 51, 48;--wp-admin-theme-color-darker-20: #2b2724;--wp-admin-theme-color-darker-20--rgb: 43, 39, 36;--wp-admin-border-width-focus: 2px}@media(-webkit-min-device-pixel-ratio: 2),(min-resolution: 192dpi){body.admin-color-coffee{--wp-admin-border-width-focus: 1.5px}}body.admin-color-ectoplasm{--wp-admin-theme-color: #523f6d;--wp-admin-theme-color--rgb: 82, 63, 109;--wp-admin-theme-color-darker-10: #46365d;--wp-admin-theme-color-darker-10--rgb: 70, 54, 93;--wp-admin-theme-color-darker-20: #3a2c4d;--wp-admin-theme-color-darker-20--rgb: 58, 44, 77;--wp-admin-border-width-focus: 2px}@media(-webkit-min-device-pixel-ratio: 2),(min-resolution: 192dpi){body.admin-color-ectoplasm{--wp-admin-border-width-focus: 1.5px}}body.admin-color-midnight{--wp-admin-theme-color: #e14d43;--wp-admin-theme-color--rgb: 225, 77, 67;--wp-admin-theme-color-darker-10: #dd382d;--wp-admin-theme-color-darker-10--rgb: 221, 56, 45;--wp-admin-theme-color-darker-20: #d02c21;--wp-admin-theme-color-darker-20--rgb: 208, 44, 33;--wp-admin-border-width-focus: 2px}@media(-webkit-min-device-pixel-ratio: 2),(min-resolution: 192dpi){body.admin-color-midnight{--wp-admin-border-width-focus: 1.5px}}body.admin-color-ocean{--wp-admin-theme-color: #627c83;--wp-admin-theme-color--rgb: 98, 124, 131;--wp-admin-theme-color-darker-10: #576e74;--wp-admin-theme-color-darker-10--rgb: 87, 110, 116;--wp-admin-theme-color-darker-20: #4c6066;--wp-admin-theme-color-darker-20--rgb: 76, 96, 102;--wp-admin-border-width-focus: 2px}@media(-webkit-min-device-pixel-ratio: 2),(min-resolution: 192dpi){body.admin-color-ocean{--wp-admin-border-width-focus: 1.5px}}body.admin-color-sunrise{--wp-admin-theme-color: #dd823b;--wp-admin-theme-color--rgb: 221, 130, 59;--wp-admin-theme-color-darker-10: #d97426;--wp-admin-theme-color-darker-10--rgb: 217, 116, 38;--wp-admin-theme-color-darker-20: #c36922;--wp-admin-theme-color-darker-20--rgb: 195, 105, 34;--wp-admin-border-width-focus: 2px}@media(-webkit-min-device-pixel-ratio: 2),(min-resolution: 192dpi){body.admin-color-sunrise{--wp-admin-border-width-focus: 1.5px}}body.admin-color-fresh{--wp-admin-theme-color: #2271b1;--wp-admin-theme-color--rgb: 34, 113, 177;--wp-admin-theme-color-darker-10: #1e639c;--wp-admin-theme-color-darker-10--rgb: 30, 99, 156;--wp-admin-theme-color-darker-20: #1a5686;--wp-admin-theme-color-darker-20--rgb: 26, 86, 134;--wp-admin-border-width-focus: 2px}@media(-webkit-min-device-pixel-ratio: 2),(min-resolution: 192dpi){body.admin-color-fresh{--wp-admin-border-width-focus: 1.5px}}.simpay-help-body-locked{overflow:hidden}.simpay-help-body-locked ul#adminmenu a.wp-has-current-submenu:after,.simpay-help-body-locked ul#adminmenu>li.current>a.current:after{border-right-color:#797979}.simpay-help-body-locked.branch-5-7 .components-search-control,.simpay-help-body-locked.branch-5-8 .components-search-control{position:relative}.simpay-help-body-locked.branch-5-7 .components-search-control input[type=search].components-search-control__input,.simpay-help-body-locked.branch-5-8 .components-search-control input[type=search].components-search-control__input{font-family:-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,Oxygen-Sans,Ubuntu,Cantarell,"Helvetica Neue",sans-serif;padding:6px 8px;box-shadow:0 0 0 rgba(0,0,0,0);transition:box-shadow .1s linear;border-radius:2px;border:1px solid #757575;font-size:16px;line-height:normal;display:block;padding:16px 48px 16px 16px;background:#f0f0f0;border:none;width:100%;height:48px;font-size:16px}@media(prefers-reduced-motion: reduce){.simpay-help-body-locked.branch-5-7 .components-search-control input[type=search].components-search-control__input,.simpay-help-body-locked.branch-5-8 .components-search-control input[type=search].components-search-control__input{transition-duration:0s;transition-delay:0s}}@media(min-width: 600px){.simpay-help-body-locked.branch-5-7 .components-search-control input[type=search].components-search-control__input,.simpay-help-body-locked.branch-5-8 .components-search-control input[type=search].components-search-control__input{font-size:13px;line-height:normal}}.simpay-help-body-locked.branch-5-7 .components-search-control input[type=search].components-search-control__input:focus,.simpay-help-body-locked.branch-5-8 .components-search-control input[type=search].components-search-control__input:focus{border-color:var(--wp-admin-theme-color);box-shadow:0 0 0 1px var(--wp-admin-theme-color);outline:2px solid rgba(0,0,0,0)}.simpay-help-body-locked.branch-5-7 .components-search-control input[type=search].components-search-control__input::-webkit-input-placeholder,.simpay-help-body-locked.branch-5-8 .components-search-control input[type=search].components-search-control__input::-webkit-input-placeholder{color:rgba(30,30,30,.62)}.simpay-help-body-locked.branch-5-7 .components-search-control input[type=search].components-search-control__input::-moz-placeholder,.simpay-help-body-locked.branch-5-8 .components-search-control input[type=search].components-search-control__input::-moz-placeholder{opacity:1;color:rgba(30,30,30,.62)}.simpay-help-body-locked.branch-5-7 .components-search-control input[type=search].components-search-control__input:-ms-input-placeholder,.simpay-help-body-locked.branch-5-8 .components-search-control input[type=search].components-search-control__input:-ms-input-placeholder{color:rgba(30,30,30,.62)}@media(min-width: 600px){.simpay-help-body-locked.branch-5-7 .components-search-control input[type=search].components-search-control__input,.simpay-help-body-locked.branch-5-8 .components-search-control input[type=search].components-search-control__input{font-size:13px}}.simpay-help-body-locked.branch-5-7 .components-search-control input[type=search].components-search-control__input:focus,.simpay-help-body-locked.branch-5-8 .components-search-control input[type=search].components-search-control__input:focus{background:#fff;box-shadow:0 0 0 2px var(--wp-admin-theme-color)}.simpay-help-body-locked.branch-5-7 .components-search-control input[type=search].components-search-control__input::-moz-placeholder, .simpay-help-body-locked.branch-5-8 .components-search-control input[type=search].components-search-control__input::-moz-placeholder{color:#757575}.simpay-help-body-locked.branch-5-7 .components-search-control input[type=search].components-search-control__input::placeholder,.simpay-help-body-locked.branch-5-8 .components-search-control input[type=search].components-search-control__input::placeholder{color:#757575}.simpay-help-body-locked.branch-5-7 .components-search-control input[type=search].components-search-control__input::-webkit-search-decoration,.simpay-help-body-locked.branch-5-7 .components-search-control input[type=search].components-search-control__input::-webkit-search-cancel-button,.simpay-help-body-locked.branch-5-7 .components-search-control input[type=search].components-search-control__input::-webkit-search-results-button,.simpay-help-body-locked.branch-5-7 .components-search-control input[type=search].components-search-control__input::-webkit-search-results-decoration,.simpay-help-body-locked.branch-5-8 .components-search-control input[type=search].components-search-control__input::-webkit-search-decoration,.simpay-help-body-locked.branch-5-8 .components-search-control input[type=search].components-search-control__input::-webkit-search-cancel-button,.simpay-help-body-locked.branch-5-8 .components-search-control input[type=search].components-search-control__input::-webkit-search-results-button,.simpay-help-body-locked.branch-5-8 .components-search-control input[type=search].components-search-control__input::-webkit-search-results-decoration{-webkit-appearance:none}.simpay-help-body-locked.branch-5-7 .components-search-control__icon,.simpay-help-body-locked.branch-5-8 .components-search-control__icon{position:absolute;top:0;right:12px;bottom:0;display:flex;align-items:center}.simpay-help-body-locked.branch-5-7 .components-search-control__icon>svg,.simpay-help-body-locked.branch-5-8 .components-search-control__icon>svg{margin:8px 0}.simpay-help-body-locked.branch-5-7 .components-search-control__input-wrapper,.simpay-help-body-locked.branch-5-8 .components-search-control__input-wrapper{position:relative}.simpay-help-popover{padding:20px;min-width:300px}.simpay-help-popover h4{margin:0;font-size:16px}.simpay-help-panel{background-color:#fff;height:100%;width:100%;max-width:570px;position:fixed;z-index:1053;top:0;right:0;bottom:0;overflow-x:hidden;transition:.5s;transform:translateX(0%);display:flex;flex-direction:column}.admin-bar .simpay-help-panel{height:calc(100% - 46px);top:46px}@media(min-width: 782px){.admin-bar .simpay-help-panel{height:calc(100% - 32px);top:32px}}.simpay-help-panel__header{font-size:15px;font-weight:bold;padding:12px 24px;background-color:#007cba;background-color:var(--wp-admin-theme-color);position:sticky;top:0;z-index:2;display:flex;align-items:center;justify-content:space-between}.simpay-help-panel__header,.simpay-help-panel__header .components-button{color:#fff}.simpay-help-panel__header:focus,.simpay-help-panel__header .components-button:focus{box-shadow:0 0 0 var(--wp-admin-border-width-focus) rgba(255,255,255,.2)}.simpay-help-panel__footer{margin-top:auto;display:flex;border-top:1px solid #e0e0e0;background:#fff;position:sticky;bottom:0;z-index:2}.simpay-help-panel__footer-action{text-align:center;flex-basis:50%;padding:24px}.simpay-help-panel__footer-action svg{fill:#2f2f2f}.simpay-help-panel__footer-action h4{font-size:18px;margin:0}.simpay-help-panel__footer-action p{font-size:14px}.simpay-help-panel__footer-action h4,.simpay-help-panel__footer-action p{color:#2f2f2f}.simpay-help-panel__footer-action:first-child{border-right:1px solid #e0e0e0}.simpay-help-panel__footer-upgrade-button.components-button{color:#fff;font-weight:bold;background-color:#00aa63 !important;box-shadow:inset 0 0 0 1px #00aa63 !important}.simpay-help-panel__footer-upgrade-button.components-button:hover:not(:disabled){color:#fff;background-color:#07c575 !important}.simpay-help-panel__search{padding:24px}.simpay-help-panel__results{margin-top:24px}.simpay-help-panel__none{font-size:16px;color:#757575}.simpay-help-panel__result{margin-bottom:24px;padding-bottom:24px;border-bottom:1px solid #e0e0e0}.simpay-help-panel__result:last-child{border-bottom:0}.simpay-help-panel__result a{font-size:16px;text-decoration:none}.simpay-help-panel__result p{margin:8px 0 0}.simpay-help-panel__categories{margin-top:-16px}.simpay-help-panel__category{padding:16px 0;border-bottom:1px solid #e0e0e0}.simpay-help-panel__category>div{margin-top:12px}.simpay-help-panel__category a{font-size:14px;text-decoration:none;display:block;margin-bottom:8px}.simpay-help-panel__category-title{color:#2f2f2f;font-size:18px;margin:0;padding:0;width:100%;height:auto;background:none;border:0;box-shadow:none;-webkit-appearance:none;-moz-appearance:none;appearance:none;border-radius:0;display:flex;justify-content:space-between;align-items:center}.simpay-help-panel__category-title svg{fill:#949494}.simpay-help-panel__category-title:hover{cursor:pointer}.simpay-help-backdrop{position:fixed;z-index:1052;top:0;right:0;bottom:0;left:0;background-color:#000;border:0;box-shadow:none;-webkit-appearance:none;-moz-appearance:none;appearance:none;opacity:.5;transition:.5s}@media(min-width: 782px){.simpay-help-backdrop,.folded .simpay-help-backdrop,.auto-fold.folded .simpay-help-backdrop{left:36px}}@media(min-width: 960px){.auto-fold .simpay-help-backdrop{left:160px}} diff --git a/includes/core/assets/css/simpay-admin-notifications.min.css b/includes/core/assets/css/simpay-admin-notifications.min.css index 225d4080..26cd263a 100644 --- a/includes/core/assets/css/simpay-admin-notifications.min.css +++ b/includes/core/assets/css/simpay-admin-notifications.min.css @@ -1 +1 @@ -body.admin-color-light{--wp-admin-theme-color: #0085ba;--wp-admin-theme-color--rgb: 0, 133, 186;--wp-admin-theme-color-darker-10: #0073a1;--wp-admin-theme-color-darker-10--rgb: 0, 115, 161;--wp-admin-theme-color-darker-20: #006187;--wp-admin-theme-color-darker-20--rgb: 0, 97, 135;--wp-admin-border-width-focus: 2px}@media(-webkit-min-device-pixel-ratio: 2),(min-resolution: 192dpi){body.admin-color-light{--wp-admin-border-width-focus: 1.5px}}body.admin-color-modern{--wp-admin-theme-color: #3858e9;--wp-admin-theme-color--rgb: 56, 88, 233;--wp-admin-theme-color-darker-10: #2145e6;--wp-admin-theme-color-darker-10--rgb: 33, 69, 230;--wp-admin-theme-color-darker-20: #183ad6;--wp-admin-theme-color-darker-20--rgb: 24, 58, 214;--wp-admin-border-width-focus: 2px}@media(-webkit-min-device-pixel-ratio: 2),(min-resolution: 192dpi){body.admin-color-modern{--wp-admin-border-width-focus: 1.5px}}body.admin-color-blue{--wp-admin-theme-color: #096484;--wp-admin-theme-color--rgb: 9, 100, 132;--wp-admin-theme-color-darker-10: #07526c;--wp-admin-theme-color-darker-10--rgb: 7, 82, 108;--wp-admin-theme-color-darker-20: #064054;--wp-admin-theme-color-darker-20--rgb: 6, 64, 84;--wp-admin-border-width-focus: 2px}@media(-webkit-min-device-pixel-ratio: 2),(min-resolution: 192dpi){body.admin-color-blue{--wp-admin-border-width-focus: 1.5px}}body.admin-color-coffee{--wp-admin-theme-color: #46403c;--wp-admin-theme-color--rgb: 70, 64, 60;--wp-admin-theme-color-darker-10: #383330;--wp-admin-theme-color-darker-10--rgb: 56, 51, 48;--wp-admin-theme-color-darker-20: #2b2724;--wp-admin-theme-color-darker-20--rgb: 43, 39, 36;--wp-admin-border-width-focus: 2px}@media(-webkit-min-device-pixel-ratio: 2),(min-resolution: 192dpi){body.admin-color-coffee{--wp-admin-border-width-focus: 1.5px}}body.admin-color-ectoplasm{--wp-admin-theme-color: #523f6d;--wp-admin-theme-color--rgb: 82, 63, 109;--wp-admin-theme-color-darker-10: #46365d;--wp-admin-theme-color-darker-10--rgb: 70, 54, 93;--wp-admin-theme-color-darker-20: #3a2c4d;--wp-admin-theme-color-darker-20--rgb: 58, 44, 77;--wp-admin-border-width-focus: 2px}@media(-webkit-min-device-pixel-ratio: 2),(min-resolution: 192dpi){body.admin-color-ectoplasm{--wp-admin-border-width-focus: 1.5px}}body.admin-color-midnight{--wp-admin-theme-color: #e14d43;--wp-admin-theme-color--rgb: 225, 77, 67;--wp-admin-theme-color-darker-10: #dd382d;--wp-admin-theme-color-darker-10--rgb: 221, 56, 45;--wp-admin-theme-color-darker-20: #d02c21;--wp-admin-theme-color-darker-20--rgb: 208, 44, 33;--wp-admin-border-width-focus: 2px}@media(-webkit-min-device-pixel-ratio: 2),(min-resolution: 192dpi){body.admin-color-midnight{--wp-admin-border-width-focus: 1.5px}}body.admin-color-ocean{--wp-admin-theme-color: #627c83;--wp-admin-theme-color--rgb: 98, 124, 131;--wp-admin-theme-color-darker-10: #576e74;--wp-admin-theme-color-darker-10--rgb: 87, 110, 116;--wp-admin-theme-color-darker-20: #4c6066;--wp-admin-theme-color-darker-20--rgb: 76, 96, 102;--wp-admin-border-width-focus: 2px}@media(-webkit-min-device-pixel-ratio: 2),(min-resolution: 192dpi){body.admin-color-ocean{--wp-admin-border-width-focus: 1.5px}}body.admin-color-sunrise{--wp-admin-theme-color: #dd823b;--wp-admin-theme-color--rgb: 221, 130, 59;--wp-admin-theme-color-darker-10: #d97426;--wp-admin-theme-color-darker-10--rgb: 217, 116, 38;--wp-admin-theme-color-darker-20: #c36922;--wp-admin-theme-color-darker-20--rgb: 195, 105, 34;--wp-admin-border-width-focus: 2px}@media(-webkit-min-device-pixel-ratio: 2),(min-resolution: 192dpi){body.admin-color-sunrise{--wp-admin-border-width-focus: 1.5px}}.simpay-notifications-body-locked{overflow:hidden}.simpay-notifications-body-locked ul#adminmenu a.wp-has-current-submenu:after,.simpay-notifications-body-locked ul#adminmenu>li.current>a.current:after{border-right-color:#797979}.simpay-notifications-panel{background-color:#fff;height:100%;width:100%;max-width:570px;position:fixed;z-index:1053;top:0;right:0;bottom:0;overflow-x:hidden;transition:.5s;transform:translateX(0%)}.admin-bar .simpay-notifications-panel{height:calc(100% - 46px);top:46px}@media(min-width: 782px){.admin-bar .simpay-notifications-panel{height:calc(100% - 32px);top:32px}}.simpay-notifications-panel__header{font-size:15px;font-weight:bold;padding:12px 24px;background-color:#007cba;background-color:var(--wp-admin-theme-color);position:sticky;top:0;z-index:2;display:flex;align-items:center;justify-content:space-between}.simpay-notifications-panel__header,.simpay-notifications-panel__header .components-button{color:#fff}.simpay-notifications-panel__header:focus,.simpay-notifications-panel__header .components-button:focus{box-shadow:0 0 0 var(--wp-admin-border-width-focus) rgba(255,255,255,.2)}.simpay-notifications-panel__loading,.simpay-notifications-panel__none{padding:24px}.simpay-notifications-panel__none{font-size:16px;color:#757575}.simpay-notifications-backdrop{position:fixed;z-index:1052;top:0;right:0;bottom:0;left:0;background-color:#000;border:0;box-shadow:none;-webkit-appearance:none;-moz-appearance:none;appearance:none;opacity:.5;transition:.5s}@media(min-width: 782px){.simpay-notifications-backdrop,.folded .simpay-notifications-backdrop,.auto-fold.folded .simpay-notifications-backdrop{left:36px}}@media(min-width: 960px){.auto-fold .simpay-notifications-backdrop{left:160px}}.simpay-notifications-notification{display:flex;gap:12px;margin-bottom:24px;padding:24px}.simpay-notifications-notification:last-child{margin-bottom:0}.simpay-notifications-notification__icon{margin-top:2px}.simpay-notifications-notification__icon-success{color:#4ab866}.simpay-notifications-notification__icon-info{color:#005ae0}.simpay-notifications-notification__icon-warning{color:#f0b849}.simpay-notifications-notification__icon-error{color:#cc1818}.simpay-notifications-notification__body{flex:1}.simpay-notifications-notification__header{display:flex;align-items:flex-start;justify-content:space-between;gap:5px;margin:1px 0 7px}.simpay-notifications-notification__title{line-height:1.5;color:#1e1e1e;flex:1;font-size:16px;font-weight:600;margin:0 24px 0 0}.simpay-notifications-notification__date{color:#757575;font-size:12px;margin-top:3px}.simpay-notifications-notification__content p{margin:12px 0}.simpay-notifications-notification__actions{flex-wrap:wrap;display:flex;align-items:center;gap:12px;margin-top:12px}.simpay-notifications-notification__actions .components-button.is-link{color:#757575} +body.admin-color-light{--wp-admin-theme-color: #0085ba;--wp-admin-theme-color--rgb: 0, 133, 186;--wp-admin-theme-color-darker-10: #0073a1;--wp-admin-theme-color-darker-10--rgb: 0, 115, 161;--wp-admin-theme-color-darker-20: #006187;--wp-admin-theme-color-darker-20--rgb: 0, 97, 135;--wp-admin-border-width-focus: 2px}@media(-webkit-min-device-pixel-ratio: 2),(min-resolution: 192dpi){body.admin-color-light{--wp-admin-border-width-focus: 1.5px}}body.admin-color-modern{--wp-admin-theme-color: #3858e9;--wp-admin-theme-color--rgb: 56, 88, 233;--wp-admin-theme-color-darker-10: #2145e6;--wp-admin-theme-color-darker-10--rgb: 33, 69, 230;--wp-admin-theme-color-darker-20: #183ad6;--wp-admin-theme-color-darker-20--rgb: 24, 58, 214;--wp-admin-border-width-focus: 2px}@media(-webkit-min-device-pixel-ratio: 2),(min-resolution: 192dpi){body.admin-color-modern{--wp-admin-border-width-focus: 1.5px}}body.admin-color-blue{--wp-admin-theme-color: #096484;--wp-admin-theme-color--rgb: 9, 100, 132;--wp-admin-theme-color-darker-10: #07526c;--wp-admin-theme-color-darker-10--rgb: 7, 82, 108;--wp-admin-theme-color-darker-20: #064054;--wp-admin-theme-color-darker-20--rgb: 6, 64, 84;--wp-admin-border-width-focus: 2px}@media(-webkit-min-device-pixel-ratio: 2),(min-resolution: 192dpi){body.admin-color-blue{--wp-admin-border-width-focus: 1.5px}}body.admin-color-coffee{--wp-admin-theme-color: #46403c;--wp-admin-theme-color--rgb: 70, 64, 60;--wp-admin-theme-color-darker-10: #383330;--wp-admin-theme-color-darker-10--rgb: 56, 51, 48;--wp-admin-theme-color-darker-20: #2b2724;--wp-admin-theme-color-darker-20--rgb: 43, 39, 36;--wp-admin-border-width-focus: 2px}@media(-webkit-min-device-pixel-ratio: 2),(min-resolution: 192dpi){body.admin-color-coffee{--wp-admin-border-width-focus: 1.5px}}body.admin-color-ectoplasm{--wp-admin-theme-color: #523f6d;--wp-admin-theme-color--rgb: 82, 63, 109;--wp-admin-theme-color-darker-10: #46365d;--wp-admin-theme-color-darker-10--rgb: 70, 54, 93;--wp-admin-theme-color-darker-20: #3a2c4d;--wp-admin-theme-color-darker-20--rgb: 58, 44, 77;--wp-admin-border-width-focus: 2px}@media(-webkit-min-device-pixel-ratio: 2),(min-resolution: 192dpi){body.admin-color-ectoplasm{--wp-admin-border-width-focus: 1.5px}}body.admin-color-midnight{--wp-admin-theme-color: #e14d43;--wp-admin-theme-color--rgb: 225, 77, 67;--wp-admin-theme-color-darker-10: #dd382d;--wp-admin-theme-color-darker-10--rgb: 221, 56, 45;--wp-admin-theme-color-darker-20: #d02c21;--wp-admin-theme-color-darker-20--rgb: 208, 44, 33;--wp-admin-border-width-focus: 2px}@media(-webkit-min-device-pixel-ratio: 2),(min-resolution: 192dpi){body.admin-color-midnight{--wp-admin-border-width-focus: 1.5px}}body.admin-color-ocean{--wp-admin-theme-color: #627c83;--wp-admin-theme-color--rgb: 98, 124, 131;--wp-admin-theme-color-darker-10: #576e74;--wp-admin-theme-color-darker-10--rgb: 87, 110, 116;--wp-admin-theme-color-darker-20: #4c6066;--wp-admin-theme-color-darker-20--rgb: 76, 96, 102;--wp-admin-border-width-focus: 2px}@media(-webkit-min-device-pixel-ratio: 2),(min-resolution: 192dpi){body.admin-color-ocean{--wp-admin-border-width-focus: 1.5px}}body.admin-color-sunrise{--wp-admin-theme-color: #dd823b;--wp-admin-theme-color--rgb: 221, 130, 59;--wp-admin-theme-color-darker-10: #d97426;--wp-admin-theme-color-darker-10--rgb: 217, 116, 38;--wp-admin-theme-color-darker-20: #c36922;--wp-admin-theme-color-darker-20--rgb: 195, 105, 34;--wp-admin-border-width-focus: 2px}@media(-webkit-min-device-pixel-ratio: 2),(min-resolution: 192dpi){body.admin-color-sunrise{--wp-admin-border-width-focus: 1.5px}}body.admin-color-fresh{--wp-admin-theme-color: #2271b1;--wp-admin-theme-color--rgb: 34, 113, 177;--wp-admin-theme-color-darker-10: #1e639c;--wp-admin-theme-color-darker-10--rgb: 30, 99, 156;--wp-admin-theme-color-darker-20: #1a5686;--wp-admin-theme-color-darker-20--rgb: 26, 86, 134;--wp-admin-border-width-focus: 2px}@media(-webkit-min-device-pixel-ratio: 2),(min-resolution: 192dpi){body.admin-color-fresh{--wp-admin-border-width-focus: 1.5px}}.simpay-notifications-body-locked{overflow:hidden}.simpay-notifications-body-locked ul#adminmenu a.wp-has-current-submenu:after,.simpay-notifications-body-locked ul#adminmenu>li.current>a.current:after{border-right-color:#797979}.simpay-notifications-panel{background-color:#fff;height:100%;width:100%;max-width:570px;position:fixed;z-index:1053;top:0;right:0;bottom:0;overflow-x:hidden;transition:.5s;transform:translateX(0%)}.admin-bar .simpay-notifications-panel{height:calc(100% - 46px);top:46px}@media(min-width: 782px){.admin-bar .simpay-notifications-panel{height:calc(100% - 32px);top:32px}}.simpay-notifications-panel__header{font-size:15px;font-weight:bold;padding:12px 24px;background-color:#007cba;background-color:var(--wp-admin-theme-color);position:sticky;top:0;z-index:2;display:flex;align-items:center;justify-content:space-between}.simpay-notifications-panel__header,.simpay-notifications-panel__header .components-button{color:#fff}.simpay-notifications-panel__header:focus,.simpay-notifications-panel__header .components-button:focus{box-shadow:0 0 0 var(--wp-admin-border-width-focus) rgba(255,255,255,.2)}.simpay-notifications-panel__loading,.simpay-notifications-panel__none{padding:24px}.simpay-notifications-panel__none{font-size:16px;color:#757575}.simpay-notifications-backdrop{position:fixed;z-index:1052;top:0;right:0;bottom:0;left:0;background-color:#000;border:0;box-shadow:none;-webkit-appearance:none;-moz-appearance:none;appearance:none;opacity:.5;transition:.5s}@media(min-width: 782px){.simpay-notifications-backdrop,.folded .simpay-notifications-backdrop,.auto-fold.folded .simpay-notifications-backdrop{left:36px}}@media(min-width: 960px){.auto-fold .simpay-notifications-backdrop{left:160px}}.simpay-notifications-notification{display:flex;gap:12px;margin-bottom:24px;padding:24px}.simpay-notifications-notification:last-child{margin-bottom:0}.simpay-notifications-notification__icon{margin-top:2px}.simpay-notifications-notification__icon-success{color:#4ab866}.simpay-notifications-notification__icon-info{color:#005ae0}.simpay-notifications-notification__icon-warning{color:#f0b849}.simpay-notifications-notification__icon-error{color:#cc1818}.simpay-notifications-notification__body{flex:1}.simpay-notifications-notification__header{display:flex;align-items:flex-start;justify-content:space-between;gap:5px;margin:1px 0 7px}.simpay-notifications-notification__title{line-height:1.5;color:#1e1e1e;flex:1;font-size:16px;font-weight:600;margin:0 24px 0 0}.simpay-notifications-notification__date{color:#757575;font-size:12px;margin-top:3px}.simpay-notifications-notification__content p{margin:12px 0}.simpay-notifications-notification__actions{flex-wrap:wrap;display:flex;align-items:center;gap:12px;margin-top:12px}.simpay-notifications-notification__actions .components-button.is-link{color:#757575} diff --git a/includes/core/assets/css/simpay-admin-page-activity-reports.min.css b/includes/core/assets/css/simpay-admin-page-activity-reports.min.css index 9f084825..51866a0f 100644 --- a/includes/core/assets/css/simpay-admin-page-activity-reports.min.css +++ b/includes/core/assets/css/simpay-admin-page-activity-reports.min.css @@ -1 +1 @@ -body.admin-color-light{--wp-admin-theme-color: #0085ba;--wp-admin-theme-color--rgb: 0, 133, 186;--wp-admin-theme-color-darker-10: #0073a1;--wp-admin-theme-color-darker-10--rgb: 0, 115, 161;--wp-admin-theme-color-darker-20: #006187;--wp-admin-theme-color-darker-20--rgb: 0, 97, 135;--wp-admin-border-width-focus: 2px}@media(-webkit-min-device-pixel-ratio: 2),(min-resolution: 192dpi){body.admin-color-light{--wp-admin-border-width-focus: 1.5px}}body.admin-color-modern{--wp-admin-theme-color: #3858e9;--wp-admin-theme-color--rgb: 56, 88, 233;--wp-admin-theme-color-darker-10: #2145e6;--wp-admin-theme-color-darker-10--rgb: 33, 69, 230;--wp-admin-theme-color-darker-20: #183ad6;--wp-admin-theme-color-darker-20--rgb: 24, 58, 214;--wp-admin-border-width-focus: 2px}@media(-webkit-min-device-pixel-ratio: 2),(min-resolution: 192dpi){body.admin-color-modern{--wp-admin-border-width-focus: 1.5px}}body.admin-color-blue{--wp-admin-theme-color: #096484;--wp-admin-theme-color--rgb: 9, 100, 132;--wp-admin-theme-color-darker-10: #07526c;--wp-admin-theme-color-darker-10--rgb: 7, 82, 108;--wp-admin-theme-color-darker-20: #064054;--wp-admin-theme-color-darker-20--rgb: 6, 64, 84;--wp-admin-border-width-focus: 2px}@media(-webkit-min-device-pixel-ratio: 2),(min-resolution: 192dpi){body.admin-color-blue{--wp-admin-border-width-focus: 1.5px}}body.admin-color-coffee{--wp-admin-theme-color: #46403c;--wp-admin-theme-color--rgb: 70, 64, 60;--wp-admin-theme-color-darker-10: #383330;--wp-admin-theme-color-darker-10--rgb: 56, 51, 48;--wp-admin-theme-color-darker-20: #2b2724;--wp-admin-theme-color-darker-20--rgb: 43, 39, 36;--wp-admin-border-width-focus: 2px}@media(-webkit-min-device-pixel-ratio: 2),(min-resolution: 192dpi){body.admin-color-coffee{--wp-admin-border-width-focus: 1.5px}}body.admin-color-ectoplasm{--wp-admin-theme-color: #523f6d;--wp-admin-theme-color--rgb: 82, 63, 109;--wp-admin-theme-color-darker-10: #46365d;--wp-admin-theme-color-darker-10--rgb: 70, 54, 93;--wp-admin-theme-color-darker-20: #3a2c4d;--wp-admin-theme-color-darker-20--rgb: 58, 44, 77;--wp-admin-border-width-focus: 2px}@media(-webkit-min-device-pixel-ratio: 2),(min-resolution: 192dpi){body.admin-color-ectoplasm{--wp-admin-border-width-focus: 1.5px}}body.admin-color-midnight{--wp-admin-theme-color: #e14d43;--wp-admin-theme-color--rgb: 225, 77, 67;--wp-admin-theme-color-darker-10: #dd382d;--wp-admin-theme-color-darker-10--rgb: 221, 56, 45;--wp-admin-theme-color-darker-20: #d02c21;--wp-admin-theme-color-darker-20--rgb: 208, 44, 33;--wp-admin-border-width-focus: 2px}@media(-webkit-min-device-pixel-ratio: 2),(min-resolution: 192dpi){body.admin-color-midnight{--wp-admin-border-width-focus: 1.5px}}body.admin-color-ocean{--wp-admin-theme-color: #627c83;--wp-admin-theme-color--rgb: 98, 124, 131;--wp-admin-theme-color-darker-10: #576e74;--wp-admin-theme-color-darker-10--rgb: 87, 110, 116;--wp-admin-theme-color-darker-20: #4c6066;--wp-admin-theme-color-darker-20--rgb: 76, 96, 102;--wp-admin-border-width-focus: 2px}@media(-webkit-min-device-pixel-ratio: 2),(min-resolution: 192dpi){body.admin-color-ocean{--wp-admin-border-width-focus: 1.5px}}body.admin-color-sunrise{--wp-admin-theme-color: #dd823b;--wp-admin-theme-color--rgb: 221, 130, 59;--wp-admin-theme-color-darker-10: #d97426;--wp-admin-theme-color-darker-10--rgb: 217, 116, 38;--wp-admin-theme-color-darker-20: #c36922;--wp-admin-theme-color-darker-20--rgb: 195, 105, 34;--wp-admin-border-width-focus: 2px}@media(-webkit-min-device-pixel-ratio: 2),(min-resolution: 192dpi){body.admin-color-sunrise{--wp-admin-border-width-focus: 1.5px}}.simpay-activity-reports-stat__label{font-size:13px;color:#757575;display:block;margin-bottom:8px}.simpay-activity-reports-stat__value{font-size:28px;font-weight:bold;color:#1e1e1e;line-height:22px;display:flex;align-items:flex-end}.simpay-activity-reports-stat__delta{margin-left:8px}.simpay-activity-reports-badge{color:#2f2f2f;font-size:12px;font-weight:500;font-style:normal;line-height:1;padding:3px 6px;display:inline-flex;align-items:center;background:#f0f0f0;border-radius:100px}.simpay-activity-reports-badge.is-succeeded,.simpay-activity-reports-badge.is-positive{color:#006908;background-color:#d7f7c2}.simpay-activity-reports-badge.is-failed,.simpay-activity-reports-badge.is-negative{color:#b3093c;background-color:#ffe7f2}.simpay-activity-reports-data-bar__header{display:flex;justify-content:space-between;align-items:center;margin-bottom:12px}.simpay-activity-reports-data-bar__label{margin:0}.simpay-activity-reports-data-bar__legend{display:flex;align-items:center}.simpay-activity-reports-data-bar__legend-item{margin-left:16px}.simpay-activity-reports-data-bar__legend-item:before{content:"";width:9px;height:9px;background-color:currentColor;margin-right:5.3333333333px;display:inline-block;border-radius:50%}.simpay-activity-reports-data-bar__legend-item span{font-size:12px;font-weight:500;color:#2f2f2f}.simpay-activity-reports-data-bar__bar{display:flex;align-items:center;border-radius:4px;background:#ebebeb}.simpay-activity-reports-data-bar__bar,.simpay-activity-reports-data-bar__bar-item{height:26px}.simpay-activity-reports-data-bar__bar-item{border-radius:0}.simpay-activity-reports-data-bar__bar-item-none{color:#757575;font-size:12px;padding-left:8px}.simpay-activity-reports-data-bar__bar,.simpay-activity-reports-data-bar__bar-item:only-child{border-radius:4px}.simpay-activity-reports-data-bar__bar-item:first-child:not(:only-child){border-radius:0;border-top-left-radius:4px;border-bottom-left-radius:4px}.simpay-activity-reports-data-bar__bar-item:last-child:not(:only-child){border-radius:0;border-top-right-radius:4px;border-bottom-right-radius:4px}.simpay-activity-reports-data-bar__bar-item:focus:not(:disabled),.simpay-activity-reports-data-bar__bar-item:hover{transform:scale(1.1);box-shadow:0 0 0 2px #fff,rgba(0,0,0,.4) 0 0 5px;z-index:2}.simpay-activity-reports-config{margin-left:10px}.simpay-activity-reports-config .components-popover__content{padding:12px;min-width:250px}.simpay-activity-reports{max-width:1280px;margin:10px auto 0;display:grid;grid-template-columns:repeat(5, 1fr);grid-column-gap:20px;grid-row-gap:20px}.simpay-activity-reports-card-title{font-size:18px;margin:0;padding:0}.simpay-activity-reports-card-title-link.components-button.is-link.is-small{font-size:13px;height:auto;line-height:normal;text-decoration:none}.simpay-activity-reports .components-card__divider,.simpay-activity-reports .components-card-divider{margin:20px 0}.simpay-activity-reports .components-card{position:relative}.simpay-activity-reports-card-today{grid-area:1/1/2/3}.simpay-activity-reports-card-today-stats{display:grid;grid-template-columns:1fr 1fr;grid-auto-rows:auto;row-gap:20px;-moz-column-gap:10px;column-gap:10px;padding-bottom:8px}.simpay-activity-reports-card-today-misc-title{font-size:13px;margin:0 0 8px}.simpay-activity-reports-card-today-forms__form{display:flex;justify-content:space-between;margin:8px 0}.simpay-activity-reports-card-today-tip{margin-top:16px;padding:16px;border-radius:4px;background:#fafafa}.simpay-activity-reports-card-today-tip strong{display:flex;align-items:center}.simpay-activity-reports-card-today-tip strong svg{width:16px;height:16px;margin-right:4px;fill:currentColor}.simpay-activity-reports-card-today-tip p{margin:8px 0 0}.simpay-activity-reports-card-latest{grid-area:1/3/2/6}.simpay-activity-reports-card-latest-payments{font-size:14px;width:100%}.simpay-activity-reports-card-latest-payment td{color:#1e1e1e;padding:6px 0;vertical-align:middle}.simpay-activity-reports-card-latest-payment__email a{color:initial;text-decoration:none}.simpay-activity-reports-card-latest-payment__amount{font-weight:500}.simpay-activity-reports-card-latest-payment__type>span,.simpay-activity-reports-card-latest-payment__type svg{width:16px;height:16px;border-radius:2px;display:inline-block}.simpay-activity-reports-card-latest-payment__type span{vertical-align:middle}.simpay-activity-reports-card-latest-payment__date{font-size:13px;text-align:right}.simpay-activity-reports-card-reports{grid-area:2/1/3/6}.simpay-activity-reports-card-reports-header{justify-content:flex-start;align-items:center;position:sticky;top:0;background:#fff;box-shadow:0 1px 2px rgba(0,0,0,.05);border-bottom-color:#c7c7c7;z-index:2}.admin-bar .simpay-activity-reports-card-reports-header{top:32px}@media screen and (max-width: 782px){.admin-bar .simpay-activity-reports-card-reports-header{top:46px}}.simpay-activity-reports-card-reports-header>*{margin-right:8px}.simpay-activity-reports-card-reports-header .components-base-control__field{margin-bottom:0}.simpay-activity-reports-card-reports-date-range{display:flex;align-items:center}.simpay-activity-reports-card-reports-date-range>:first-child{margin-right:8px}.simpay-activity-reports-card-reports-date-range .components-button.is-secondary{font-size:13px;height:30px;line-height:30px}.simpay-activity-reports-card-reports-payment-breakdown{display:grid;grid-template-columns:repeat(2, 1fr);grid-auto-rows:auto;grid-column-gap:40px;grid-row-gap:20px}.simpay-activity-reports-card-reports .components-card__body{padding:24px}.simpay-activity-reports-card-reports-report-title{margin-bottom:16px;display:flex;align-items:center}.simpay-activity-reports-card-reports-report-title>*{margin-right:8px}.simpay-activity-reports-card-reports-report-title h3{margin-top:0;margin-bottom:0;line-height:1.25}.simpay-activity-reports-card-reports-report-title h3 em{font-style:normal;font-weight:normal} +body.admin-color-light{--wp-admin-theme-color: #0085ba;--wp-admin-theme-color--rgb: 0, 133, 186;--wp-admin-theme-color-darker-10: #0073a1;--wp-admin-theme-color-darker-10--rgb: 0, 115, 161;--wp-admin-theme-color-darker-20: #006187;--wp-admin-theme-color-darker-20--rgb: 0, 97, 135;--wp-admin-border-width-focus: 2px}@media(-webkit-min-device-pixel-ratio: 2),(min-resolution: 192dpi){body.admin-color-light{--wp-admin-border-width-focus: 1.5px}}body.admin-color-modern{--wp-admin-theme-color: #3858e9;--wp-admin-theme-color--rgb: 56, 88, 233;--wp-admin-theme-color-darker-10: #2145e6;--wp-admin-theme-color-darker-10--rgb: 33, 69, 230;--wp-admin-theme-color-darker-20: #183ad6;--wp-admin-theme-color-darker-20--rgb: 24, 58, 214;--wp-admin-border-width-focus: 2px}@media(-webkit-min-device-pixel-ratio: 2),(min-resolution: 192dpi){body.admin-color-modern{--wp-admin-border-width-focus: 1.5px}}body.admin-color-blue{--wp-admin-theme-color: #096484;--wp-admin-theme-color--rgb: 9, 100, 132;--wp-admin-theme-color-darker-10: #07526c;--wp-admin-theme-color-darker-10--rgb: 7, 82, 108;--wp-admin-theme-color-darker-20: #064054;--wp-admin-theme-color-darker-20--rgb: 6, 64, 84;--wp-admin-border-width-focus: 2px}@media(-webkit-min-device-pixel-ratio: 2),(min-resolution: 192dpi){body.admin-color-blue{--wp-admin-border-width-focus: 1.5px}}body.admin-color-coffee{--wp-admin-theme-color: #46403c;--wp-admin-theme-color--rgb: 70, 64, 60;--wp-admin-theme-color-darker-10: #383330;--wp-admin-theme-color-darker-10--rgb: 56, 51, 48;--wp-admin-theme-color-darker-20: #2b2724;--wp-admin-theme-color-darker-20--rgb: 43, 39, 36;--wp-admin-border-width-focus: 2px}@media(-webkit-min-device-pixel-ratio: 2),(min-resolution: 192dpi){body.admin-color-coffee{--wp-admin-border-width-focus: 1.5px}}body.admin-color-ectoplasm{--wp-admin-theme-color: #523f6d;--wp-admin-theme-color--rgb: 82, 63, 109;--wp-admin-theme-color-darker-10: #46365d;--wp-admin-theme-color-darker-10--rgb: 70, 54, 93;--wp-admin-theme-color-darker-20: #3a2c4d;--wp-admin-theme-color-darker-20--rgb: 58, 44, 77;--wp-admin-border-width-focus: 2px}@media(-webkit-min-device-pixel-ratio: 2),(min-resolution: 192dpi){body.admin-color-ectoplasm{--wp-admin-border-width-focus: 1.5px}}body.admin-color-midnight{--wp-admin-theme-color: #e14d43;--wp-admin-theme-color--rgb: 225, 77, 67;--wp-admin-theme-color-darker-10: #dd382d;--wp-admin-theme-color-darker-10--rgb: 221, 56, 45;--wp-admin-theme-color-darker-20: #d02c21;--wp-admin-theme-color-darker-20--rgb: 208, 44, 33;--wp-admin-border-width-focus: 2px}@media(-webkit-min-device-pixel-ratio: 2),(min-resolution: 192dpi){body.admin-color-midnight{--wp-admin-border-width-focus: 1.5px}}body.admin-color-ocean{--wp-admin-theme-color: #627c83;--wp-admin-theme-color--rgb: 98, 124, 131;--wp-admin-theme-color-darker-10: #576e74;--wp-admin-theme-color-darker-10--rgb: 87, 110, 116;--wp-admin-theme-color-darker-20: #4c6066;--wp-admin-theme-color-darker-20--rgb: 76, 96, 102;--wp-admin-border-width-focus: 2px}@media(-webkit-min-device-pixel-ratio: 2),(min-resolution: 192dpi){body.admin-color-ocean{--wp-admin-border-width-focus: 1.5px}}body.admin-color-sunrise{--wp-admin-theme-color: #dd823b;--wp-admin-theme-color--rgb: 221, 130, 59;--wp-admin-theme-color-darker-10: #d97426;--wp-admin-theme-color-darker-10--rgb: 217, 116, 38;--wp-admin-theme-color-darker-20: #c36922;--wp-admin-theme-color-darker-20--rgb: 195, 105, 34;--wp-admin-border-width-focus: 2px}@media(-webkit-min-device-pixel-ratio: 2),(min-resolution: 192dpi){body.admin-color-sunrise{--wp-admin-border-width-focus: 1.5px}}body.admin-color-fresh{--wp-admin-theme-color: #2271b1;--wp-admin-theme-color--rgb: 34, 113, 177;--wp-admin-theme-color-darker-10: #1e639c;--wp-admin-theme-color-darker-10--rgb: 30, 99, 156;--wp-admin-theme-color-darker-20: #1a5686;--wp-admin-theme-color-darker-20--rgb: 26, 86, 134;--wp-admin-border-width-focus: 2px}@media(-webkit-min-device-pixel-ratio: 2),(min-resolution: 192dpi){body.admin-color-fresh{--wp-admin-border-width-focus: 1.5px}}.simpay-activity-reports-stat__label{font-size:13px;color:#757575;display:block;margin-bottom:8px}.simpay-activity-reports-stat__value{font-size:28px;font-weight:bold;color:#1e1e1e;line-height:22px;display:flex;align-items:flex-end}.simpay-activity-reports-stat__delta{margin-left:8px}.simpay-activity-reports-badge{color:#2f2f2f;font-size:12px;font-weight:500;font-style:normal;line-height:1;padding:3px 6px;display:inline-flex;align-items:center;background:#f0f0f0;border-radius:100px}.simpay-activity-reports-badge.is-succeeded,.simpay-activity-reports-badge.is-positive{color:#006908;background-color:#d7f7c2}.simpay-activity-reports-badge.is-failed,.simpay-activity-reports-badge.is-negative{color:#b3093c;background-color:#ffe7f2}.simpay-activity-reports-data-bar__header{display:flex;justify-content:space-between;align-items:center;margin-bottom:12px}.simpay-activity-reports-data-bar__label{margin:0}.simpay-activity-reports-data-bar__legend{display:flex;align-items:center}.simpay-activity-reports-data-bar__legend-item{margin-left:16px}.simpay-activity-reports-data-bar__legend-item:before{content:"";width:9px;height:9px;background-color:currentColor;margin-right:5.3333333333px;display:inline-block;border-radius:50%}.simpay-activity-reports-data-bar__legend-item span{font-size:12px;font-weight:500;color:#2f2f2f}.simpay-activity-reports-data-bar__bar{display:flex;align-items:center;border-radius:4px;background:#ebebeb}.simpay-activity-reports-data-bar__bar,.simpay-activity-reports-data-bar__bar-item{height:26px}.simpay-activity-reports-data-bar__bar-item{border-radius:0}.simpay-activity-reports-data-bar__bar-item-none{color:#757575;font-size:12px;padding-left:8px}.simpay-activity-reports-data-bar__bar,.simpay-activity-reports-data-bar__bar-item:only-child{border-radius:4px}.simpay-activity-reports-data-bar__bar-item:first-child:not(:only-child){border-radius:0;border-top-left-radius:4px;border-bottom-left-radius:4px}.simpay-activity-reports-data-bar__bar-item:last-child:not(:only-child){border-radius:0;border-top-right-radius:4px;border-bottom-right-radius:4px}.simpay-activity-reports-data-bar__bar-item:focus:not(:disabled),.simpay-activity-reports-data-bar__bar-item:hover{transform:scale(1.1);box-shadow:0 0 0 2px #fff,rgba(0,0,0,.4) 0 0 5px;z-index:2}.simpay-activity-reports-config{margin-left:10px}.simpay-activity-reports-config .components-popover__content{padding:12px;min-width:250px}.simpay-activity-reports{max-width:1280px;margin:10px auto 0;display:grid;grid-template-columns:repeat(5, 1fr);grid-column-gap:20px;grid-row-gap:20px}.simpay-activity-reports-card-title{font-size:18px;margin:0;padding:0}.simpay-activity-reports-card-title-link.components-button.is-link.is-small{font-size:13px;height:auto;line-height:normal;text-decoration:none}.simpay-activity-reports .components-card__divider,.simpay-activity-reports .components-card-divider{margin:20px 0}.simpay-activity-reports .components-card{position:relative}.simpay-activity-reports-card-today{grid-area:1/1/2/3}.simpay-activity-reports-card-today-stats{display:grid;grid-template-columns:1fr 1fr;grid-auto-rows:auto;row-gap:20px;-moz-column-gap:10px;column-gap:10px;padding-bottom:8px}.simpay-activity-reports-card-today-misc-title{font-size:13px;margin:0 0 8px}.simpay-activity-reports-card-today-forms__form{display:flex;justify-content:space-between;margin:8px 0}.simpay-activity-reports-card-today-tip{margin-top:16px;padding:16px;border-radius:4px;background:#fafafa}.simpay-activity-reports-card-today-tip strong{display:flex;align-items:center}.simpay-activity-reports-card-today-tip strong svg{width:16px;height:16px;margin-right:4px;fill:currentColor}.simpay-activity-reports-card-today-tip p{margin:8px 0 0}.simpay-activity-reports-card-latest{grid-area:1/3/2/6}.simpay-activity-reports-card-latest-payments{font-size:14px;width:100%}.simpay-activity-reports-card-latest-payment td{color:#1e1e1e;padding:6px 0;vertical-align:middle}.simpay-activity-reports-card-latest-payment__email a{color:initial;text-decoration:none}.simpay-activity-reports-card-latest-payment__amount{font-weight:500}.simpay-activity-reports-card-latest-payment__type>span,.simpay-activity-reports-card-latest-payment__type svg{width:16px;height:16px;border-radius:2px;display:inline-block}.simpay-activity-reports-card-latest-payment__type span{vertical-align:middle}.simpay-activity-reports-card-latest-payment__date{font-size:13px;text-align:right}.simpay-activity-reports-card-reports{grid-area:2/1/3/6}.simpay-activity-reports-card-reports-header{justify-content:flex-start;align-items:center;position:sticky;top:0;background:#fff;box-shadow:0 1px 2px rgba(0,0,0,.05);border-bottom-color:#c7c7c7;z-index:2}.admin-bar .simpay-activity-reports-card-reports-header{top:32px}@media screen and (max-width: 782px){.admin-bar .simpay-activity-reports-card-reports-header{top:46px}}.simpay-activity-reports-card-reports-header>*{margin-right:8px}.simpay-activity-reports-card-reports-header .components-base-control__field{margin-bottom:0}.simpay-activity-reports-card-reports-date-range{display:flex;align-items:center}.simpay-activity-reports-card-reports-date-range>:first-child{margin-right:8px}.simpay-activity-reports-card-reports-date-range .components-button.is-secondary{font-size:13px;height:30px;line-height:30px}.simpay-activity-reports-card-reports-payment-breakdown{display:grid;grid-template-columns:repeat(2, 1fr);grid-auto-rows:auto;grid-column-gap:40px;grid-row-gap:20px}.simpay-activity-reports-card-reports .components-card__body{padding:24px}.simpay-activity-reports-card-reports-report-title{margin-bottom:16px;display:flex;align-items:center}.simpay-activity-reports-card-reports-report-title>*{margin-right:8px}.simpay-activity-reports-card-reports-report-title h3{margin-top:0;margin-bottom:0;line-height:1.25}.simpay-activity-reports-card-reports-report-title h3 em{font-style:normal;font-weight:normal} diff --git a/includes/core/assets/css/simpay-admin-page-setup-wizard.min.css b/includes/core/assets/css/simpay-admin-page-setup-wizard.min.css index c2d77d40..a8bf441c 100644 --- a/includes/core/assets/css/simpay-admin-page-setup-wizard.min.css +++ b/includes/core/assets/css/simpay-admin-page-setup-wizard.min.css @@ -1 +1 @@ -body.admin-color-light{--wp-admin-theme-color: #0085ba;--wp-admin-theme-color--rgb: 0, 133, 186;--wp-admin-theme-color-darker-10: #0073a1;--wp-admin-theme-color-darker-10--rgb: 0, 115, 161;--wp-admin-theme-color-darker-20: #006187;--wp-admin-theme-color-darker-20--rgb: 0, 97, 135;--wp-admin-border-width-focus: 2px}@media(-webkit-min-device-pixel-ratio: 2),(min-resolution: 192dpi){body.admin-color-light{--wp-admin-border-width-focus: 1.5px}}body.admin-color-modern{--wp-admin-theme-color: #3858e9;--wp-admin-theme-color--rgb: 56, 88, 233;--wp-admin-theme-color-darker-10: #2145e6;--wp-admin-theme-color-darker-10--rgb: 33, 69, 230;--wp-admin-theme-color-darker-20: #183ad6;--wp-admin-theme-color-darker-20--rgb: 24, 58, 214;--wp-admin-border-width-focus: 2px}@media(-webkit-min-device-pixel-ratio: 2),(min-resolution: 192dpi){body.admin-color-modern{--wp-admin-border-width-focus: 1.5px}}body.admin-color-blue{--wp-admin-theme-color: #096484;--wp-admin-theme-color--rgb: 9, 100, 132;--wp-admin-theme-color-darker-10: #07526c;--wp-admin-theme-color-darker-10--rgb: 7, 82, 108;--wp-admin-theme-color-darker-20: #064054;--wp-admin-theme-color-darker-20--rgb: 6, 64, 84;--wp-admin-border-width-focus: 2px}@media(-webkit-min-device-pixel-ratio: 2),(min-resolution: 192dpi){body.admin-color-blue{--wp-admin-border-width-focus: 1.5px}}body.admin-color-coffee{--wp-admin-theme-color: #46403c;--wp-admin-theme-color--rgb: 70, 64, 60;--wp-admin-theme-color-darker-10: #383330;--wp-admin-theme-color-darker-10--rgb: 56, 51, 48;--wp-admin-theme-color-darker-20: #2b2724;--wp-admin-theme-color-darker-20--rgb: 43, 39, 36;--wp-admin-border-width-focus: 2px}@media(-webkit-min-device-pixel-ratio: 2),(min-resolution: 192dpi){body.admin-color-coffee{--wp-admin-border-width-focus: 1.5px}}body.admin-color-ectoplasm{--wp-admin-theme-color: #523f6d;--wp-admin-theme-color--rgb: 82, 63, 109;--wp-admin-theme-color-darker-10: #46365d;--wp-admin-theme-color-darker-10--rgb: 70, 54, 93;--wp-admin-theme-color-darker-20: #3a2c4d;--wp-admin-theme-color-darker-20--rgb: 58, 44, 77;--wp-admin-border-width-focus: 2px}@media(-webkit-min-device-pixel-ratio: 2),(min-resolution: 192dpi){body.admin-color-ectoplasm{--wp-admin-border-width-focus: 1.5px}}body.admin-color-midnight{--wp-admin-theme-color: #e14d43;--wp-admin-theme-color--rgb: 225, 77, 67;--wp-admin-theme-color-darker-10: #dd382d;--wp-admin-theme-color-darker-10--rgb: 221, 56, 45;--wp-admin-theme-color-darker-20: #d02c21;--wp-admin-theme-color-darker-20--rgb: 208, 44, 33;--wp-admin-border-width-focus: 2px}@media(-webkit-min-device-pixel-ratio: 2),(min-resolution: 192dpi){body.admin-color-midnight{--wp-admin-border-width-focus: 1.5px}}body.admin-color-ocean{--wp-admin-theme-color: #627c83;--wp-admin-theme-color--rgb: 98, 124, 131;--wp-admin-theme-color-darker-10: #576e74;--wp-admin-theme-color-darker-10--rgb: 87, 110, 116;--wp-admin-theme-color-darker-20: #4c6066;--wp-admin-theme-color-darker-20--rgb: 76, 96, 102;--wp-admin-border-width-focus: 2px}@media(-webkit-min-device-pixel-ratio: 2),(min-resolution: 192dpi){body.admin-color-ocean{--wp-admin-border-width-focus: 1.5px}}body.admin-color-sunrise{--wp-admin-theme-color: #dd823b;--wp-admin-theme-color--rgb: 221, 130, 59;--wp-admin-theme-color-darker-10: #d97426;--wp-admin-theme-color-darker-10--rgb: 217, 116, 38;--wp-admin-theme-color-darker-20: #c36922;--wp-admin-theme-color-darker-20--rgb: 195, 105, 34;--wp-admin-border-width-focus: 2px}@media(-webkit-min-device-pixel-ratio: 2),(min-resolution: 192dpi){body.admin-color-sunrise{--wp-admin-border-width-focus: 1.5px}}.simpay-setup-wizard hr{margin:30px 0;width:100%;height:1px;background-color:#e2e4e7;border:0}.simpay-setup-wizard .components-base-control__label{font-weight:bold}.simpay-setup-wizard .components-base-control__help{color:#838383;font-style:normal;margin:0}.simpay-setup-wizard-toasts{position:fixed;left:0;bottom:20px;padding-left:16px;padding-right:16px;z-index:100001;width:auto;display:inline-block}.simpay-setup-wizard-subtle-link.is-link{color:rgba(0,0,0,.5)}.simpay-setup-wizard-large-input.is-error .components-text-control__input{border-color:red}.simpay-setup-wizard-large-input.is-error .components-base-control__help{color:red}.simpay-setup-wizard-large-input .components-text-control__input{font-size:18px !important;padding:15px !important}.simpay-setup-wizard-content-list{color:#555;display:flex;justify-content:space-between}.simpay-setup-wizard-content-list__content{width:55%}.simpay-setup-wizard-content-list__content p{font-size:15px;line-height:1.55;margin:0 0 20px}.simpay-setup-wizard-content-list__content p:last-child{margin-bottom:0}.simpay-setup-wizard-content-list__list{width:40%}.simpay-setup-wizard-check-list,.simpay-setup-wizard-bullet-list{margin:0;padding:0}.simpay-setup-wizard-check-list li,.simpay-setup-wizard-bullet-list li{color:#555;font-size:13px;font-weight:bold;line-height:24px;margin:0 0 5px;display:flex;align-items:center}.simpay-setup-wizard-check-list li svg,.simpay-setup-wizard-bullet-list li svg{fill:var(--wp-admin-theme-color);margin-right:5px}.simpay-setup-wizard-check-list{list-style:none}.simpay-setup-wizard-bullet-list{list-style:disc;list-style-position:inside}.simpay-setup-wizard-bullet-list li{display:list-item}.simpay-setup-wizard-toggle-list{margin:0;padding:0}.simpay-setup-wizard-toggle-list li{display:flex;align-items:flex-start;justify-content:space-between;margin-bottom:30px}.simpay-setup-wizard-toggle-list li:last-child{margin-bottom:0}.simpay-setup-wizard-toggle-list__child{border-left:1px solid #e2e4e7;padding-left:15px;margin-top:-15px}.simpay-setup-wizard-toggle-list h3{font-size:18px;color:#1e1e1e;margin:0}.simpay-setup-wizard-toggle-list p{color:rgba(0,0,0,.6);font-size:13px;margin:5px 0 0}.simpay-setup-wizard-toggle-list .components-form-toggle{margin-top:12px}.simpay-setup-wizard-welcome-step{text-align:center;max-width:600px;padding:80px 65px}.simpay-setup-wizard-welcome-step h1{line-height:1;margin:0}.simpay-setup-wizard-welcome-step p{color:rgba(0,0,0,.6);font-size:16px}.simpay-setup-wizard-welcome-step .components-button{margin-top:1.5rem}.simpay-setup-wizard-doc-suggestions{color:rgba(0,0,0,.6);display:flex;justify-content:space-between}.simpay-setup-wizard-doc-suggestions>div{flex:0 0 48%}.simpay-setup-wizard-doc-suggestions h3{font-size:16px;margin-top:0}.simpay-setup-wizard-doc-suggestions p{font-size:13px;line-height:1.5} +body.admin-color-light{--wp-admin-theme-color: #0085ba;--wp-admin-theme-color--rgb: 0, 133, 186;--wp-admin-theme-color-darker-10: #0073a1;--wp-admin-theme-color-darker-10--rgb: 0, 115, 161;--wp-admin-theme-color-darker-20: #006187;--wp-admin-theme-color-darker-20--rgb: 0, 97, 135;--wp-admin-border-width-focus: 2px}@media(-webkit-min-device-pixel-ratio: 2),(min-resolution: 192dpi){body.admin-color-light{--wp-admin-border-width-focus: 1.5px}}body.admin-color-modern{--wp-admin-theme-color: #3858e9;--wp-admin-theme-color--rgb: 56, 88, 233;--wp-admin-theme-color-darker-10: #2145e6;--wp-admin-theme-color-darker-10--rgb: 33, 69, 230;--wp-admin-theme-color-darker-20: #183ad6;--wp-admin-theme-color-darker-20--rgb: 24, 58, 214;--wp-admin-border-width-focus: 2px}@media(-webkit-min-device-pixel-ratio: 2),(min-resolution: 192dpi){body.admin-color-modern{--wp-admin-border-width-focus: 1.5px}}body.admin-color-blue{--wp-admin-theme-color: #096484;--wp-admin-theme-color--rgb: 9, 100, 132;--wp-admin-theme-color-darker-10: #07526c;--wp-admin-theme-color-darker-10--rgb: 7, 82, 108;--wp-admin-theme-color-darker-20: #064054;--wp-admin-theme-color-darker-20--rgb: 6, 64, 84;--wp-admin-border-width-focus: 2px}@media(-webkit-min-device-pixel-ratio: 2),(min-resolution: 192dpi){body.admin-color-blue{--wp-admin-border-width-focus: 1.5px}}body.admin-color-coffee{--wp-admin-theme-color: #46403c;--wp-admin-theme-color--rgb: 70, 64, 60;--wp-admin-theme-color-darker-10: #383330;--wp-admin-theme-color-darker-10--rgb: 56, 51, 48;--wp-admin-theme-color-darker-20: #2b2724;--wp-admin-theme-color-darker-20--rgb: 43, 39, 36;--wp-admin-border-width-focus: 2px}@media(-webkit-min-device-pixel-ratio: 2),(min-resolution: 192dpi){body.admin-color-coffee{--wp-admin-border-width-focus: 1.5px}}body.admin-color-ectoplasm{--wp-admin-theme-color: #523f6d;--wp-admin-theme-color--rgb: 82, 63, 109;--wp-admin-theme-color-darker-10: #46365d;--wp-admin-theme-color-darker-10--rgb: 70, 54, 93;--wp-admin-theme-color-darker-20: #3a2c4d;--wp-admin-theme-color-darker-20--rgb: 58, 44, 77;--wp-admin-border-width-focus: 2px}@media(-webkit-min-device-pixel-ratio: 2),(min-resolution: 192dpi){body.admin-color-ectoplasm{--wp-admin-border-width-focus: 1.5px}}body.admin-color-midnight{--wp-admin-theme-color: #e14d43;--wp-admin-theme-color--rgb: 225, 77, 67;--wp-admin-theme-color-darker-10: #dd382d;--wp-admin-theme-color-darker-10--rgb: 221, 56, 45;--wp-admin-theme-color-darker-20: #d02c21;--wp-admin-theme-color-darker-20--rgb: 208, 44, 33;--wp-admin-border-width-focus: 2px}@media(-webkit-min-device-pixel-ratio: 2),(min-resolution: 192dpi){body.admin-color-midnight{--wp-admin-border-width-focus: 1.5px}}body.admin-color-ocean{--wp-admin-theme-color: #627c83;--wp-admin-theme-color--rgb: 98, 124, 131;--wp-admin-theme-color-darker-10: #576e74;--wp-admin-theme-color-darker-10--rgb: 87, 110, 116;--wp-admin-theme-color-darker-20: #4c6066;--wp-admin-theme-color-darker-20--rgb: 76, 96, 102;--wp-admin-border-width-focus: 2px}@media(-webkit-min-device-pixel-ratio: 2),(min-resolution: 192dpi){body.admin-color-ocean{--wp-admin-border-width-focus: 1.5px}}body.admin-color-sunrise{--wp-admin-theme-color: #dd823b;--wp-admin-theme-color--rgb: 221, 130, 59;--wp-admin-theme-color-darker-10: #d97426;--wp-admin-theme-color-darker-10--rgb: 217, 116, 38;--wp-admin-theme-color-darker-20: #c36922;--wp-admin-theme-color-darker-20--rgb: 195, 105, 34;--wp-admin-border-width-focus: 2px}@media(-webkit-min-device-pixel-ratio: 2),(min-resolution: 192dpi){body.admin-color-sunrise{--wp-admin-border-width-focus: 1.5px}}body.admin-color-fresh{--wp-admin-theme-color: #2271b1;--wp-admin-theme-color--rgb: 34, 113, 177;--wp-admin-theme-color-darker-10: #1e639c;--wp-admin-theme-color-darker-10--rgb: 30, 99, 156;--wp-admin-theme-color-darker-20: #1a5686;--wp-admin-theme-color-darker-20--rgb: 26, 86, 134;--wp-admin-border-width-focus: 2px}@media(-webkit-min-device-pixel-ratio: 2),(min-resolution: 192dpi){body.admin-color-fresh{--wp-admin-border-width-focus: 1.5px}}.simpay-setup-wizard hr{margin:30px 0;width:100%;height:1px;background-color:#e2e4e7;border:0}.simpay-setup-wizard .components-base-control__label{font-weight:bold}.simpay-setup-wizard .components-base-control__help{color:#838383;font-style:normal;margin:0}.simpay-setup-wizard-toasts{position:fixed;left:0;bottom:20px;padding-left:16px;padding-right:16px;z-index:100001;width:auto;display:inline-block}.simpay-setup-wizard-subtle-link.is-link{color:rgba(0,0,0,.5)}.simpay-setup-wizard-large-input.is-error .components-text-control__input{border-color:red}.simpay-setup-wizard-large-input.is-error .components-base-control__help{color:red}.simpay-setup-wizard-large-input .components-text-control__input{font-size:18px !important;padding:15px !important}.simpay-setup-wizard-content-list{color:#555;display:flex;justify-content:space-between}.simpay-setup-wizard-content-list__content{width:55%}.simpay-setup-wizard-content-list__content p{font-size:15px;line-height:1.55;margin:0 0 20px}.simpay-setup-wizard-content-list__content p:last-child{margin-bottom:0}.simpay-setup-wizard-content-list__list{width:40%}.simpay-setup-wizard-check-list,.simpay-setup-wizard-bullet-list{margin:0;padding:0}.simpay-setup-wizard-check-list li,.simpay-setup-wizard-bullet-list li{color:#555;font-size:13px;font-weight:bold;line-height:24px;margin:0 0 5px;display:flex;align-items:center}.simpay-setup-wizard-check-list li svg,.simpay-setup-wizard-bullet-list li svg{fill:var(--wp-admin-theme-color);margin-right:5px}.simpay-setup-wizard-check-list{list-style:none}.simpay-setup-wizard-bullet-list{list-style:disc;list-style-position:inside}.simpay-setup-wizard-bullet-list li{display:list-item}.simpay-setup-wizard-toggle-list{margin:0;padding:0}.simpay-setup-wizard-toggle-list li{display:flex;align-items:flex-start;justify-content:space-between;margin-bottom:30px}.simpay-setup-wizard-toggle-list li:last-child{margin-bottom:0}.simpay-setup-wizard-toggle-list__child{border-left:1px solid #e2e4e7;padding-left:15px;margin-top:-15px}.simpay-setup-wizard-toggle-list h3{font-size:18px;color:#1e1e1e;margin:0}.simpay-setup-wizard-toggle-list p{color:rgba(0,0,0,.6);font-size:13px;margin:5px 0 0}.simpay-setup-wizard-toggle-list .components-form-toggle{margin-top:12px}.simpay-setup-wizard-welcome-step{text-align:center;max-width:600px;padding:80px 65px}.simpay-setup-wizard-welcome-step h1{line-height:1;margin:0}.simpay-setup-wizard-welcome-step p{color:rgba(0,0,0,.6);font-size:16px}.simpay-setup-wizard-welcome-step .components-button{margin-top:1.5rem}.simpay-setup-wizard-doc-suggestions{color:rgba(0,0,0,.6);display:flex;justify-content:space-between}.simpay-setup-wizard-doc-suggestions>div{flex:0 0 48%}.simpay-setup-wizard-doc-suggestions h3{font-size:16px;margin-top:0}.simpay-setup-wizard-doc-suggestions p{font-size:13px;line-height:1.5} diff --git a/includes/core/assets/images/about/plugin-charitable.png b/includes/core/assets/images/about/plugin-charitable.png new file mode 100644 index 0000000000000000000000000000000000000000..ec16b9e3f2d0fc98fa918b8f3f00b0bdbbe30b6c GIT binary patch literal 3323 zcmYjTc{mhm7bojjvW2olc4LUFS+g{@?1L;*gc#Y^GE8=|jjp|neKN$LOsFf_vxl-4 zSq68Mt;@_XGd|t>eb4i~&w0;#e!ufO@B2RIuk*y#+LV(`h>ebpj?>)C#Qy9o{JmKj z&OG~a!Y4X9dQsb3keg?aj8Z={((~W`Un7>PkrRu~|jo;t+=jqe4MWc|h&ZII; za;^C(g-m{7O4}SGRq9f{b15_hOy-;k;dXorN;lcQ7e0l5J}t~R3m+MrBT zk?U=!>x0K_u;Z3HCj%L@?JtxswI{<*kN=FI?Jk}4CLh1{qRe4wKj$f9MJHV`wEY$8 zY7b=sb=(n5S$KW&0YUxV$sC+0bJif02zzS>I`Sd&33Xq3d!2o!*95c#Ip3BM($b(m zH-1;^0$>*IJ%}op;4;RKtH(d`bE~LnE#}p`; znQ}K6^PXchW8tA^YJr~?h5BtuiK|{=(%m(n#>UQQ!p9ciGCbm$6)G>-O{VIEeYMs? z-|3a?!KU!YhmDif6+#q%sWbhFRZpP)n-U0c)c^u)T+v=`kCG#e z0Wr!oyGF9pj^p$8^2i}Cm0`Jx{>Bt|g4TQ8r#~Ver^myMymDPX`tds4AQxZrwU4UV zfp8HshFAETwm|`j@Koi+?0b%nAR)WCgR2pB3_;02bR@dJwJJU-p2aX6r9tZgwol>U zqKyw7Gfpf!-L54&?#1VBpu!{wYTZdjTI2EJ`@%l<`SMOLzeq4d-zb;_fQ=Ve_~VC& zsYyc~q*{t#tXF~9 zd!Zkem1X#D0ez;(`P@38u3Q5NLHKSYq2*U0G$}>|@R!6l%r)?OQS-63>WSNF&KTCX zAjXJxO}dSX&-ozQ^Syy8+)F!VILPQ5GUcc`csq#W?fQVuG}Ui{Nta`L{%&)dReBoh z;2SH|`<(eq#x@%#O_RGz_VdeX+K6j97WQT-16=Nom87=NH`0+pP<$_IZOHs}H=%w8@iS6K9EiH4@%T>C_I1<9p- zZS6d8sB>8t=`!?@vjtP}$6=T9!UQraSx%L>BWHn#W*5e*=X|8TO&-3H^c5}~Y|B19 zUT(cDBJR_|w-j_?Da)`ZYp9as@;yTB{YXE3!OclTf0|y&if_?4z4UYpVtoj6c(D{j zfQmx`DVR3l3P@P5#@+r!1{1+hFdDf#U(YTnh^{3CrHf%_UO!3gKMxj&v@sSDdYz*h z%W6?g37P$fwe#y)Z7sVw&3#*`Q;af#zHISBllYuHd^rV=V35oNelNU?{kD%Wjov<>+5P#h*S#wFy6%Bb`zvB3h>}{jXg(2jR2ljEyJ7e55(R3On_u}i z&0%DDO{a*SCA0-X1uv&(+l>`(yXfobUO2&~@yeRKz9TGA`Q?saLI31HG}w)Cw1w1H zF16A7#c5%!WaF;|gI7NWCSIX{8g@|jaHxO(bLtZ#G)b1BWS4nYco&82o|s-(SXE8r zC?9RaOZ7dATL1^2ZeB~)E88rO>A$DGyxmG(=n8fGoZJxp;JR6hEZ~;X7_%_zbEdN7 z&4aKQyrQxW%#ee5L>Ctzv73%)zM@}3e$oF+_pspZLd)H?XzQ|;WdT9$J^N}+T+mejsx7#^#b7ry&MufG zVH=gE(9lToEq~N~yX;%xASx)~Dq{3I@44FnI%QJrD{Nfqeq(Gj=!&n)gPjByPqKXG zQ}kPUo+Q!=o6VDr`j3mzV`BbRvHX%FfGL@MS%B_O9`~O&5!IuQ8%{HbN-{RRADZ~D zyRTFN(dRo^C)#k`NE#+^KnYyP;$ENJ1nbC4raP=1(u6|WWhT0K1EQCN-DJcsBn#It zdaHa5NlB~kqH+vAVpei_hp!@hZsN>@W!5mXLyTryaZpGL?gVyqP!F?q3mH$9tMWmy ze*}j2^3T{JlV->tVT_6it)cPmEuL3AFQ}L|mtZ zRuSikvHeKpS;F5_#R8SL!o>J_P|tL;lP-M>S68i9+`!4?TjuBxS?@~296YQ?8x0*p zpJEDNszrmjiwS9XhqXg?I>z@UIDri#PRvVRXhF|U(bPp~dsE<#UJ(-&_GzXly=&o4 zjY)q@fcucSndmT~(>O%VyLrQy}QI`N%DI6MnRc&7bLjr?7^XXAbd+FL?z6`2afweb z&}Dw1vK&phv(vJx@Xbf7St+txZKAG4GnW_=`=BguIyD*?bhzIscQY70Z19l9T61AC zLl{5gZ1J*W0#@Do#CEoOSf*|kE3!JKA8MP4J_)z9T_02`J}T!+CL!;%znz0y`{~iE zb6bw$Hr>^w8>aLXWLgJlm=>rzz4=8&3j{DZOl<621E3edRu^fKbwhjdvp!p0%k@To z@wAHm>WB82Q5v7PAWESI(`&W}6K7rb`a6}gCJd`>Q%>iTPW~2?eeIB4`nvNFxG}th z-)|{-;*!=m3*J_lF<1K~3$nFhXocE<>TE}ry+0CF$k)u3_?GMovZyaxDqSD0)gt)y z!Djd*__`xRtlhFbnl3idO#GsKl4puSnXEt1YhAb05!L6r;-SV__o}2o&5gq+=_w4Jcnvmu?%{HC=D*2p9AKQzOP;s5{u literal 0 HcmV?d00001 diff --git a/includes/core/assets/images/about/plugin-duplicator.png b/includes/core/assets/images/about/plugin-duplicator.png new file mode 100644 index 0000000000000000000000000000000000000000..e405e571b1ee7f1f05e3ec7a754252a70da99559 GIT binary patch literal 5151 zcmb7IX*iU9)F)d>5s6Yw^|UXR&=i^}S+h)$Y!5?a3r#2zGq;q8Gwo^g^ZQ+A`EsuF;XJuyYraW-hrEP@#3oA% z6FUhBN%%ioFSVvzEX!0|1Kms3S4`IsHdp;MJC9*nl-x>tc`mdM|0SH8fomEdbkRh^z1`9UN8zf-lsVFUQl2M$5 ztuTh$41~HG!FSLNc2mCShJCm`r54ldZ5IxkmI{7rv}!sk+>iI_*8n3qY5O}!;iKFJ zb8=p&Wu~}0omXFrx69an3V9blqBFktSq@=Dq?^wD9vAy4ezVc)wB8*L9?q`^P=Bmc z<9>S8=iOW)g&G-8x>h%!7U5I1aCrU0%h3e_`{q^b!pNQW;*K+Jo38vyxB;FE4EwCK zPSOMF+`F-|g%J%B(n1-y@7F`X==*hFl|ejPT^JJ-itW@9l#C!Lr(FC(w0yUVPKg+P zxvK8?*EeOsO^DI9LDj(>Uq~A8po#Yfpa4FxO$2O8Y%@mcP2G_)mpPnlxOW-QR&h3T zi2l+~^?g$Thf*;^KWYEG&RpL{+)hK>2B?3wOp0~hn}|2Hl3tgF8XGHm{%bhl8#ur9 z?gD!A@%`5E{gLf8keS=J#}_)Z3XjhFvmtU#yba}Jl5|9=TyBx>0ocm!`JK4qV_Xq- z1Lo>=Hsxcf_qcG!HaA_M@5#$G!cO8?=5=5=P8X!Zy=~yXC~rFqu0}dcAo;{KrdF;J zSvf7|dE2gK!Jm!1!-uVV)v*1ryhIZkA9|&&I=@8k)5x>Cp_KExJqDdaHvcTlOL=>u z)!}HmGb9|FF|{`uC%+Zj#~8-`S4}j@h!4Kxs3NPkFZ`_bqge?bF9TSJ5_q z>}kNnSPT_5w-^#3xq!x&(+V9~w@?QbejHvrsmU1*0wc`E*R4Kxkb56C)F{4pR<)+R z5pz;q?T1{6fnRbEis~VKUwg$f-d2U*DzlOlx=UIjW{g^$N_?t&Na{c7a?!J&OJk%n zqwv;Or?Spf4W0KTfN!tJ6PxqbNv|Hjd7ejz^V6}&ww2K)OhwrCAH9I?>ZW|;VT4Q* zhOViy)M~$cz8nwf$(MFZ$h2Y(QDg+)2A84+eL}AV^o3zp(_DcajNb7mAF!*H8X?_T zcbwx75pFWMV2V;aOM9B`q7faP=DxJ0W3^V@b4RVp# zPli^vG-RVC4EB`WR?+8U12fC*j<&uqZj%0S)&n_!ucWT`Op^?prT?SRkhO8_9E%!= z!H3L&o7n`Zm-e6+;48LOT6eqlC;09Sa4({2dE@R^JRMEGAWru_Td{;3{GL2Gg{{PN zCyXA?7GGoGWsa=SkRQcI|Ir%_jPZ1)iDurw5@aBM>z`mb zJoDkgip#&E?*p+UK{K6ysI!qIC>+LY;NIObzhnz<=c?WtVz>z|F`u6;*4ZOVPUhY3Faa@(*Nq>9J}wxlu9LSkenMXDtifzTE=4ni-+7k(#C_K{ zkhTx^#|E%UnzZbDpmq*Ey`PYcH*SRv0Rhg`SnSquN{%P-M2%I=G^v#=RDNpn|Y%t*L z(&ytWv@sQC5w74>MK@y^Z844p{zcHvK6j!gDQ!nz{>)N}zaQLNfHD6ZtJSWRV?&Hj zq$X^erfT&0sEg@SLN7mist1?)ejUiMnNyixeWow)n(9J9cbp@SX#n=Bq%;fe*WQdZ|~TxO;0 z*J|>KBrMmm0uPV40?qw&2Hl`7*y38gsmcxiZY5){nwPvL^?vN$exD|LoO8F{usO_^%to9K+7U=S}2(ZC!K1VVI z@9zZi_vR7j%3Ul(40eUti{S)ueK$hxv$FrZDVUSE#>tM zFL$~+-GkYJ%h9q_OjNu+ax#B$>w#f`CHKJWuQa&o>~rnxRRz*EqBO|?Y~fU&Pb!b0 zn&Gd;SfH_ejobNXN8PTO)&lkAqzk}CEE%H!LKZpT1F8io7MZ5*WJLff*kp_ng42&y zi?Nag?us?9rG6Jxnke{vqqO7k%m)r;V)p%d_hq|O=3QsVHzo)S*b z+2BampsTRjWp?ZgA1!pfEDA{O1p4+5peEl52HI~-qu*%lDLN5FHK#tqFK|?59pO&v zS$mHCye>EM$XdVjBSZuE+bL`sW*3NVXV7r%xUkz~>)DBqv4toH!Z1gK$4n%_LRmem+t&u0J3xVHa>Ms|5Xsz{7i}s z{1dI*Jx03A&t0*|SPK{#L|f(6 zY_qhpf|>=xt9z0{;-w1@i1kFtRIdsJ{8~e-4ES@u^XQ}LZVuXC6IvGbS+=Ch1lfNn zIqfIR&&cbriAxJ+F-Uz=W?vRHEb+SguC){+{Gox((xQbu1HHVs7bjU&DBK3O4zS5< z)3Qikj`%9^Gp>A_XJ?v40}A$`6d)mLErf|LYqP_Ea@|IdYJ%qEfZ4j%Z+K3poTynO zeCmB2@;?aGM`kj!NymY9QxwaSlmI1(^wo&$+(<{43d^0-+h{uFesib05I!erzMyX5}pm^YyJGA2BFd)%2bv5N4!I5K>lPdvd|RDgTo6W~J-+CISCEh^+u zBc9z_@8=GvScc%69`fo?S(vd?f>yye@(h$FT5E{BB9{T(soeGAlFw8Zqy%Zgy2N21 z8XG9tO7tic;g6Z2ULHe2WM(f|O%cl6E<;hrQc#AeZ^(sgf_cr`t`AWCCkt3MLp2}K z6Z9z4?k^yd_L*?c7+q_UMu;tu?_JY1%JH>XzBT5%p-aMno3OCX5fyAYCp9rhX>k9M zvGm4{Cz&EdES9+ow&bGtbBE$N_?`7yUE z`b*&#OQ}I0oj{B2<_e^m{9Vr2fzGDQW^}b`jrUhCVJH45F0C3mG27Vq{1#|WtdP^~8Y$jU!UR?cwbr{F=@A!$ zyRa9tN2f`Lw)CTGdc*R~t1U{Z>ynAz#K>4Y%Y4wa75Z@Teok0VIm{S(IPk$vR_yq> z0?zu?S*zJZp|PM@HrYei+%W|g1AVrQ)bgjAn{Sd_$%JRc$n2O|`0>o4eVW4GJ6Xu| z>Sen}GaIWXGeU~7r!D)rb$QUfGB)(n@&%1wdFzksmZDN7`k$gR8QFh6s3p%mBpiV< zFFg0zNj$?d9hc?ll6OCbg^TpyIqb|LnJqtYUQ*$Fw%Q4!o}{C+4&0uz0dE%@{Phg_ zY7dw8X_W#gc!N}X{C?U%?EU`RjVyYu7Ol?0x)9$c(b+5;{U2#7Ag`Xv(YsZIyJSsF zdg+3i2vT{JRyCGTsHJQ_r?#|;^3u&Z_(XOtfm_J4AtQ?Adws$xrwu7rm@A^i@64~I znb5vJ1eVo={)VNJQ~$9n9Om5N44e5+F_luo<%r`KrAaMbjeKw?c4B^HRMLm%XFrL8 zaY?+uzr}LlPj-v5-93EVB;VE}BMPCdP{zFeBjjhpasaWD(l|cDXx@0&CyNub)p&<^ z6We8C)@Y`7uYpR>NA*n2lXuzpN2L>fRKLyx-)%`l-0w${4`CnJiX--3xlDP0<9DBm z#&|E59Ff)+_{ZF~fp*D}`qo3&G9N$q&D#vF`YYdk@ZdeBTzk3ojblLW&xuT&jjY?1 zwuAq2d&%JJ08Oc(ToHh}WZbTCOq)}1iw`jU=2fAh2UcPQOC$L34688VWxQ`G3yS{rIQIhW_8*Zi&?fQsMVugfr{E zTvB>0<-*$gw>MIxpK^GqKyWS%8UB(N*u8S2yi)Mn@1Xy;67sHbK22shqB|Z7lirPY z43Oo=(Ql#!Hidgg_DAEGDQh(K-PcDHiY3a3zq%nXtGZr_pxPF`Jm&bsR>mC6?|k}+ zc_m~Z8VA2HR!(3#9t&cxx)_ud6)b-KekNkn*RH5Nky|3JM0#?=RNM2wnKOJ=O7iAh zbNV%MU7zHFg&@_Rt+Z@CTdI}U+gNYSd~Xz7XKIq}N4KhoQ=i32OGr?7>$vFjKY?GC Rt^PZ;S(@6Klp1?P{}0K85d{DM literal 0 HcmV?d00001 diff --git a/includes/core/assets/images/about/plugin-wpcode.png b/includes/core/assets/images/about/plugin-wpcode.png new file mode 100644 index 0000000000000000000000000000000000000000..92eac13b2431ad1236fe39f996159cc5a9e569d1 GIT binary patch literal 23059 zcmce;c|25Y7%+T{Ni#(;mXKwP8Oj!gh%y)qvPF?85y_s))@~#_8Br1vm8H!(wqg)k zRF-7l(n8rPMWuY#nV$Fk-ao#7-rx7V-}CF?+~>OQYrn4hy03GNSX*l|fmM>L5Cjo0 zr_**J2#$>YkK=_q2fnt(z^^T~I~`2mH*#qCf9s#92K7Cx5)9g9ZI5uMf^+SzIqIXt z@W5o-;+8vI=MZG?Idht!Ls`!Bq{ z(&NLPO~(;VbT?y%*4YM1*(aH!2xqI6(C*5q#4q!MO1F8DmlZAhes_u+y~@bqMOsRu z9CREIM}3t4K1=<+8j&*R&$`<3M+<{NqD9WHyC8kbx*6fH_LoUq*goGEC6BbOYjP;L z<(aS=$$UJxQAWFSC50DJlvni2S%^Y7x|7l_DSXFqNM;Wu-Tic@<|ZUC;Ha&hzRDpj zUc?0VH{%CbB3szy^%@x=WW#fc&cM=Y@A5eumFaV@Y3;9KgnIS<{${JhSJ#jYdqsq4 zSi~vxsi(LJ77;`TVJZp^F*w9kdo26iF#>X0^v~bJ^LIpGp- z8xm;W5WnW>LlPoxwRr!J%B{EynQIt+^qz?0wL|>h zNr+DVb-Z(3!Qldq?Eh+S^NabHB74?XP>*2qB|uD{YH5VvsfJYWr$&$iyZ!eSIy2v*xy~q>TVleDVHW)##R^ zfW(r~dAVt#)ePzF*q)l}XoiGO6sK&%AU8KC=#=7+!(Oe)dOd(o&|mhec9A^7S^wQ6 z%>>aI7W~?6hK%YQXMZ>G1&ppw#}36HoRS);`U`#@ScG15Mzpl#7Y@PiiU1zHEAp`t zJjjkhJ<1at5_tP`(xzuPWNvrGMnh91Tvo{nzZrw*_tl;sk7A1Rg&*!SzxgD#?_7mi zLrsrcRPF9jo(S2Bo#>=}?ZuBa03V`%xQKhoE%B8YM9up$VaXQ>50+^#kUNA$(!0lx z&zB+Lc>i6Ep*)E1p9I<|9^{hq&B#A?2$Ozoub`?L zoM2uQKy2GH9IO10@MCqy+79s|4nZ$8wpbvx9TejsNkl!GV)n2PL9~W8w;$j|Jii=$ zrY4L>Y`ZVJ?Ia@{hc{E|ECdNY^FiXADu(L+k-tO>aaGe>R_k}hhIihVaP>wwL3Lg4 zmxPd_fzEOGRrT)0O93RkBSp^$gUp?_d;0kz!bu6;)@O$a_r6!{o-Bcc(eVIlx8(k` z;{LS3YZH+00E=Rv7PKn@6f@8LnGnYRwUTG4EL72a6|aUM(j0bP#>{E?oNC~TAuriM z*3ZP0qVPKdZ?TnFMD2k|=mHkGKWk7kKtQVMbWdI*AmR;@Mo?6>JmD-U z(_EhLUG^ymlIfIItca*zrqnnA_MMls5hQJYKY}=jdGjK+KAn6>PO0xM45C!I*vCRR z;R>|^2=!0}K>%^kR_=hyB-!l*BztP;xzKra{uNYSHzQ*BuLs%!6CRi1Ju8zIZrr>l z(1$?^Ce)wNn zSE3Hofb7vU&%1HRL0DB9B`oY}-kI+?*#UoVD%M2{CIeL(UBv-!& zq1$|p2qE+eHD3g2_CE{Kwhrf30#&`#^+K^ZXo`(|~5tw_WFPjvsMPzNj5U{U(mpNviF zMt0@@hvogBbpLNJlUrjijZgJ$^n{8{3Sl&C%c<#Sa5FcoL=*+`@B7^;6^~~EJlDX@ zH$j$CH}sX@>hfL6n$0K3C^#t~c0AQ_1zbg)O)^$}DFsYhg*A7?v3Q9DVtqi2u(&Ql z;wk-nTc_EUhlcTZb4BN=hX!zy-0S>Sv#c3QB~zW=@ct@TGdeyk(^Q>w9g1b;vr00l6TFB!sJy8 z4vC{{UjVNvH5*f^cLPGa3hQMVCI(yASDW`b%8eM8t8~=dN_{-^o@>;@II3m1%hjW|B=^KXr0iM0WDy=j;)#1ZLl1PsJQl{= zrUm!q`mO_xc~7%%oem{lqKD_+{3v^1zh1IAnKQ{|U$$JiITpJiR+>@10^dNxIJ`?z z-7%;qXilb@&-A`MzfuZa6E|97@=+k!lFaG5e1bi8<&oYK^9{J%4bGCWMB=06ZpoFB zd|!_`*q-<}btC0kP;lipK02sFHn&GCYb#ZSg$&5-2(oE7!Am3H+dtb1pRmD`VzCp! zMX?X_u`C*9a9tgH(Z4cWpTy(5-{%-0yK*Y~|!stSCWrjJLRuWJR#@#Kzn_bej9%Y4HI^>4c@D zNAi`q^PUz)F{qN@@tzM<!mW&prWrHQoBK<PYx-e6ET-IPo%`F5&2 z(8?7=TG=KheHIeL@B`V>dL`yj8b<0%W!JDOdiDBOoXlW&BonTDHZy{%c@zkE+fPDP z`UG)McA-|roSh~=DC3o1M}UwZFd<_VmMVcxniR8A!MDj1TwDD*$dCl)66&*dqQP|Q zWyb|`OahsZ^OCSXjKX6|z!x84PlPH$Fjv?Il_;pQ=-~oo&GJ21gvg7bt)(odmkwARzd}v_f%T3N42Tw1KtU6@RZGm<3rZxsIm|P9fp3OB-Nh8v*XXt%J1h+ka_wE_~f^g zA}7A~GB@G)ua4q zF!W3Lz+BgT6UQoriG-Z4vfI6|)p7j3aL~Q%jG9(6YU;!tzHw%dw&$x~{+#CGq%Vbh z9l*l|ReH+mizqrZK&$yJii6|VaRgj|Gx?!S>am#!|8>I%#Sh7f|G&Q8!)^&#|^6iro8(jJ$X=*cJ=Q zXzRI{+r-R%aK(yKONv}~Dzt1sLGXgxqImI(k`6AxEraW(u=GFKu1wV{PYN1QIqRA&s9c%Ul> z^Zo(a#1{M{fT-^I0c(S2fwi~ZTP*~f`JEiF_1qK|%8M{lKsO~%7~)io29hi|Q2)gz1#Y?HiK@Ri;5S)=vn z_@@h?F`esuZ-ZSf?%3h$^2i35sBIH7m{9(`np6Jri`IBqsae$XSgg*?_&u+K2PXSW zcpmlOftsehW?t^5Z^dnP&-Qd2Z+Z`TwS=bpsd`#d^-SvPpAx(*r2go@f7ID z?F?Tg5k|K?@G_NNU*|SC&VS7xvvhFQC0QhriL6S(h<%EyUiMxn+D8fm(Vs{PO(cewFTR_cDcv*q}X2O4s!Z+ zPqL2rY1qgY02bTNB9ER_4Q%YWB(DTv_`1q;D5L{ zj>OZoS+^sPPiPf{BLcaOI);r%LtTOV4_1ET3rLg&-~J={D`Xe&jE; zz`|9Zg;XpLsn!lmI*)o5TDWdwAs?tS1D* zr$fPCs`DI96e}@1Xqe2O_5Dx!ryV{U%_h^<(xh=LE z1M%{uqCZBGq4LANM~MlQRp#Qp{T|aHO2NrF1o55Z@RH`=rn2M$><0oqaLPUSXe?lz z1{u^Z)5G!Z@piLSCs*RVZ3NfEVyoQS`EsKl%@DQLdO2W(A$3MY6HEnJB# z#O(f^#Ea55rylJ}<3Q2`XR37J#qU7H~L zrQ*EE!{q{kxFwgF1l1xelp*aCo0t8M=+VFPN~Uo(kaz-q*Y?K%YiED5EnEpKWT;i_ zKuAjef%OiUCa6-kp1=NZpzv1@Um8aR2xrGFS51*`&1x55Tc9Sjzh2V3kae@wQ7Vli zLgLA|sCu?6bd#=tv4*&*fNFt$|L~s&VumYIceyrl{+xM9AesD3)#xk)>Uy>z$t#Zc5|ulX&X-9254` zX61eW!^y{BaWV}3yDmye7DOm9Mki~=eJF0Vmn>XGAfw7Co0OF_-(1>-Z-aEu_$DBK z_1OSh{7&E}w9+0x?Q~l_Rv0g+$2?b`QT<@264Qyqb1?ez$?1?)N!T>>G*IXsf34f< zr6nj>5QsmMU`#EH7VZ0^rVU;L`Qb&=r`vF3R;d|HNG{$9`H5= zUxR8sMv8HI?;rjcU7< zBVw?{1CwSXL(0RFP_vB!SVIw$^}-sixp4Mb#kWkGd+_Vg@yp3_ZHI23j0+&~U=Caz zS)kvEv>-;&!(}guy1(r``1&A!8Wqn%PPoT!I(0h(gt!T2sNCy18jxRnV=WhUG_?5n z!y)UVBR6dEL6FOWDh4JUZ|~^558<>}St&XmyjFBxZdDo;j?OlfX$Rj1j5-8K*}s-P@tWyaa<^BBSlVjE$cIMwEu3O^5vI&0Eo(Zjr;J zhd(lKOen0)IvGuHz$gmiix*lgj`lU(vruB%$6|YXM91r*eWfgH@tKxnYUkviKKJ;& z^%WL5ke_l&ng_DgCW;IHjofO+0A_NVumRopZ*UIH1>|$AoRyfTNz9Xm?(vF)Q7(@6 zgw@tU2ViJA=<#ydk2B{jMyUV=1TIW_?UXbQoFd=fzmj%vF(Ci3oM0NYX48)uO1>L0Cf7@tFcx$AYmtj zy{C(L;DtCA$HU}RQSsW(EwTXJ9D`L*{v|fc&J%fm)gtFA-L*8EaVAN+#V*2v$fUcf zyT>n&Z}UrovmLV`?(B;X+XLcUz87Fm#$rDx)hurE^DCL!f6*f63f=Yo$0F9^#h)c$ zhAbFmUoX|I&Dyr9&=&uifKLc!Xl3iM`b^R|ld;$qB}oQ9WVv6#u@*V0bl0NXk&*|} z&sMKY<2;SU-u~sRHLT}gS5S!E2BU3z;@e704(JqM!7rm=<>{$?7cW?hKBi%eMYm@e zwTca_339+B!tnb;f%++rg=~XJi=1S->+Rf<=Bgp<7VsJk8fMG>J@K#Rqb)n8dzF~m zNKDqu9aC`We#Siqj6V${FFL)kZaQpx>oz5(Hb75?=t=91bStg__axwVI+SY?k5_id z_GEk6f-3~fu_T_;%U#E!-bEh`?UvqiwlisaVnhg^N2b!&b#jp7 zVzH|v7*b}SZpio|t7?MQeKRS7EJ`CWjdag()(%hK1QwxFH;+F#K3jLZ0ATtg<_^P) z3sR2;%wb)NF#dJ*eQ^W5IPmhF@`M6mO?KE~fMOb?X=}2r;>Q#9&#m(SNm&fGe{fGi zYZ5xhgMm0h$_fxD2;oz!KS&wjYqK08EL=5N)T{9fqyoB;VArufa*^7@Z6#}z35>v@Q*>rL222d4_ z!Dc|=7Y(zZ%=S8VK;vxaHeht|9EquLK-pxzHy1@9N7(SS_TXSBGiU!kC8lvKHV#V4 z^ql7#l$cv$u_yOACM*mY0(aSD!l=oJvgrg@T5(fyyFBXZzNnJyX_$u}{F}q3WRwgk zbNnpiyL)`YKM4seYP|2ud%s`pe-Do{s{O@dZftn=IAoMlKUv=&M2y|rclu+wx?tG4 z$O7QGH5N;k)za{d|CVh{nRBCIHs052-WcG360sxkG%gQs{mVw>ez=-NjX9ObS` z_CgEcr2m(SgQ)VR#y?bs+;#qqSknP?SY!c_l55T)xIAHbco z19rkK@9NV3G%Af#F`o_FH9!CP0C>kkQ~2eECa%jof%b8r z-%$xv37Pcpn-BiGPZz=`mzzoarh+~RG)(z=2LH->F!9Y8?2{8Ti5AozL{M$5Wm7=D z=h}Ugz;z^MQGzNP4K0wZ^4zZ@yr4i7PpPRy2r3#ig&v+jd8We$@+U*9ug~AD(*D)Q z`-CbU7S--S!CNg<{bUyMs71_xyBHcja|xT#YA}tO0X>x24ervwDHY1nYMWFyZh(FT z?j#vOZFk^4?6-wmo)vSmf|?*+J(wo3Ll?NHf^%tJi3!*FM^~|sEsWHXwV-(-wDQ{Y zo(0yyVvZ<@M?uCeYRDS(r&wrjgf{8UDJ+fD@C)J%riT1|8mS^t9gIYWIo}`k{XXMV zhN3&)ug@PcwYpm(~A@@a>-SGJ)_OgR!yrs`%Nh%6o!=gl-pU|B0o-JZ(| zG_nS)O(+gZ%1Otjl&Vx*$xx^a0<`Ihl{HR#lsPnJS-57?k;*L8)67XcE!LEllFgPBO(muTj3PWC z2)ExN$T(oSXqbe3mI;>cCDPitD8#E%#RK#nXaH@j)N%Ose>)%B;(~ z@L)CQW1aa(X!6f*M(0ilLEX-n-?1ql2vVD;L1YZw{ic z$E@97v8*}Gq4B&$jyCkmcUbb5HCLc`yudeBJo?=8?38rGS<6Cj&2-gVLVyD%6tV>> z{nrq%D3O38%-^n^E?>bN#0Y6J26wa3;D>AGX4$Nj)`Mzd%b^Tw7u99O`p&Tfre?Q^Wm?|+QxNl>U~Dy zmu;G8c|c-1IKF@tHn8HZB7v^u#a`So50J(X04+$4ANR7L6huPH=f+tdP)!TCYp)eq z(5D?W&Py0MS&@?`CFg^#sj_dwGEWk7XT4U-!VN7*A7a9Ik6-sS217o<_7eGshG8iT zg=`DThk4EF-*QZdE4^4O;gK&;7DPED z6L6YdY^NT%^8i{Oi^Xh5nUVsK3V`Mv-4}BsAU29G(uuF~TLK3*qLt0(80=U64AmWL z%u(h|$$}q?bO%FLLBeg^Ok(OhkQ_gQLkDUwIPV#M-B=P>-y?*-`LhUEx0tsth}=%Y zcn4^;d=vC)zaD|6siuAB&rWMG+E7gyoC*yZFcqX32C6*^%rPnE<_MFwB?&4Z|=(w=-3H z7|Hw_d4AReb^;8^>J-hZLm`suPR65FZ)$xScEAsv2jO7(H**bC86Y0y0hJS3{J!x# zpp$p8*vnPZkI$Ka^0%=#$=5Hr`IkWT6R87(*-Kx7Svdp;qib|mGjD&e<|?4mNyF&X zS+^{hTmZ!#A~B_JRDg3C0cM;qzHKphv&=fwKOw<*MnX`lSpeh-0e^QKISX>}+Y_7bs{R0*K<*R&^4minG!L@MnUmE?8O};zV}(EBeOo2OeI-A>*MnMA#vvvFp(W z@q7S;nXgRJE#^8IG|XzFOFjJu_f6dU^){To_Y2eT-PW1Ns@{O1YoEg$Eyn{+Dlf-No=)z#1GHi6~3$Ujw z4#r@Ao!XP|t$|Nz?0qgFN*F)CP#_+nr+S0nqP8**PIIRoNXfv{Buz8<1V>?fdFTW2 zv%9B-$_EAuM_$k{(-I61Qrc*#4UsT0bMKh=+kP5F2M3+t_WkYm-gNctk5C(0t}Ys{ zreR)C5>V(X19j6Twt9~RU!*S+OmU5KAzR+FpKv)5o64PXRRd(%BYN%{= zB{APvi#Dw-tZ;~^q_n}(sj_3@gZ-A2^k)*5!EuveQQcp~js2*~w3y?#DZuDroLgmAh*HDWCv+0CE~Q0G_4$4qiq0536w7(Q zXr8Olb%?mcfkW@Fnmzoru&?~JzXnI%H;nglipok2dq?5C>%U^iE>Sfl#7d9_%FX7yxM#I_Ja?KUrwF3P_NZVp%c5^yBGU& z2xo`1&&ObQi2}2tcKCDF*&0`AWWi6RC!Iv>@TNhY1bn2Dv&E2!<>W=S&x|7BNzf0r z@Vzw$@TDgNS=8GXcaN7FQWlfj$N<@|wT~8W5t!HM0LiOGtT1HWVvZtVOctE1^9dWk zr;Q%KyT@Wl5{#RJ4ayDq9&pgfyYxKi{ z_;){DwD#?~Xc4FrwwXoEyj{}#kuPo3=oYxjQJFhYB~VmcG5`;JE0U<1@xq9rvqCq6 zPJA)&X{=G)A)=!hdZ6BMFOvp>Oeo^}Ga;RSczDu@*ABmCxlMt9>zZeG@uj&M1i*PN zJ-7R7ogt+vIS2-qpMM&QT&Fa4>$5@@ooLz7o4Z0V&9&Zb8;hFy&AVHj9b-{Eq7ER7 zuHM|rtVOrk;bX#4H#Wo#o6dC@nSU_o-|?D91Rp!zrcpaE2 zrPOe;32IXFjG2(HcXJ4Lx2o8XlizLA8U(!*4;SxXQB!hDOqP>v@yo73ikWmG9T=$C z;}Bs*T|vVb2G}L>tLXp(IU3M>kzTt`Z8Gb=vB!UF+05VrXxhclP?-vgz9ex zsANI+>oO>$B~&s7dr)L(x?DPkz)uko#NX7hS~~!Tnka%2IL~Qof#pPWunh*F(*9qG z7V4?(hGfCF{wEjD##s~}s5(z4(tsa5Ut9bSOqw9xL#KKG?@~sPvdP#L8@11+-`wp12k< z0iSPHlrSG>fPrN1nl?iDxPQ&TSZwwYRO+9%2oIe=p6pp|EtUIU%_w0d@JK(@9B-_F zn2y_W?2>2BRqW6iAGLYlBD?dF?%}oV4Xqd@uiK^L-VZh_MNh&#cM$%vEZqj&` zg&a)-M{SPbT-`_^MEch`rgLU}W6^+4}TN!s%m0!gw+xcdhco z&z%&fRNHIx(M<`eHDS*m6ku5}BJRx-4h0@9C{9Luz;k;vegzK1&K6*8E;rIJT?wj^ zbq6CX<~%lnYJI%tFC3QRU+)m1Xt@_^mX8xn^}G9W2vb`&S(4SC_vYR@x^ox)FTZ0N z-8EytdiX;6O#;ox4$71(UgO1$+G#|B4*~DtGjA2T*NsMriHxIR%7B?^TAd5PLM+M2 z6O{h2eQrAe7D2;Y0_qHpwU_fJjLB0F)31(~9|h)?D>Q%oET;Eru&CLlM~njWzVIdz z2^IwW&1w_b9pVYzAlN0kYf=epr}UnCLbS%SvDi|Tj@IA{LNGB7Sg1CYZ4r~`z>#jK zusB$Er~_E{-Q;5;{}Axx6EQmil>NE@rUr3fU+(6|;z@Ls*b7^2QR2J1$!# zEf(tn?+V?Fblbq6XE%kDM>FJz6z6r+%B~*^nOe4scehsClnfM(Ik-ic&OI+ZLShDE z&-6UnlYT>JsdOrn?kZ~kbZn%stpm44Xf}(U1I_=-#uu~`+wYXZ*1j7H-aq|V3OEk2 zA-6y8JviWS!$dwvZx0*xA-C_ZhN6C+bdNGsUs_Kk7f0AX1wIuLM-P63UXEy{yRKmsBGYAFDXkif{v3Th|fA73nO{8<7DzgNX#!#gx6-lC<)gL6E)bqA%$~v z`6>lDsHCbcroaLGY&*{7$qFG9IPp&GjAn!{AteU-lN)vKi^_OK=4UBigYC<`^3srX zP&>}_RA~&B@07Cc63=7##8Iq=7>nb2C8epCv;ZqDyJE20#2K0aCMy$11C61^a00$7 zg+nzX`d`WuoIL$XCPyh7D>Wlt2r!`?_(<9U*sIDD$|SFWn^cY!1NTQwu9n_;87 z5mEOuNwm%zdp!Os)MZm4$9VWHH6xzCFoyQ&wkuM@tgnu@mtW(Kof?4Vpadh*#J>Ib z!K%aXGFyCt>PeBsMAKp(3iLgPKgm`KZ1MZvJS_cQlm9UyqG_9)bL;6J8_Nv@V!642 z?clR)U1R(0hqAOrG$UA%H8hN)I3s9zH3JkoRI*QvUyq5WT`-;7bstL7lq(y?pK2(Tp~Dp{j--41 zj{bvLrh)zK5p>u1A?y1w?lgHFe=j3)a$bAHX~)Mmgfg{*Ahmsw3Jx=lGo4cjmLoVF z^6Qx1l;DMZwM!OGP0>c@&WGsT5Yo5wkHNlyw&OL=cAT1&w-H%A@Y_hA^cHrEX|dwH zwJd5xPreor^A=T`reQ zV;2sxVmBXuxh3_3duWZX+>LcCYU%OUV_(eVb?AlbSR8>Cu`|6djO0&u4#2BF$E0(U zz9EUOayLX-oJ}oa{&}VCxRK1QotL1zscT<Blj!PGBFExf zuFVS2fq9{)zW*H0gHuyAO?oE8NWSV%i9Cy%vGLQ~GQ<_FG>L}sZ4paU-K^Qz=4pHi zT&)A5U@b9z4JO#6DidJK;`Y2%1Wj%8jGCaCQs&$R|9)@HTi43>-&=&s4S zU*`ysraFhb_odTa!)X`kD6FnoRDsYd!I&3|G+lf@ON8U&L(*FJc&|udh0ylqSZoNG zUCBh=3l5ff+vV3D@AJYM80=AibAfUvR8^+!xLeS?X2`Eqe3>VtY2*!FHe`*4g(k>T zGQ*0l(DcG4!p50XM)`_*ZH^E`xnF{+OpR7MPVxrSZU?KJ+1`&b0cb+>Bp5WV z$nN)8tz}H06oaifVIp&pkBe@R`_W2d#D+NSxF|wHJ^B^_oy%ox|DkvTFBAQ{X%?WD)xYu|xff-}9`gOWv}&IU`cLOh4E^s?peV4N_Nn*9T>Hjg z@2X~3^MkQKW7jHU>@!(~1k?H6#bICT+k#2yH6iOeMhIIZ7&m;r9G7~jfTSGXn>_yJ`)&IgPk}Xm;YB1&pR`-xUBKrOKZ9mc2croB|Pff z)!CmrV0}2BE7pUe*M&L|=aGL$ zYj)c$u8XZc9RKpaNUT0S?>6AA&K30ZG4_PtKc9Cv6}Kb%QXw}&ZAZ0!&3Q{%$}h?h z2^)${Wi2n7L^u*IQ$+OpGTd+~g92mrVV^B?1_z zbN}9ZWy0NxuM;<-^7oiAd6f6FA1lemNj~sAeRNjl@4mlVY)+84%w)Pjq@xYGVP^iU~Ww{kkjt~xlA`Y$&R zNnZ-kyQ&Js2g=`yVdpZF+&V@g=XwlQ#?1%1kV^kTTe(f_g;@MQ8FL@6t|y z?1;tkZL5&-jPC<}N8{6kv}hhC-&I)zm5a>F2s;VOO-{45&6&Yn>*W*%z(296xmu92UD5ltexfr z;?Kb$u&wYNNOJ|GS%Na}QaQWoP9#d_91XKyX5{`EibH3*4>miAp7VJZq{yAOgq9q} zqv)>iD6=waI3Csw67c-TRCFI^-_VTM_%R7KdgG^V0b5XN+gTj(o)l?w&r7@k=0^+MCUlr4_VJW0c-%8cEAWs!dK%WIteRu=Vn9V#0-bv_pR zrczl~J3#LOxF|f9VJi5>yL2o-jkxtV4fEO386Hif0C5f+FH=LSd=HqXXkL?Ku7k(v zRwkgl+{{&yOgKVUoJk|T5xYcIeeQ*IiJ%jI`MxmDpvjB-i^XCy21AYwY((>%iZK4} zl=CquB@NV?JS1k?ev2e`$^`)FLv?-#?I;J0Obty#TnR>X_`5R-51d+dWE8|%D3c8$ z^frCm*Ho+@DVHa-;%whkdcD)cGJ~E-H6$_ht`)vtoJd8p^lDJ!w{Acqg6`~>33z?jNFU#@ z=gO==2z$rwTE44#8J)UGkxQ?Gs>mJpF1neh>A6~dpcy)PqsjSf5q%CIB8%Gh z?Ps0&>mWWY3_LSAknMP}RUsK@OPP~h{a6O5o(>c6r>{rIgy>OFZ-;a7kIza6{WQ>7 znef2i$eq?M1+>_bvLxGTL37$3&Hp-A=%Xbk^^bI-{@XyqEOf);a~;{$iJWR$W7ux@ zc$re~j2-peI1vJV{LurM9;?ems~fa17XW(X4jhEtT&_iVYQg(FjX}$MSkD!n-tzuk zV49OcPrvWY9_&4se!D4OXo5_Ls=Z6HJ}hP&FUcH_jU3C^K`k5D_&lBoWWUfF1FhWS zXRnd@2xs^CON}{^+}K5%+V#EjG|!y+t>?&F39pK^z0uSS8Nn8QvQMO{vef%;P2QVx z7k>PlFOiC2sXKRtRS#L)J@jkG(FE~%T7NQX{f|}o*vTgwl6UU;?%dmZFy(f4o+Q(g z|C{5$f_t0vo6-qwoDzekHbadiF7$#>rHZdPPN_8xd? zA!SkCP(Im+e7ZDrr8fE=k%=k>hn1VDcm9-qb-^db+934v_xrQdOr*JNehj<<>UYk6@ih)UnYsk6-g-3+cD=R}zXg$1Jn?8!JfozU*rj|` z3lmFg%)Py~Y3-4~^O}zuJ8?S&@$nh#kEiApy!*dRMnA){)C+u0)gACiE;^8H>KZ{8 ze_g&E_%zR`JMN9uj)^n`d%vSKX&R9MCNK8@fiDYvCvB$)yvH=C{<>qGS@dxuhT zgm4Ok4-NtsAF1gU%_#QZ`~>mG&sxJ7&o28g%aoWwPwxtH7y`>Hd=%5d^wAnKib|Si zEt79k0F@BQ&8n-uy3#V`c3CBNxU)OFx;CpcQ&*B1MsnNPHPt)*_0_PnxEB9oTR~CR z^Ky^vmb-5!)t@^cuyv~*+mAB&yQ;y|c8B~8es8}HWgW}?n$FYJ?(uH)0W*JWg*u@qXV3SVfsH%6j{w{d;B>~~ z!wX%SCK37eBBn-{j#KsHyyHj>rh-wd_Q?5Nz3^h?Nzzye;Q|cdt*w0*3S+TmJ}VBA zMGO;F0h6^Qxfe&$AjBoBO`b}N3i|7Zk~z7w=813GZFwM4B97lq=X#NY5MDdNH6c>w z=8*OB9UTFdt9(ogz2J+aV5=CfC@mt9C?$WRWxLe%JNirXVxhPZR3Mze_4 zT~t$}_>Y07s|Pj;o!MQUNF>SMSOI!47&nVBgQaBo8;@JVGw)DuM(@>*a2Cf?>Y~S; zDMlBH5_1TqM$zun!RgdkDd35~1Jd zN{=|hPke{@9U&)E^36X=@anQIw(YOYeN)%rY1jy?eN%{nbv_*p%7}K&US0Dd$(>npoL+?M&54~Jy>b~wCZd( z?k)fo4mf}7zHa=qxDeL5kmP)Se6Ktk>Rq;jveb>6q7X`>Hg&?+3;vxI@vmOiIPD}m zyg2FjyXEtZL+zh55;;Cc;7}LPs4i$?cO^W=VHJFpH85*|bKZSu3Eq05bzDf;PLk`k zFzB8N`E>ZIrM@QSQEa4xIef}to@tU~=!4A=#@`q=O&%b>lpJZ�pP}Ga)04hCL$!c-JQK}was_KqZRJxedvQB>$`!w9AQ~ZMVo)ftKxl%d%H`pDAe&! z*`ZehicfvcN_4@C*2nH0y#jrw)4F?9oKbM^A?%l$HI9Mdrm&d4XZD`2AFI~7JKGTj z?tR^xyHf2yiToOrhw{#?uY0Fy(|5Z8Pp(O#YMqVb1_wL}VvB0e^-t4YShNGEkun`p zV|{YNE-t8Q0C((~rd=+9i=*oE6W9*rS12`{UTG?kj0zm%80-d5R%A{L zw7k+a=N*A}MH9efU$;%B+0356kmUB4JpcTVz1Mx9%Tr!ACX&xbZTL^ti-Hpdn@)y@ z9$-_+nu1VjB;C#XrY-Zepy3RO*~t6$+*4VOYSxc0ue3)hsO0&%r^7>|Y&@1nJZlBN zxcY~``ToikyNgqdZkNz zZI3y812p|KsDE_hOWBY2E}Hdke++VN=(4i-!*focOKNTD-8H3f$2(D<&Fiww-}3a3 zm$MMf=uXX(CatigkK2BH5&iwn8O0K(|AE)#X#a=B)I$%I;D)L)3!VxD=-P}EWIJcq z9l1>cu-ih(0Uw+u&taH z;VlzRB;7DJCl9U+mx7C@yFFit@ub8=uAw+y_1EJe3*n`=ks8WO!Z!fajJ#Nb^HDyKmA~Aqplh$~cdm%!L0GKAg8dkmYMVbdWJAqvq=|=OXk@bEc0s*gjzpTd{ z{+t-W+3#%iq7;IOjTF0fK&>BWkO@AS7590FEP6r7!iQXc#Zma`R7y(_J|U4ZI*lcG z{izh&TBNkuzkST)h;PPDlAG!DuEuE$5vuDiM=iE*LP)WZ()Tt|oPa!q5OO-(0zQen zNxR8M1*Ey({(uNtc-@>^7Jw!12zblv z{Fk#Us7kEjcfVhkuyOD~|IWhN5p;z*Oa1-l)D!y=X!p5%L}ARYtB|gdv8i%__d_mFk*|BwLZ&3MDAw zWF%4;f856u&xc3GXpPw^hu2+Shd>FJ^Lu09H&YCC8%up+S|m_j68@5c)BK6ILz|G! z*hrHVwee@^$WL11%^v(=Um^Hzq<20v_fM}gb_0>{x3Bj2JDeMo07acDuHx5zUw^~0 z-^9FeW#K;3u<5mr&#JSdqgt3JRI-TZuc)RF1pc%`fsd?Pbsv&^p1whO%Ho!{>=x=8 z(v7=XpPU+7d8n&MH}2=SGL4jo0yj4a|erS%uhHKJ{yvL%}X)3yu#r1VO;*XuW#ASFc{ptC})Dx^MUCK7DSd zZ}+L3+;3V)P#IHiLXRTio=ltgX$Gf62G}xU1DDXb2l?5KT68B`1QCyB+N2ohtf4>| zMOHb}U2Ll|MpiAj*^xBk;`l)ZWYOwjwb362P=HF6O=_{cJo>&u4%ClirLZ>7ni?@& z)sN&nB^~m~)+119va>Dp-w9{qiFg&$hH_rnIj$dpOrAY^N)c&RMnE3R>QSq>-vl6^ zoVF)sS31Lq_z2U+LNmqL=bR4Q-M2TxmFvvCA%wqR+Bh`F%vH9oiUcjRK{r}mR^0dM zO0VjeiKq}Je@QC%_`M7BZvJH}{Jf4b_qi)PY119dqF*yaB#s3qYX`bujB^w@D=Qj- zVamL~IkwZxYbrpdL{t6Y5P!RhD|^cyQVcidg@K&StBy*C4KK#dpupgrm2`0o3K$V1 zQEGwpM&A=k(C<7!9+5Mx46TeMFiVqtA3hWns5af zXTLc^%V!vb2+KVp$Nh~|PIE*O}hOR@m$l8>M+HmE{WKzsR174O6To!vwH zyWvFt1Df**jFfrLTv|ZRksjOH#uK%>_0!j3CVgSnf3kbN5dHnErvIXx@q(Wwm;s!; z`;SHTTKm5?y9nz2MF;`|(&wrbm5ykoe?@fFr|GzOUv-!)fsTcMY$BI3xKMd4ZLRC6 zq8G_ta}gTUjE zkbM_3YXtfoCj%tG`4vLcG1&bz4H%B)vhO3ZRgj>kmxkg@0|Jl0*&oAr{nFMxM2c1c4b1lu2yNZN)n|3K0j zM9mb*&n08{ZoiCbRp8zzj;|JiK3}<=2x`~JM7QagtiBcLHZDLnX18t(LG4a!zCo}% zzt2tP>PG=c6DEVG(bd>a?Fpo$i&oK!#!;It3LgiaUOT&ViwK0(k6o`M!h^nF3}aB6 z&hG;~(L{6(l|EMo6gBgW-NTS(bcE&bnpUDveVJaa;)82@`pcgyxwY|T2TSR0z&r18 z&d&pIQ~fTwH|qOz-oZZ~cx@)_chiY5VYGhD9Yr9w8bp~b26D6ZN$xk0KdjVD@+5$o zO*)#I5%Vq%%2@9L<_gei;AHh6USFNOY#G|yXjDf;hTGtnj|59M^(Sfr!`@@{+YW?? zlMu5q1F-eHVTt7(?6map1`T0(Z4Db)-7o zke6mzjb3F0-rlLC+6D}EcWijsWCY~VsVX&ueF`=SPn1T|ZH3P%ae%i@W=Il5fZOAH zm?#DMoMW?MBsBHb;wsKM7;p8I@>8VZM2+(JeZZabPTTu!m4wV~{XReX5rCOA5Rohd zZ}g0dQEBWhU)gOr25(3l2Fh+1aXL_KXsh>rZy{ih$cl@N)(At{U@^ybC-N&o4=QjJ zG4l05-&|p!c55&93nb!H@5eI{z@yI%cM5;#f&AZPX6%o%9|3HN@%>R!Y8ggmzEC+5 zm16XM<4dUoxr`9VPKsI*T@`>JmTN!!P;yh<*xmHy;YSBHTEObfH?HON(tu|Y-715= zLp{C^ACKXtHqN%yUxc9TJ?zJ>vc+G3yHdla>Lfc13 zfjGE#9m(n^1rc%c+$$;_I#lS7&z)<}L5hcFiz@T(oEarR)wu4v?nlQGFyOx}NF{aD z=7W2ubn+v6Lr`+y@>|ieU!mplVR8(hhO&bV`0irm!f{fhFt|xJk#OtJG&NDegSt$Y z=#RUrQyP9)Obp)kbMG!YyToaUSJ%BdL%iw<;61td>d0|tz`rTfGgSzZyh;SK%3=>u zl)F>3pV z`!r!kt(r$%&HxeO`d)pv*%*VSp}K3L!`wOoSnt1iO|&*+`yyZx4X`hhy+JH<;JGNs zgm@b#nPPZ8$x`j6ye?e4ZEbmYn{)Uo40qhG5%L^BC2^S6t34nFV=r%U4O#1r7cz7FQ`qJ`$NU1?f#cj=I2@(H_sJCciIM^QP zY ) } renderContent={ () => ( - <> +
{ __( 'Update', 'simple-pay' ) } - +
) } /> diff --git a/includes/core/assets/js/simpay-admin-dashboard-widget-report-css.min.asset.php b/includes/core/assets/js/simpay-admin-dashboard-widget-report-css.min.asset.php index 2384e71b..de07b6ad 100644 --- a/includes/core/assets/js/simpay-admin-dashboard-widget-report-css.min.asset.php +++ b/includes/core/assets/js/simpay-admin-dashboard-widget-report-css.min.asset.php @@ -1 +1 @@ - array(), 'version' => 'dbd7281da50a38754b9767bb555521e8'); \ No newline at end of file + array(), 'version' => '3723c4c8f256209bc8a447dca61a65dd'); \ No newline at end of file diff --git a/includes/core/assets/js/simpay-admin-form-template-explorer-css.min.asset.php b/includes/core/assets/js/simpay-admin-form-template-explorer-css.min.asset.php index a5da7de2..56500617 100644 --- a/includes/core/assets/js/simpay-admin-form-template-explorer-css.min.asset.php +++ b/includes/core/assets/js/simpay-admin-form-template-explorer-css.min.asset.php @@ -1 +1 @@ - array(), 'version' => 'a1cb864866ad84e2c255ef87b3081bc5'); \ No newline at end of file + array(), 'version' => '0dd31f8eefa5e32199af5e43b992d7ef'); \ No newline at end of file diff --git a/includes/core/assets/js/simpay-admin-help-css.min.asset.php b/includes/core/assets/js/simpay-admin-help-css.min.asset.php index ccad0542..140e8a09 100644 --- a/includes/core/assets/js/simpay-admin-help-css.min.asset.php +++ b/includes/core/assets/js/simpay-admin-help-css.min.asset.php @@ -1 +1 @@ - array(), 'version' => '87f2b616a7cd79a9de66ca199a1bd116'); \ No newline at end of file + array(), 'version' => '9b4801c47b93802aa2267402ce8683e9'); \ No newline at end of file diff --git a/includes/core/assets/js/simpay-admin-notifications-css.min.asset.php b/includes/core/assets/js/simpay-admin-notifications-css.min.asset.php index d1bae92a..f580bd36 100644 --- a/includes/core/assets/js/simpay-admin-notifications-css.min.asset.php +++ b/includes/core/assets/js/simpay-admin-notifications-css.min.asset.php @@ -1 +1 @@ - array(), 'version' => 'be20f5faaa6738c0953c1dc1626d9263'); \ No newline at end of file + array(), 'version' => 'cffa58289bb7bee5d392b67ace878074'); \ No newline at end of file diff --git a/includes/core/assets/js/simpay-admin-page-activity-reports-css.min.asset.php b/includes/core/assets/js/simpay-admin-page-activity-reports-css.min.asset.php index 2828e7f5..9bade784 100644 --- a/includes/core/assets/js/simpay-admin-page-activity-reports-css.min.asset.php +++ b/includes/core/assets/js/simpay-admin-page-activity-reports-css.min.asset.php @@ -1 +1 @@ - array(), 'version' => '19a4081165420223d6594505cf189c9c'); \ No newline at end of file + array(), 'version' => '84c6370e57483fcf81c166f7bf531dbe'); \ No newline at end of file diff --git a/includes/core/assets/js/simpay-admin-page-activity-reports.min.asset.php b/includes/core/assets/js/simpay-admin-page-activity-reports.min.asset.php index 65e349a6..16c83811 100644 --- a/includes/core/assets/js/simpay-admin-page-activity-reports.min.asset.php +++ b/includes/core/assets/js/simpay-admin-page-activity-reports.min.asset.php @@ -1 +1 @@ - array('lodash', 'react', 'wp-api-fetch', 'wp-components', 'wp-core-data', 'wp-data', 'wp-date', 'wp-element', 'wp-html-entities', 'wp-i18n', 'wp-primitives', 'wp-url'), 'version' => 'af667e179bcca0cbf7a1bcdd1344fc9b'); \ No newline at end of file + array('lodash', 'react', 'wp-api-fetch', 'wp-components', 'wp-core-data', 'wp-data', 'wp-date', 'wp-element', 'wp-html-entities', 'wp-i18n', 'wp-primitives', 'wp-url'), 'version' => 'c0255d8ff52554872c740377c6547be6'); \ No newline at end of file diff --git a/includes/core/assets/js/simpay-admin-page-activity-reports.min.js b/includes/core/assets/js/simpay-admin-page-activity-reports.min.js index e9a4c88c..dca65059 100644 --- a/includes/core/assets/js/simpay-admin-page-activity-reports.min.js +++ b/includes/core/assets/js/simpay-admin-page-activity-reports.min.js @@ -1,4 +1,4 @@ !function(t){var e={};function i(n){if(e[n])return e[n].exports;var a=e[n]={i:n,l:!1,exports:{}};return t[n].call(a.exports,a,a.exports,i),a.l=!0,a.exports}i.m=t,i.c=e,i.d=function(t,e,n){i.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:n})},i.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},i.t=function(t,e){if(1&e&&(t=i(t)),8&e)return t;if(4&e&&"object"==typeof t&&t&&t.__esModule)return t;var n=Object.create(null);if(i.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var a in t)i.d(n,a,function(e){return t[e]}.bind(null,a));return n},i.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return i.d(e,"a",e),e},i.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},i.p="",i(i.s=78)}([function(t,e){t.exports=window.wp.element},,function(t,e){t.exports=window.wp.i18n},function(t,e){t.exports=window.wp.components},function(t,e,i){"use strict";function n(t,e){if(e.length1?"s":"")+" required, but only "+e.length+" present")}i.d(e,"a",(function(){return n}))},function(t,e){t.exports=window.React},function(t,e,i){var n=i(26),a=i(27),s=i(22),r=i(28);t.exports=function(t,e){return n(t)||a(t,e)||s(t,e)||r()},t.exports.__esModule=!0,t.exports.default=t.exports},function(t,e,i){"use strict";function n(t){if(null===t||!0===t||!1===t)return NaN;var e=Number(t);return isNaN(e)?e:e<0?Math.ceil(e):Math.floor(e)}i.d(e,"a",(function(){return n}))},function(t,e,i){"use strict";i.d(e,"a",(function(){return s}));var n=i(4);function a(t){return(a="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function s(t){Object(n.a)(1,arguments);var e=Object.prototype.toString.call(t);return t instanceof Date||"object"===a(t)&&"[object Date]"===e?new Date(t.getTime()):"number"==typeof t||"[object Number]"===e?new Date(t):("string"!=typeof t&&"[object String]"!==e||"undefined"==typeof console||(console.warn("Starting with v2.0.0-beta.1 date-fns doesn't accept strings as date arguments. Please use `parseISO` to parse strings. See: https://github.com/date-fns/date-fns/blob/master/docs/upgradeGuide.md#string-arguments"),console.warn((new Error).stack)),new Date(NaN))}},function(t,e){t.exports=window.wp.primitives},function(t,e){t.exports=window.wp.url},function(t,e,i){var n=i(30);t.exports=function(t,e,i){return(e=n(e))in t?Object.defineProperty(t,e,{value:i,enumerable:!0,configurable:!0,writable:!0}):t[e]=i,t},t.exports.__esModule=!0,t.exports.default=t.exports},function(t,e){t.exports=window.lodash},function(t,e,i){var n;!function(){"use strict";var i={}.hasOwnProperty;function a(){for(var t=[],e=0;eArray.prototype.slice.call(t));let a=!1,s=[];return function(...i){s=n(i),a||(a=!0,l.call(window,()=>{a=!1,t.apply(e,s)}))}}const h=(t,e,i)=>"start"===t?e:"end"===t?i:(e+i)/2;function d(){}const u=function(){let t=0;return function(){return t++}}();function f(t){return null==t}function p(t){if(Array.isArray&&Array.isArray(t))return!0;const e=Object.prototype.toString.call(t);return"[object"===e.substr(0,7)&&"Array]"===e.substr(-6)}function g(t){return null!==t&&"[object Object]"===Object.prototype.toString.call(t)}const m=t=>("number"==typeof t||t instanceof Number)&&isFinite(+t);function b(t,e){return m(t)?t:e}function y(t,e){return void 0===t?e:t}const x=(t,e)=>"string"==typeof t&&t.endsWith("%")?parseFloat(t)/100*e:+t;function v(t,e,i){if(t&&"function"==typeof t.call)return t.apply(i,e)}function _(t,e,i,n){let a,s,r;if(p(t))if(s=t.length,n)for(a=s-1;a>=0;a--)e.call(i,t[a],a);else for(a=0;ai;)t=t[e.substr(i,n-i)],i=n+1,n=D(e,i);return t}function C(t){return t.charAt(0).toUpperCase()+t.slice(1)}const T=t=>void 0!==t,A=t=>"function"==typeof t,L=(t,e)=>{if(t.size!==e.size)return!1;for(const i of t)if(!e.has(i))return!1;return!0},R=Math.PI,N=2*R,F=N+R,I=Number.POSITIVE_INFINITY,z=R/180,B=R/2,V=R/4,W=2*R/3,H=Math.log10,U=Math.sign;function Y(t){const e=Math.round(t);t=X(t,e,t/1e3)?e:t;const i=Math.pow(10,Math.floor(H(t))),n=t/i;return(n<=1?1:n<=2?2:n<=5?5:10)*i}function $(t){return!isNaN(parseFloat(t))&&isFinite(t)}function X(t,e,i){return Math.abs(t-e)l&&c=Math.min(e,i)-n&&t<=Math.max(e,i)+n}const st=t=>0===t||1===t,rt=(t,e,i)=>-Math.pow(2,10*(t-=1))*Math.sin((t-e)*N/i),ot=(t,e,i)=>Math.pow(2,-10*t)*Math.sin((t-e)*N/i)+1,lt={linear:t=>t,easeInQuad:t=>t*t,easeOutQuad:t=>-t*(t-2),easeInOutQuad:t=>(t/=.5)<1?.5*t*t:-.5*(--t*(t-2)-1),easeInCubic:t=>t*t*t,easeOutCubic:t=>(t-=1)*t*t+1,easeInOutCubic:t=>(t/=.5)<1?.5*t*t*t:.5*((t-=2)*t*t+2),easeInQuart:t=>t*t*t*t,easeOutQuart:t=>-((t-=1)*t*t*t-1),easeInOutQuart:t=>(t/=.5)<1?.5*t*t*t*t:-.5*((t-=2)*t*t*t-2),easeInQuint:t=>t*t*t*t*t,easeOutQuint:t=>(t-=1)*t*t*t*t+1,easeInOutQuint:t=>(t/=.5)<1?.5*t*t*t*t*t:.5*((t-=2)*t*t*t*t+2),easeInSine:t=>1-Math.cos(t*B),easeOutSine:t=>Math.sin(t*B),easeInOutSine:t=>-.5*(Math.cos(R*t)-1),easeInExpo:t=>0===t?0:Math.pow(2,10*(t-1)),easeOutExpo:t=>1===t?1:1-Math.pow(2,-10*t),easeInOutExpo:t=>st(t)?t:t<.5?.5*Math.pow(2,10*(2*t-1)):.5*(2-Math.pow(2,-10*(2*t-1))),easeInCirc:t=>t>=1?t:-(Math.sqrt(1-t*t)-1),easeOutCirc:t=>Math.sqrt(1-(t-=1)*t),easeInOutCirc:t=>(t/=.5)<1?-.5*(Math.sqrt(1-t*t)-1):.5*(Math.sqrt(1-(t-=2)*t)+1),easeInElastic:t=>st(t)?t:rt(t,.075,.3),easeOutElastic:t=>st(t)?t:ot(t,.075,.3),easeInOutElastic(t){const e=.1125;return st(t)?t:t<.5?.5*rt(2*t,e,.45):.5+.5*ot(2*t-1,e,.45)},easeInBack(t){const e=1.70158;return t*t*((e+1)*t-e)},easeOutBack(t){const e=1.70158;return(t-=1)*t*((e+1)*t+e)+1},easeInOutBack(t){let e=1.70158;return(t/=.5)<1?t*t*((1+(e*=1.525))*t-e)*.5:.5*((t-=2)*t*((1+(e*=1.525))*t+e)+2)},easeInBounce:t=>1-lt.easeOutBounce(1-t),easeOutBounce(t){const e=7.5625,i=2.75;return t<1/i?e*t*t:t<2/i?e*(t-=1.5/i)*t+.75:t<2.5/i?e*(t-=2.25/i)*t+.9375:e*(t-=2.625/i)*t+.984375},easeInOutBounce:t=>t<.5?.5*lt.easeInBounce(2*t):.5*lt.easeOutBounce(2*t-1)+.5},ct={0:0,1:1,2:2,3:3,4:4,5:5,6:6,7:7,8:8,9:9,A:10,B:11,C:12,D:13,E:14,F:15,a:10,b:11,c:12,d:13,e:14,f:15},ht="0123456789ABCDEF",dt=t=>ht[15&t],ut=t=>ht[(240&t)>>4]+ht[15&t],ft=t=>(240&t)>>4==(15&t);function pt(t){return t+.5|0}const gt=(t,e,i)=>Math.max(Math.min(t,i),e);function mt(t){return gt(pt(2.55*t),0,255)}function bt(t){return gt(pt(255*t),0,255)}function yt(t){return gt(pt(t/2.55)/100,0,1)}function xt(t){return gt(pt(100*t),0,100)}const vt=/^rgba?\(\s*([-+.\d]+)(%)?[\s,]+([-+.e\d]+)(%)?[\s,]+([-+.e\d]+)(%)?(?:[\s,/]+([-+.e\d]+)(%)?)?\s*\)$/,_t=/^(hsla?|hwb|hsv)\(\s*([-+.e\d]+)(?:deg)?[\s,]+([-+.e\d]+)%[\s,]+([-+.e\d]+)%(?:[\s,]+([-+.e\d]+)(%)?)?\s*\)$/;function wt(t,e,i){const n=e*Math.min(i,1-i),a=(e,a=(e+t/30)%12)=>i-n*Math.max(Math.min(a-3,9-a,1),-1);return[a(0),a(8),a(4)]}function Ot(t,e,i){const n=(n,a=(n+t/60)%6)=>i-i*e*Math.max(Math.min(a,4-a,1),0);return[n(5),n(3),n(1)]}function Mt(t,e,i){const n=wt(t,1,.5);let a;for(e+i>1&&(a=1/(e+i),e*=a,i*=a),a=0;a<3;a++)n[a]*=1-e-i,n[a]+=e;return n}function kt(t){const e=t.r/255,i=t.g/255,n=t.b/255,a=Math.max(e,i,n),s=Math.min(e,i,n),r=(a+s)/2;let o,l,c;return a!==s&&(c=a-s,l=r>.5?c/(2-a-s):c/(a+s),o=a===e?(i-n)/c+(i=3&&(e={r:t[0],g:t[1],b:t[2],a:255},t.length>3&&(e.a=bt(t[3]))):(e=At(t,{r:0,g:0,b:0,a:1})).a=bt(e.a),e}function Rt(t){return"r"===t.charAt(0)?function(t){const e=vt.exec(t);let i,n,a,s=255;if(e){if(e[7]!==i){const t=+e[7];s=255&(e[8]?mt(t):255*t)}return i=+e[1],n=+e[3],a=+e[5],i=255&(e[2]?mt(i):i),n=255&(e[4]?mt(n):n),a=255&(e[6]?mt(a):a),{r:i,g:n,b:a,a:s}}}(t):function(t){const e=_t.exec(t);let i,n=255;if(!e)return;e[5]!==i&&(n=e[6]?mt(+e[5]):bt(+e[5]));const a=Pt(+e[2]),s=+e[3]/100,r=+e[4]/100;return i="hwb"===e[1]?function(t,e,i){return jt(Mt,t,e,i)}(a,s,r):"hsv"===e[1]?function(t,e,i){return jt(Ot,t,e,i)}(a,s,r):St(a,s,r),{r:i[0],g:i[1],b:i[2],a:n}}(t)}class Nt{constructor(t){if(t instanceof Nt)return t;const e=typeof t;let i;var n,a,s;"object"===e?i=Lt(t):"string"===e&&(s=(n=t).length,"#"===n[0]&&(4===s||5===s?a={r:255&17*ct[n[1]],g:255&17*ct[n[2]],b:255&17*ct[n[3]],a:5===s?17*ct[n[4]]:255}:7!==s&&9!==s||(a={r:ct[n[1]]<<4|ct[n[2]],g:ct[n[3]]<<4|ct[n[4]],b:ct[n[5]]<<4|ct[n[6]],a:9===s?ct[n[7]]<<4|ct[n[8]]:255})),i=a||function(t){Ct||(Ct=function(){const t={},e=Object.keys(Et),i=Object.keys(Dt);let n,a,s,r,o;for(n=0;n>16&255,s>>8&255,255&s]}return t}(),Ct.transparent=[0,0,0,0]);const e=Ct[t.toLowerCase()];return e&&{r:e[0],g:e[1],b:e[2],a:4===e.length?e[3]:255}}(t)||Rt(t)),this._rgb=i,this._valid=!!i}get valid(){return this._valid}get rgb(){var t=At(this._rgb);return t&&(t.a=yt(t.a)),t}set rgb(t){this._rgb=Lt(t)}rgbString(){return this._valid?(t=this._rgb)&&(t.a<255?`rgba(${t.r}, ${t.g}, ${t.b}, ${yt(t.a)})`:`rgb(${t.r}, ${t.g}, ${t.b})`):this._rgb;var t}hexString(){return this._valid?(t=this._rgb,e=function(t){return ft(t.r)&&ft(t.g)&&ft(t.b)&&ft(t.a)}(t)?dt:ut,t?"#"+e(t.r)+e(t.g)+e(t.b)+(t.a<255?e(t.a):""):t):this._rgb;var t,e}hslString(){return this._valid?function(t){if(!t)return;const e=kt(t),i=e[0],n=xt(e[1]),a=xt(e[2]);return t.a<255?`hsla(${i}, ${n}%, ${a}%, ${yt(t.a)})`:`hsl(${i}, ${n}%, ${a}%)`}(this._rgb):this._rgb}mix(t,e){const i=this;if(t){const n=i.rgb,a=t.rgb;let s;const r=e===s?.5:e,o=2*r-1,l=n.a-a.a,c=((o*l==-1?o:(o+l)/(1+o*l))+1)/2;s=1-c,n.r=255&c*n.r+s*a.r+.5,n.g=255&c*n.g+s*a.g+.5,n.b=255&c*n.b+s*a.b+.5,n.a=r*n.a+(1-r)*a.a,i.rgb=n}return i}clone(){return new Nt(this.rgb)}alpha(t){return this._rgb.a=bt(t),this}clearer(t){return this._rgb.a*=1-t,this}greyscale(){const t=this._rgb,e=pt(.3*t.r+.59*t.g+.11*t.b);return t.r=t.g=t.b=e,this}opaquer(t){return this._rgb.a*=1+t,this}negate(){const t=this._rgb;return t.r=255-t.r,t.g=255-t.g,t.b=255-t.b,this}lighten(t){return Tt(this._rgb,2,t),this}darken(t){return Tt(this._rgb,2,-t),this}saturate(t){return Tt(this._rgb,1,t),this}desaturate(t){return Tt(this._rgb,1,-t),this}rotate(t){return function(t,e){var i=kt(t);i[0]=Pt(i[0]+e),i=St(i),t.r=i[0],t.g=i[1],t.b=i[2]}(this._rgb,t),this}}function Ft(t){return new Nt(t)}const It=t=>t instanceof CanvasGradient||t instanceof CanvasPattern;function zt(t){return It(t)?t:Ft(t)}function Bt(t){return It(t)?t:Ft(t).saturate(.5).darken(.1).hexString()}const Vt=Object.create(null),Wt=Object.create(null);function Ht(t,e){if(!e)return t;const i=e.split(".");for(let e=0,n=i.length;et.chart.platform.getDevicePixelRatio(),this.elements={},this.events=["mousemove","mouseout","click","touchstart","touchmove"],this.font={family:"'Helvetica Neue', 'Helvetica', 'Arial', sans-serif",size:12,style:"normal",lineHeight:1.2,weight:null},this.hover={},this.hoverBackgroundColor=(t,e)=>Bt(e.backgroundColor),this.hoverBorderColor=(t,e)=>Bt(e.borderColor),this.hoverColor=(t,e)=>Bt(e.color),this.indexAxis="x",this.interaction={mode:"nearest",intersect:!0},this.maintainAspectRatio=!0,this.onHover=null,this.onClick=null,this.parsing=!0,this.plugins={},this.responsive=!0,this.scale=void 0,this.scales={},this.showLine=!0,this.drawActiveElementsOnTop=!0,this.describe(t)}set(t,e){return Ut(this,t,e)}get(t){return Ht(this,t)}describe(t,e){return Ut(Wt,t,e)}override(t,e){return Ut(Vt,t,e)}route(t,e,i,n){const a=Ht(this,t),s=Ht(this,i),r="_"+e;Object.defineProperties(a,{[r]:{value:a[e],writable:!0},[e]:{enumerable:!0,get(){const t=this[r],e=s[n];return g(t)?Object.assign({},e,t):y(t,e)},set(t){this[r]=t}}})}}({_scriptable:t=>!t.startsWith("on"),_indexable:t=>"events"!==t,hover:{_fallback:"interaction"},interaction:{_scriptable:!1,_indexable:!1}});function $t(t,e,i,n,a){let s=e[a];return s||(s=e[a]=t.measureText(a).width,i.push(a)),s>n&&(n=s),n}function Xt(t,e,i,n){let a=(n=n||{}).data=n.data||{},s=n.garbageCollect=n.garbageCollect||[];n.font!==e&&(a=n.data={},s=n.garbageCollect=[],n.font=e),t.save(),t.font=e;let r=0;const o=i.length;let l,c,h,d,u;for(l=0;li.length){for(l=0;l0&&t.stroke()}}function Kt(t,e,i){return i=i||.5,!e||t&&t.x>e.left-i&&t.xe.top-i&&t.y0&&""!==s.strokeColor;let l,c;for(t.save(),t.font=a.string,function(t,e){e.translation&&t.translate(e.translation[0],e.translation[1]),f(e.rotation)||t.rotate(e.rotation),e.color&&(t.fillStyle=e.color),e.textAlign&&(t.textAlign=e.textAlign),e.textBaseline&&(t.textBaseline=e.textBaseline)}(t,s),l=0;ly(t[i],t[e[i]]):e=>t[e]:()=>t;for(const t of a)i[t]=+s(t)||0;return i}function ce(t){return le(t,{top:"y",right:"x",bottom:"y",left:"x"})}function he(t){return le(t,["topLeft","topRight","bottomLeft","bottomRight"])}function de(t){const e=ce(t);return e.width=e.left+e.right,e.height=e.top+e.bottom,e}function ue(t,e){t=t||{},e=e||Yt.font;let i=y(t.size,e.size);"string"==typeof i&&(i=parseInt(i,10));let n=y(t.style,e.style);n&&!(""+n).match(re)&&(console.warn('Invalid font style specified: "'+n+'"'),n="");const a={family:y(t.family,e.family),lineHeight:oe(y(t.lineHeight,e.lineHeight),i),size:i,style:n,weight:y(t.weight,e.weight),string:""};return a.string=function(t){return!t||f(t.size)||f(t.family)?null:(t.style?t.style+" ":"")+(t.weight?t.weight+" ":"")+t.size+"px "+t.family}(a),a}function fe(t,e,i,n){let a,s,r,o=!0;for(a=0,s=t.length;at[i]1;)n=s+a>>1,i(n)?s=n:a=n;return{lo:s,hi:a}}const me=(t,e,i)=>ge(t,i,n=>t[n][e]ge(t,i,n=>t[n][e]>=i),ye=["push","pop","shift","splice","unshift"];function xe(t,e){const i=t._chartjs;if(!i)return;const n=i.listeners,a=n.indexOf(e);-1!==a&&n.splice(a,1),n.length>0||(ye.forEach(e=>{delete t[e]}),delete t._chartjs)}function ve(t){const e=new Set;let i,n;for(i=0,n=t.length;it[0])){T(n)||(n=Te("_fallback",t));const s={[Symbol.toStringTag]:"Object",_cacheable:!0,_scopes:t,_rootScopes:i,_fallback:n,_getTarget:a,override:a=>_e([a,...t],e,i,n)};return new Proxy(s,{deleteProperty:(e,i)=>(delete e[i],delete e._keys,delete t[0][i],!0),get:(i,n)=>je(i,n,()=>function(t,e,i,n){let a;for(const s of e)if(a=Te(Me(s,t),i),T(a))return ke(t,a)?Ee(i,n,t,a):a}(n,e,t,i)),getOwnPropertyDescriptor:(t,e)=>Reflect.getOwnPropertyDescriptor(t._scopes[0],e),getPrototypeOf:()=>Reflect.getPrototypeOf(t[0]),has:(t,e)=>Ae(t).includes(e),ownKeys:t=>Ae(t),set(t,e,i){const n=t._storage||(t._storage=a());return t[e]=n[e]=i,delete t._keys,!0}})}function we(t,e,i,n){const a={_cacheable:!1,_proxy:t,_context:e,_subProxy:i,_stack:new Set,_descriptors:Oe(t,n),setContext:e=>we(t,e,i,n),override:a=>we(t.override(a),e,i,n)};return new Proxy(a,{deleteProperty:(e,i)=>(delete e[i],delete t[i],!0),get:(t,e,i)=>je(t,e,()=>function(t,e,i){const{_proxy:n,_context:a,_subProxy:s,_descriptors:r}=t;let o=n[e];return A(o)&&r.isScriptable(e)&&(o=function(t,e,i,n){const{_proxy:a,_context:s,_subProxy:r,_stack:o}=i;if(o.has(t))throw new Error("Recursion detected: "+Array.from(o).join("->")+"->"+t);return o.add(t),e=e(s,r||n),o.delete(t),ke(t,e)&&(e=Ee(a._scopes,a,t,e)),e}(e,o,t,i)),p(o)&&o.length&&(o=function(t,e,i,n){const{_proxy:a,_context:s,_subProxy:r,_descriptors:o}=i;if(T(s.index)&&n(t))e=e[s.index%e.length];else if(g(e[0])){const i=e,n=a._scopes.filter(t=>t!==i);e=[];for(const l of i){const i=Ee(n,a,t,l);e.push(we(i,s,r&&r[t],o))}}return e}(e,o,t,r.isIndexable)),ke(e,o)&&(o=we(o,a,s&&s[e],r)),o}(t,e,i)),getOwnPropertyDescriptor:(e,i)=>e._descriptors.allKeys?Reflect.has(t,i)?{enumerable:!0,configurable:!0}:void 0:Reflect.getOwnPropertyDescriptor(t,i),getPrototypeOf:()=>Reflect.getPrototypeOf(t),has:(e,i)=>Reflect.has(t,i),ownKeys:()=>Reflect.ownKeys(t),set:(e,i,n)=>(t[i]=n,delete e[i],!0)})}function Oe(t,e={scriptable:!0,indexable:!0}){const{_scriptable:i=e.scriptable,_indexable:n=e.indexable,_allKeys:a=e.allKeys}=t;return{allKeys:a,scriptable:i,indexable:n,isScriptable:A(i)?i:()=>i,isIndexable:A(n)?n:()=>n}}const Me=(t,e)=>t?t+C(e):e,ke=(t,e)=>g(e)&&"adapters"!==t&&(null===Object.getPrototypeOf(e)||e.constructor===Object);function je(t,e,i){if(Object.prototype.hasOwnProperty.call(t,e))return t[e];const n=i();return t[e]=n,n}function Se(t,e,i){return A(t)?t(e,i):t}const Pe=(t,e)=>!0===t?e:"string"==typeof t?E(e,t):void 0;function De(t,e,i,n,a){for(const s of e){const e=Pe(i,s);if(e){t.add(e);const s=Se(e._fallback,i,a);if(T(s)&&s!==i&&s!==n)return s}else if(!1===e&&T(n)&&i!==n)return null}return!1}function Ee(t,e,i,n){const a=e._rootScopes,s=Se(e._fallback,i,n),r=[...t,...a],o=new Set;o.add(n);let l=Ce(o,r,i,s||i,n);return null!==l&&(!T(s)||s===i||(l=Ce(o,r,s,l,n),null!==l))&&_e(Array.from(o),[""],a,s,()=>function(t,e,i){const n=t._getTarget();e in n||(n[e]={});const a=n[e];return p(a)&&g(i)?i:a}(e,i,n))}function Ce(t,e,i,n,a){for(;i;)i=De(t,e,i,n,a);return i}function Te(t,e){for(const i of e){if(!i)continue;const e=i[t];if(T(e))return e}}function Ae(t){let e=t._keys;return e||(e=t._keys=function(t){const e=new Set;for(const i of t)for(const t of Object.keys(i).filter(t=>!t.startsWith("_")))e.add(t);return Array.from(e)}(t._scopes)),e}const Le=Number.EPSILON||1e-14,Re=(t,e)=>e"x"===t?"y":"x";function Fe(t,e,i,n){const a=t.skip?e:t,s=e,r=i.skip?e:i,o=J(s,a),l=J(r,s);let c=o/(o+l),h=l/(o+l);c=isNaN(c)?0:c,h=isNaN(h)?0:h;const d=n*c,u=n*h;return{previous:{x:s.x-d*(r.x-a.x),y:s.y-d*(r.y-a.y)},next:{x:s.x+u*(r.x-a.x),y:s.y+u*(r.y-a.y)}}}function Ie(t,e,i){return Math.max(Math.min(t,i),e)}function ze(t,e,i,n,a){let s,r,o,l;if(e.spanGaps&&(t=t.filter(t=>!t.skip)),"monotone"===e.cubicInterpolationMode)!function(t,e="x"){const i=Ne(e),n=t.length,a=Array(n).fill(0),s=Array(n);let r,o,l,c=Re(t,0);for(r=0;rwindow.getComputedStyle(t,null),Ue=["top","right","bottom","left"];function Ye(t,e,i){const n={};i=i?"-"+i:"";for(let a=0;a<4;a++){const s=Ue[a];n[s]=parseFloat(t[e+"-"+s+i])||0}return n.width=n.left+n.right,n.height=n.top+n.bottom,n}function $e(t,e){const{canvas:i,currentDevicePixelRatio:n}=e,a=He(i),s="border-box"===a.boxSizing,r=Ye(a,"padding"),o=Ye(a,"border","width"),{x:l,y:c,box:h}=function(t,e){const i=t.native||t,n=i.touches,a=n&&n.length?n[0]:i,{offsetX:s,offsetY:r}=a;let o,l,c=!1;if(((t,e,i)=>(t>0||e>0)&&(!i||!i.shadowRoot))(s,r,i.target))o=s,l=r;else{const t=e.getBoundingClientRect();o=a.clientX-t.left,l=a.clientY-t.top,c=!0}return{x:o,y:l,box:c}}(t,i),d=r.left+(h&&o.left),u=r.top+(h&&o.top);let{width:f,height:p}=e;return s&&(f-=r.width+o.width,p-=r.height+o.height),{x:Math.round((l-d)/f*i.width/n),y:Math.round((c-u)/p*i.height/n)}}const Xe=t=>Math.round(10*t)/10;function qe(t,e,i){const n=e||1,a=Math.floor(t.height*n),s=Math.floor(t.width*n);t.height=a/n,t.width=s/n;const r=t.canvas;return r.style&&(i||!r.style.height&&!r.style.width)&&(r.style.height=t.height+"px",r.style.width=t.width+"px"),(t.currentDevicePixelRatio!==n||r.height!==a||r.width!==s)&&(t.currentDevicePixelRatio=n,r.height=a,r.width=s,t.ctx.setTransform(n,0,0,n,0,0),!0)}const Ge=function(){let t=!1;try{const e={get passive(){return t=!0,!1}};window.addEventListener("test",null,e),window.removeEventListener("test",null,e)}catch(t){}return t}();function Qe(t,e){const i=function(t,e){return He(t).getPropertyValue(e)}(t,e),n=i&&i.match(/^(\d+)(\.\d+)?px$/);return n?+n[1]:void 0}function Ke(t,e,i,n){return{x:t.x+i*(e.x-t.x),y:t.y+i*(e.y-t.y)}}function Ze(t,e,i,n){return{x:t.x+i*(e.x-t.x),y:"middle"===n?i<.5?t.y:e.y:"after"===n?i<1?t.y:e.y:i>0?e.y:t.y}}function Je(t,e,i,n){const a={x:t.cp2x,y:t.cp2y},s={x:e.cp1x,y:e.cp1y},r=Ke(t,a,i),o=Ke(a,s,i),l=Ke(s,e,i),c=Ke(r,o,i),h=Ke(o,l,i);return Ke(c,h,i)}const ti=new Map;function ei(t,e,i){return function(t,e){e=e||{};const i=t+JSON.stringify(e);let n=ti.get(i);return n||(n=new Intl.NumberFormat(t,e),ti.set(i,n)),n}(e,i).format(t)}function ii(t,e,i){return t?function(t,e){return{x:i=>t+t+e-i,setWidth(t){e=t},textAlign:t=>"center"===t?t:"right"===t?"left":"right",xPlus:(t,e)=>t-e,leftForLtr:(t,e)=>t-e}}(e,i):{x:t=>t,setWidth(t){},textAlign:t=>t,xPlus:(t,e)=>t+e,leftForLtr:(t,e)=>t}}function ni(t){return"angle"===t?{between:it,compare:tt,normalize:et}:{between:at,compare:(t,e)=>t-e,normalize:t=>t}}function ai({start:t,end:e,count:i,loop:n,style:a}){return{start:t%i,end:e%i,loop:n&&(e-t+1)%i==0,style:a}}function si(t,e,i){if(!i)return[t];const{property:n,start:a,end:s}=i,r=e.length,{compare:o,between:l,normalize:c}=ni(n),{start:h,end:d,loop:u,style:f}=function(t,e,i){const{property:n,start:a,end:s}=i,{between:r,normalize:o}=ni(n),l=e.length;let c,h,{start:d,end:u,loop:f}=t;if(f){for(d+=l,u+=l,c=0,h=l;cn({chart:t,initial:e.initial,numSteps:s,currentStep:Math.min(i-e.start,s)}))}_refresh(){this._request||(this._running=!0,this._request=l.call(window,()=>{this._update(),this._request=null,this._running&&this._refresh()}))}_update(t=Date.now()){let e=0;this._charts.forEach((i,n)=>{if(!i.running||!i.items.length)return;const a=i.items;let s,r=a.length-1,o=!1;for(;r>=0;--r)s=a[r],s._active?(s._total>i.duration&&(i.duration=s._total),s.tick(t),o=!0):(a[r]=a[a.length-1],a.pop());o&&(n.draw(),this._notify(n,i,t,"progress")),a.length||(i.running=!1,this._notify(n,i,t,"complete"),i.initial=!1),e+=a.length}),this._lastDate=t,0===e&&(this._running=!1)}_getAnims(t){const e=this._charts;let i=e.get(t);return i||(i={running:!1,initial:!0,items:[],listeners:{complete:[],progress:[]}},e.set(t,i)),i}listen(t,e,i){this._getAnims(t).listeners[e].push(i)}add(t,e){e&&e.length&&this._getAnims(t).items.push(...e)}has(t){return this._getAnims(t).items.length>0}start(t){const e=this._charts.get(t);e&&(e.running=!0,e.start=Date.now(),e.duration=e.items.reduce((t,e)=>Math.max(t,e._duration),0),this._refresh())}running(t){if(!this._running)return!1;const e=this._charts.get(t);return!!(e&&e.running&&e.items.length)}stop(t){const e=this._charts.get(t);if(!e||!e.items.length)return;const i=e.items;let n=i.length-1;for(;n>=0;--n)i[n].cancel();e.items=[],this._notify(t,e,Date.now(),"complete")}remove(t){return this._charts.delete(t)}};const hi={boolean:(t,e,i)=>i>.5?e:t,color(t,e,i){const n=zt(t||"transparent"),a=n.valid&&zt(e||"transparent");return a&&a.valid?a.mix(n,i).hexString():e},number:(t,e,i)=>t+(e-t)*i};class di{constructor(t,e,i,n){const a=e[i];n=fe([t.to,n,a,t.from]);const s=fe([t.from,a,n]);this._active=!0,this._fn=t.fn||hi[t.type||typeof s],this._easing=lt[t.easing]||lt.linear,this._start=Math.floor(Date.now()+(t.delay||0)),this._duration=this._total=Math.floor(t.duration),this._loop=!!t.loop,this._target=e,this._prop=i,this._from=s,this._to=n,this._promises=void 0}active(){return this._active}update(t,e,i){if(this._active){this._notify(!1);const n=this._target[this._prop],a=i-this._start,s=this._duration-a;this._start=i,this._duration=Math.floor(Math.max(s,t.duration)),this._total+=a,this._loop=!!t.loop,this._to=fe([t.to,e,n,t.from]),this._from=fe([t.from,n,e])}}cancel(){this._active&&(this.tick(Date.now()),this._active=!1,this._notify(!1))}tick(t){const e=t-this._start,i=this._duration,n=this._prop,a=this._from,s=this._loop,r=this._to;let o;if(this._active=a!==r&&(s||e1?2-o:o,o=this._easing(Math.min(1,Math.max(0,o))),this._target[n]=this._fn(a,r,o))}wait(){const t=this._promises||(this._promises=[]);return new Promise((e,i)=>{t.push({res:e,rej:i})})}_notify(t){const e=t?"res":"rej",i=this._promises||[];for(let t=0;t"onProgress"!==t&&"onComplete"!==t&&"fn"!==t}),Yt.set("animations",{colors:{type:"color",properties:["color","borderColor","backgroundColor"]},numbers:{type:"number",properties:["x","y","borderWidth","radius","tension"]}}),Yt.describe("animations",{_fallback:"animation"}),Yt.set("transitions",{active:{animation:{duration:400}},resize:{animation:{duration:0}},show:{animations:{colors:{from:"transparent"},visible:{type:"boolean",duration:0}}},hide:{animations:{colors:{to:"transparent"},visible:{type:"boolean",easing:"linear",fn:t=>0|t}}}});class fi{constructor(t,e){this._chart=t,this._properties=new Map,this.configure(e)}configure(t){if(!g(t))return;const e=this._properties;Object.getOwnPropertyNames(t).forEach(i=>{const n=t[i];if(!g(n))return;const a={};for(const t of ui)a[t]=n[t];(p(n.properties)&&n.properties||[i]).forEach(t=>{t!==i&&e.has(t)||e.set(t,a)})})}_animateOptions(t,e){const i=e.options,n=function(t,e){if(!e)return;let i=t.options;if(i)return i.$shared&&(t.options=i=Object.assign({},i,{$shared:!1,$animations:{}})),i;t.options=e}(t,i);if(!n)return[];const a=this._createAnimations(n,i);return i.$shared&&function(t,e){const i=[],n=Object.keys(e);for(let e=0;e{t.options=i},()=>{}),a}_createAnimations(t,e){const i=this._properties,n=[],a=t.$animations||(t.$animations={}),s=Object.keys(e),r=Date.now();let o;for(o=s.length-1;o>=0;--o){const l=s[o];if("$"===l.charAt(0))continue;if("options"===l){n.push(...this._animateOptions(t,e));continue}const c=e[l];let h=a[l];const d=i.get(l);if(h){if(d&&h.active()){h.update(d,c,r);continue}h.cancel()}d&&d.duration?(a[l]=h=new di(d,t,l,c),n.push(h)):t[l]=c}return n}update(t,e){if(0===this._properties.size)return void Object.assign(t,e);const i=this._createAnimations(t,e);return i.length?(ci.add(this._chart,i),!0):void 0}}function pi(t,e){const i=t&&t.options||{},n=i.reverse,a=void 0===i.min?e:0,s=void 0===i.max?e:0;return{start:n?s:a,end:n?a:s}}function gi(t,e){const i=[],n=t._getSortedDatasetMetas(e);let a,s;for(a=0,s=n.length;a0||!i&&e<0)return a.index}return null}function vi(t,e){const{chart:i,_cachedMeta:n}=t,a=i._stacks||(i._stacks={}),{iScale:s,vScale:r,index:o}=n,l=s.axis,c=r.axis,h=function(t,e,i){return`${t.id}.${e.id}.${i.stack||i.type}`}(s,r,n),d=e.length;let u;for(let t=0;ti[t].axis===e).shift()}function wi(t,e){const i=t.controller.index,n=t.vScale&&t.vScale.axis;if(n){e=e||t._parsed;for(const t of e){const e=t._stacks;if(!e||void 0===e[n]||void 0===e[n][i])return;delete e[n][i]}}}const Oi=t=>"reset"===t||"none"===t,Mi=(t,e)=>e?t:Object.assign({},t);class ki{constructor(t,e){this.chart=t,this._ctx=t.ctx,this.index=e,this._cachedDataOpts={},this._cachedMeta=this.getMeta(),this._type=this._cachedMeta.type,this.options=void 0,this._parsing=!1,this._data=void 0,this._objectData=void 0,this._sharedOptions=void 0,this._drawStart=void 0,this._drawCount=void 0,this.enableOptionSharing=!1,this.$context=void 0,this._syncList=[],this.initialize()}initialize(){const t=this._cachedMeta;this.configure(),this.linkScales(),t._stacked=bi(t.vScale,t),this.addElements()}updateIndex(t){this.index!==t&&wi(this._cachedMeta),this.index=t}linkScales(){const t=this.chart,e=this._cachedMeta,i=this.getDataset(),n=(t,e,i,n)=>"x"===t?e:"r"===t?n:i,a=e.xAxisID=y(i.xAxisID,_i(t,"x")),s=e.yAxisID=y(i.yAxisID,_i(t,"y")),r=e.rAxisID=y(i.rAxisID,_i(t,"r")),o=e.indexAxis,l=e.iAxisID=n(o,a,s,r),c=e.vAxisID=n(o,s,a,r);e.xScale=this.getScaleForId(a),e.yScale=this.getScaleForId(s),e.rScale=this.getScaleForId(r),e.iScale=this.getScaleForId(l),e.vScale=this.getScaleForId(c)}getDataset(){return this.chart.data.datasets[this.index]}getMeta(){return this.chart.getDatasetMeta(this.index)}getScaleForId(t){return this.chart.scales[t]}_getOtherScale(t){const e=this._cachedMeta;return t===e.iScale?e.vScale:e.iScale}reset(){this._update("reset")}_destroy(){const t=this._cachedMeta;this._data&&xe(this._data,this),t._stacked&&wi(t)}_dataCheck(){const t=this.getDataset(),e=t.data||(t.data=[]),i=this._data;if(g(e))this._data=function(t){const e=Object.keys(t),i=new Array(e.length);let n,a,s;for(n=0,a=e.length;n{const e="_onData"+C(t),i=n[t];Object.defineProperty(n,t,{configurable:!0,enumerable:!1,value(...t){const a=i.apply(this,t);return n._chartjs.listeners.forEach(i=>{"function"==typeof i[e]&&i[e](...t)}),a}})}))),this._syncList=[],this._data=e}var n}addElements(){const t=this._cachedMeta;this._dataCheck(),this.datasetElementType&&(t.dataset=new this.datasetElementType)}buildOrUpdateElements(t){const e=this._cachedMeta,i=this.getDataset();let n=!1;this._dataCheck();const a=e._stacked;e._stacked=bi(e.vScale,e),e.stack!==i.stack&&(n=!0,wi(e),e.stack=i.stack),this._resyncElements(t),(n||a!==e._stacked)&&vi(this,e._parsed)}configure(){const t=this.chart.config,e=t.datasetScopeKeys(this._type),i=t.getOptionScopes(this.getDataset(),e,!0);this.options=t.createResolver(i,this.getContext()),this._parsing=this.options.parsing,this._cachedDataOpts={}}parse(t,e){const{_cachedMeta:i,_data:n}=this,{iScale:a,_stacked:s}=i,r=a.axis;let o,l,c,h=0===t&&e===n.length||i._sorted,d=t>0&&i._parsed[t-1];if(!1===this._parsing)i._parsed=n,i._sorted=!0,c=n;else{c=p(n[t])?this.parseArrayData(i,n,t,e):g(n[t])?this.parseObjectData(i,n,t,e):this.parsePrimitiveData(i,n,t,e);const a=()=>null===l[r]||d&&l[r]t&&!e.hidden&&e._stacked&&{keys:gi(i,!0),values:null})(e,i,this.chart),l={min:Number.POSITIVE_INFINITY,max:Number.NEGATIVE_INFINITY},{min:c,max:h}=function(t){const{min:e,max:i,minDefined:n,maxDefined:a}=t.getUserBounds();return{min:n?e:Number.NEGATIVE_INFINITY,max:a?i:Number.POSITIVE_INFINITY}}(r);let d,u;function f(){u=n[d];const e=u[r.axis];return!m(u[t.axis])||c>e||h=0;--d)if(!f()){this.updateRangeFromParsed(l,t,u,o);break}return l}getAllParsedValues(t){const e=this._cachedMeta._parsed,i=[];let n,a,s;for(n=0,a=e.length;n=0&&tthis.getContext(i,n),h);return f.$shared&&(f.$shared=o,a[s]=Object.freeze(Mi(f,o))),f}_resolveAnimations(t,e,i){const n=this.chart,a=this._cachedDataOpts,s="animation-"+e,r=a[s];if(r)return r;let o;if(!1!==n.options.animation){const n=this.chart.config,a=n.datasetAnimationScopeKeys(this._type,e),s=n.getOptionScopes(this.getDataset(),a);o=n.createResolver(s,this.getContext(t,i,e))}const l=new fi(n,o&&o.animations);return o&&o._cacheable&&(a[s]=Object.freeze(l)),l}getSharedOptions(t){if(t.$shared)return this._sharedOptions||(this._sharedOptions=Object.assign({},t))}includeOptions(t,e){return!e||Oi(t)||this.chart._animationsDisabled}updateElement(t,e,i,n){Oi(n)?Object.assign(t,i):this._resolveAnimations(e,n).update(t,i)}updateSharedOptions(t,e,i){t&&!Oi(e)&&this._resolveAnimations(void 0,e).update(t,i)}_setStyle(t,e,i,n){t.active=n;const a=this.getStyle(e,n);this._resolveAnimations(e,i,n).update(t,{options:!n&&this.getSharedOptions(a)||a})}removeHoverStyle(t,e,i){this._setStyle(t,i,"active",!1)}setHoverStyle(t,e,i){this._setStyle(t,i,"active",!0)}_removeDatasetHoverStyle(){const t=this._cachedMeta.dataset;t&&this._setStyle(t,void 0,"active",!1)}_setDatasetHoverStyle(){const t=this._cachedMeta.dataset;t&&this._setStyle(t,void 0,"active",!0)}_resyncElements(t){const e=this._data,i=this._cachedMeta.data;for(const[t,e,i]of this._syncList)this[t](e,i);this._syncList=[];const n=i.length,a=e.length,s=Math.min(a,n);s&&this.parse(0,s),a>n?this._insertElements(n,a-n,t):a{for(t.length+=e,r=t.length-1;r>=s;r--)t[r]=t[r-e]};for(o(a),r=t;rt-e))}return t._cache.$bar}(e,t.type);let n,a,s,r,o=e._length;const l=()=>{32767!==s&&-32768!==s&&(T(r)&&(o=Math.min(o,Math.abs(s-r)||o)),r=s)};for(n=0,a=i.length;nMath.abs(o)&&(l=o,c=r),e[i.axis]=c,e._custom={barStart:l,barEnd:c,start:a,end:s,min:r,max:o}}(t,e,i,n):e[i.axis]=i.parse(t,n),e}function Pi(t,e,i,n){const a=t.iScale,s=t.vScale,r=a.getLabels(),o=a===s,l=[];let c,h,d,u;for(c=i,h=i+n;ct.x,i="left",n="right"):(e=t.base=i?1:-1)}(h,e,s)*a,d===s&&(m-=h/2),c=m+h),m===e.getPixelForValue(s)){const t=U(h)*e.getLineWidthForValue(s)/2;m+=t,h-=t}return{size:h,base:m,head:c,center:c+h/2}}_calculateBarIndexPixels(t,e){const i=e.scale,n=this.options,a=n.skipNull,s=y(n.maxBarThickness,1/0);let r,o;if(e.grouped){const i=a?this._getStackCount(t):e.stackCount,l="flex"===n.barThickness?function(t,e,i,n){const a=e.pixels,s=a[t];let r=t>0?a[t-1]:null,o=t=0;--i)e=Math.max(e,t[i].size(this.resolveDataElementOptions(i))/2);return e>0&&e}getLabelAndValue(t){const e=this._cachedMeta,{xScale:i,yScale:n}=e,a=this.getParsed(t),s=i.getLabelForValue(a.x),r=n.getLabelForValue(a.y),o=a._custom;return{label:e.label,value:"("+s+", "+r+(o?", "+o:"")+")"}}update(t){const e=this._cachedMeta.data;this.updateElements(e,0,e.length,t)}updateElements(t,e,i,n){const a="reset"===n,{iScale:s,vScale:r}=this._cachedMeta,o=this.resolveDataElementOptions(e,n),l=this.getSharedOptions(o),c=this.includeOptions(n,l),h=s.axis,d=r.axis;for(let o=e;o""}}}};class Ni extends ki{constructor(t,e){super(t,e),this.enableOptionSharing=!0,this.innerRadius=void 0,this.outerRadius=void 0,this.offsetX=void 0,this.offsetY=void 0}linkScales(){}parse(t,e){const i=this.getDataset().data,n=this._cachedMeta;if(!1===this._parsing)n._parsed=i;else{let a,s,r=t=>+i[t];if(g(i[t])){const{key:t="value"}=this._parsing;r=e=>+E(i[e],t)}for(a=t,s=t+e;ait(t,o,l,!0)?1:Math.max(e,e*i,n,n*i),p=(t,e,n)=>it(t,o,l,!0)?-1:Math.min(e,e*i,n,n*i),g=f(0,c,d),m=f(B,h,u),b=p(R,c,d),y=p(R+B,h,u);n=(g-b)/2,a=(m-y)/2,s=-(g+b)/2,r=-(m+y)/2}return{ratioX:n,ratioY:a,offsetX:s,offsetY:r}}(u,d,o),b=(i.width-s)/f,y=(i.height-s)/p,v=Math.max(Math.min(b,y)/2,0),_=x(this.options.radius,v),w=(_-Math.max(_*o,0))/this._getVisibleDatasetWeightTotal();this.offsetX=g*_,this.offsetY=m*_,n.total=this.calculateTotal(),this.outerRadius=_-w*this._getRingWeightOffset(this.index),this.innerRadius=Math.max(this.outerRadius-w*h,0),this.updateElements(a,0,a.length,t)}_circumference(t,e){const i=this.options,n=this._cachedMeta,a=this._getCircumference();return e&&i.animation.animateRotate||!this.chart.getDataVisibility(t)||null===n._parsed[t]||n.data[t].hidden?0:this.calculateCircumference(n._parsed[t]*a/N)}updateElements(t,e,i,n){const a="reset"===n,s=this.chart,r=s.chartArea,o=s.options.animation,l=(r.left+r.right)/2,c=(r.top+r.bottom)/2,h=a&&o.animateScale,d=h?0:this.innerRadius,u=h?0:this.outerRadius,f=this.resolveDataElementOptions(e,n),p=this.getSharedOptions(f),g=this.includeOptions(n,p);let m,b=this._getRotation();for(m=0;m0&&!isNaN(t)?N*(Math.abs(t)/e):0}getLabelAndValue(t){const e=this._cachedMeta,i=this.chart,n=i.data.labels||[],a=ei(e._parsed[t],i.options.locale);return{label:n[t]||"",value:a}}getMaxBorderWidth(t){let e=0;const i=this.chart;let n,a,s,r,o;if(!t)for(n=0,a=i.data.datasets.length;n"spacing"!==t,_indexable:t=>"spacing"!==t},Ni.overrides={aspectRatio:1,plugins:{legend:{labels:{generateLabels(t){const e=t.data;if(e.labels.length&&e.datasets.length){const{labels:{pointStyle:i}}=t.legend.options;return e.labels.map((e,n)=>{const a=t.getDatasetMeta(0).controller.getStyle(n);return{text:e,fillStyle:a.backgroundColor,strokeStyle:a.borderColor,lineWidth:a.borderWidth,pointStyle:i,hidden:!t.getDataVisibility(n),index:n}})}return[]}},onClick(t,e,i){i.chart.toggleDataVisibility(e.index),i.chart.update()}},tooltip:{callbacks:{title:()=>"",label(t){let e=t.label;const i=": "+t.formattedValue;return p(e)?(e=e.slice(),e[0]+=i):e+=i,e}}}}};class Fi extends ki{initialize(){this.enableOptionSharing=!0,super.initialize()}update(t){const e=this._cachedMeta,{dataset:i,data:n=[],_dataset:a}=e,s=this.chart._animationsDisabled;let{start:r,count:o}=function(t,e,i){const n=e.length;let a=0,s=n;if(t._sorted){const{iScale:r,_parsed:o}=t,l=r.axis,{min:c,max:h,minDefined:d,maxDefined:u}=r.getUserBounds();d&&(a=nt(Math.min(me(o,r.axis,c).lo,i?n:me(e,l,r.getPixelForValue(c)).lo),0,n-1)),s=u?nt(Math.max(me(o,r.axis,h).hi+1,i?0:me(e,l,r.getPixelForValue(h)).hi+1),a,n)-a:n-a}return{start:a,count:s}}(e,n,s);this._drawStart=r,this._drawCount=o,function(t){const{xScale:e,yScale:i,_scaleRanges:n}=t,a={xmin:e.min,xmax:e.max,ymin:i.min,ymax:i.max};if(!n)return t._scaleRanges=a,!0;const s=n.xmin!==e.min||n.xmax!==e.max||n.ymin!==i.min||n.ymax!==i.max;return Object.assign(n,a),s}(e)&&(r=0,o=n.length),i._chart=this.chart,i._datasetIndex=this.index,i._decimated=!!a._decimated,i.points=n;const l=this.resolveDatasetElementOptions(t);this.options.showLine||(l.borderWidth=0),l.segment=this.options.segment,this.updateElement(i,void 0,{animated:!s,options:l},t),this.updateElements(n,r,o,t)}updateElements(t,e,i,n){const a="reset"===n,{iScale:s,vScale:r,_stacked:o,_dataset:l}=this._cachedMeta,c=this.resolveDataElementOptions(e,n),h=this.getSharedOptions(c),d=this.includeOptions(n,h),u=s.axis,p=r.axis,{spanGaps:g,segment:m}=this.options,b=$(g)?g:Number.POSITIVE_INFINITY,y=this.chart._animationsDisabled||a||"none"===n;let x=e>0&&this.getParsed(e-1);for(let c=e;c0&&i[u]-x[u]>b,m&&(g.parsed=i,g.raw=l.data[c]),d&&(g.options=h||this.resolveDataElementOptions(c,e.active?"active":n)),y||this.updateElement(e,c,g,n),x=i}this.updateSharedOptions(h,n,c)}getMaxOverflow(){const t=this._cachedMeta,e=t.dataset,i=e.options&&e.options.borderWidth||0,n=t.data||[];if(!n.length)return i;const a=n[0].size(this.resolveDataElementOptions(0)),s=n[n.length-1].size(this.resolveDataElementOptions(n.length-1));return Math.max(i,a,s)/2}draw(){const t=this._cachedMeta;t.dataset.updateControlPoints(this.chart.chartArea,t.iScale.axis),super.draw()}}Fi.id="line",Fi.defaults={datasetElementType:"line",dataElementType:"point",showLine:!0,spanGaps:!1},Fi.overrides={scales:{_index_:{type:"category"},_value_:{type:"linear"}}};class Ii extends ki{constructor(t,e){super(t,e),this.innerRadius=void 0,this.outerRadius=void 0}getLabelAndValue(t){const e=this._cachedMeta,i=this.chart,n=i.data.labels||[],a=ei(e._parsed[t].r,i.options.locale);return{label:n[t]||"",value:a}}update(t){const e=this._cachedMeta.data;this._updateRadius(),this.updateElements(e,0,e.length,t)}_updateRadius(){const t=this.chart,e=t.chartArea,i=t.options,n=Math.min(e.right-e.left,e.bottom-e.top),a=Math.max(n/2,0),s=(a-Math.max(i.cutoutPercentage?a/100*i.cutoutPercentage:1,0))/t.getVisibleDatasetCount();this.outerRadius=a-s*this.index,this.innerRadius=this.outerRadius-s}updateElements(t,e,i,n){const a="reset"===n,s=this.chart,r=this.getDataset(),o=s.options.animation,l=this._cachedMeta.rScale,c=l.xCenter,h=l.yCenter,d=l.getIndexAngle(0)-.5*R;let u,f=d;const p=360/this.countVisibleElements();for(u=0;u{!isNaN(t.data[n])&&this.chart.getDataVisibility(n)&&i++}),i}_computeAngle(t,e,i){return this.chart.getDataVisibility(t)?G(this.resolveDataElementOptions(t,e).angle||i):0}}Ii.id="polarArea",Ii.defaults={dataElementType:"arc",animation:{animateRotate:!0,animateScale:!0},animations:{numbers:{type:"number",properties:["x","y","startAngle","endAngle","innerRadius","outerRadius"]}},indexAxis:"r",startAngle:0},Ii.overrides={aspectRatio:1,plugins:{legend:{labels:{generateLabels(t){const e=t.data;if(e.labels.length&&e.datasets.length){const{labels:{pointStyle:i}}=t.legend.options;return e.labels.map((e,n)=>{const a=t.getDatasetMeta(0).controller.getStyle(n);return{text:e,fillStyle:a.backgroundColor,strokeStyle:a.borderColor,lineWidth:a.borderWidth,pointStyle:i,hidden:!t.getDataVisibility(n),index:n}})}return[]}},onClick(t,e,i){i.chart.toggleDataVisibility(e.index),i.chart.update()}},tooltip:{callbacks:{title:()=>"",label:t=>t.chart.data.labels[t.dataIndex]+": "+t.formattedValue}}},scales:{r:{type:"radialLinear",angleLines:{display:!1},beginAtZero:!0,grid:{circular:!0},pointLabels:{display:!1},startAngle:0}}};class zi extends Ni{}zi.id="pie",zi.defaults={cutout:0,rotation:0,circumference:360,radius:"100%"};class Bi extends ki{getLabelAndValue(t){const e=this._cachedMeta.vScale,i=this.getParsed(t);return{label:e.getLabels()[t],value:""+e.getLabelForValue(i[e.axis])}}update(t){const e=this._cachedMeta,i=e.dataset,n=e.data||[],a=e.iScale.getLabels();if(i.points=n,"resize"!==t){const e=this.resolveDatasetElementOptions(t);this.options.showLine||(e.borderWidth=0);const s={_loop:!0,_fullLoop:a.length===n.length,options:e};this.updateElement(i,void 0,s,t)}this.updateElements(n,0,n.length,t)}updateElements(t,e,i,n){const a=this.getDataset(),s=this._cachedMeta.rScale,r="reset"===n;for(let o=e;o"",label:t=>"("+t.label+", "+t.formattedValue+")"}}},scales:{x:{type:"linear"},y:{type:"linear"}}};class Hi{constructor(t){this.options=t||{}}formats(){return Wi()}parse(t,e){return Wi()}format(t,e){return Wi()}add(t,e,i){return Wi()}diff(t,e,i){return Wi()}startOf(t,e,i){return Wi()}endOf(t,e){return Wi()}}Hi.override=function(t){Object.assign(Hi.prototype,t)};var Ui={_date:Hi};function Yi(t,e){return"native"in t?{x:t.x,y:t.y}:$e(t,e)}function $i(t,e,i,n){const{controller:a,data:s,_sorted:r}=t,o=a._cachedMeta.iScale;if(o&&e===o.axis&&"r"!==e&&r&&s.length){const t=o._reversePixels?be:me;if(!n)return t(s,e,i);if(a._sharedOptions){const n=s[0],a="function"==typeof n.getRange&&n.getRange(e);if(a){const n=t(s,e,i-a),r=t(s,e,i+a);return{lo:n.lo,hi:r.hi}}}}return{lo:0,hi:s.length-1}}function Xi(t,e,i,n,a){const s=t.getSortedVisibleDatasetMetas(),r=i[e];for(let t=0,i=s.length;t{t[o](a[r],n)&&s.push({element:t,datasetIndex:e,index:i}),t.inRange(a.x,a.y,n)&&(l=!0)}),i.intersect&&!l?[]:s}var Ki={modes:{index(t,e,i,n){const a=Yi(e,t),s=i.axis||"x",r=i.intersect?qi(t,a,s,n):Gi(t,a,s,!1,n),o=[];return r.length?(t.getSortedVisibleDatasetMetas().forEach(t=>{const e=r[0].index,i=t.data[e];i&&!i.skip&&o.push({element:i,datasetIndex:t.index,index:e})}),o):[]},dataset(t,e,i,n){const a=Yi(e,t),s=i.axis||"xy";let r=i.intersect?qi(t,a,s,n):Gi(t,a,s,!1,n);if(r.length>0){const e=r[0].datasetIndex,i=t.getDatasetMeta(e).data;r=[];for(let t=0;tqi(t,Yi(e,t),i.axis||"xy",n),nearest:(t,e,i,n)=>Gi(t,Yi(e,t),i.axis||"xy",i.intersect,n),x:(t,e,i,n)=>Qi(t,e,{axis:"x",intersect:i.intersect},n),y:(t,e,i,n)=>Qi(t,e,{axis:"y",intersect:i.intersect},n)}};const Zi=["left","top","right","bottom"];function Ji(t,e){return t.filter(t=>t.pos===e)}function tn(t,e){return t.filter(t=>-1===Zi.indexOf(t.pos)&&t.box.axis===e)}function en(t,e){return t.sort((t,i)=>{const n=e?i:t,a=e?t:i;return n.weight===a.weight?n.index-a.index:n.weight-a.weight})}function nn(t,e,i,n){return Math.max(t[i],e[i])+Math.max(t[n],e[n])}function an(t,e){t.top=Math.max(t.top,e.top),t.left=Math.max(t.left,e.left),t.bottom=Math.max(t.bottom,e.bottom),t.right=Math.max(t.right,e.right)}function sn(t,e,i,n){const{pos:a,box:s}=i,r=t.maxPadding;if(!g(a)){i.size&&(t[a]-=i.size);const e=n[i.stack]||{size:0,count:1};e.size=Math.max(e.size,i.horizontal?s.height:s.width),i.size=e.size/e.count,t[a]+=i.size}s.getPadding&&an(r,s.getPadding());const o=Math.max(0,e.outerWidth-nn(r,t,"left","right")),l=Math.max(0,e.outerHeight-nn(r,t,"top","bottom")),c=o!==t.w,h=l!==t.h;return t.w=o,t.h=l,i.horizontal?{same:c,other:h}:{same:h,other:c}}function rn(t,e){const i=e.maxPadding;return function(t){const n={left:0,top:0,right:0,bottom:0};return t.forEach(t=>{n[t]=Math.max(e[t],i[t])}),n}(t?["left","right"]:["top","bottom"])}function on(t,e,i,n){const a=[];let s,r,o,l,c,h;for(s=0,r=t.length,c=0;st.box.fullSize),!0),n=en(Ji(e,"left"),!0),a=en(Ji(e,"right")),s=en(Ji(e,"top"),!0),r=en(Ji(e,"bottom")),o=tn(e,"x"),l=tn(e,"y");return{fullSize:i,leftAndTop:n.concat(s),rightAndBottom:a.concat(l).concat(r).concat(o),chartArea:Ji(e,"chartArea"),vertical:n.concat(a).concat(l),horizontal:s.concat(r).concat(o)}}(t.boxes),l=o.vertical,c=o.horizontal;_(t.boxes,t=>{"function"==typeof t.beforeLayout&&t.beforeLayout()});const h=l.reduce((t,e)=>e.box.options&&!1===e.box.options.display?t:t+1,0)||1,d=Object.freeze({outerWidth:e,outerHeight:i,padding:a,availableWidth:s,availableHeight:r,vBoxMaxWidth:s/2/h,hBoxMaxHeight:r/2}),u=Object.assign({},a);an(u,de(n));const f=Object.assign({maxPadding:u,w:s,h:r,x:a.left,y:a.top},a),p=function(t,e){const i=function(t){const e={};for(const i of t){const{stack:t,pos:n,stackWeight:a}=i;if(!t||!Zi.includes(n))continue;const s=e[t]||(e[t]={count:0,placed:0,weight:0,size:0});s.count++,s.weight+=a}return e}(t),{vBoxMaxWidth:n,hBoxMaxHeight:a}=e;let s,r,o;for(s=0,r=t.length;s{const i=e.box;Object.assign(i,t.chartArea),i.update(f.w,f.h,{left:0,top:0,right:0,bottom:0})})}};class dn{acquireContext(t,e){}releaseContext(t){return!1}addEventListener(t,e,i){}removeEventListener(t,e,i){}getDevicePixelRatio(){return 1}getMaximumSize(t,e,i,n){return e=Math.max(0,e||t.width),i=i||t.height,{width:e,height:Math.max(0,n?Math.floor(e/n):i)}}isAttached(t){return!0}updateConfig(t){}}class un extends dn{acquireContext(t){return t&&t.getContext&&t.getContext("2d")||null}updateConfig(t){t.options.animation=!1}}const fn={touchstart:"mousedown",touchmove:"mousemove",touchend:"mouseup",pointerenter:"mouseenter",pointerdown:"mousedown",pointermove:"mousemove",pointerup:"mouseup",pointerleave:"mouseout",pointerout:"mouseout"},pn=t=>null===t||""===t,gn=!!Ge&&{passive:!0};function mn(t,e,i){t.canvas.removeEventListener(e,i,gn)}function bn(t,e){for(const i of t)if(i===e||i.contains(e))return!0}function yn(t,e,i){const n=t.canvas,a=new MutationObserver(t=>{let e=!1;for(const i of t)e=e||bn(i.addedNodes,n),e=e&&!bn(i.removedNodes,n);e&&i()});return a.observe(document,{childList:!0,subtree:!0}),a}function xn(t,e,i){const n=t.canvas,a=new MutationObserver(t=>{let e=!1;for(const i of t)e=e||bn(i.removedNodes,n),e=e&&!bn(i.addedNodes,n);e&&i()});return a.observe(document,{childList:!0,subtree:!0}),a}const vn=new Map;let wn=0;function On(){const t=window.devicePixelRatio;t!==wn&&(wn=t,vn.forEach((e,i)=>{i.currentDevicePixelRatio!==t&&e()}))}function Mn(t,e,i){const n=t.canvas,a=n&&Ve(n);if(!a)return;const s=c((t,e)=>{const n=a.clientWidth;i(t,e),n{const e=t[0],i=e.contentRect.width,n=e.contentRect.height;0===i&&0===n||s(i,n)});return r.observe(a),function(t,e){vn.size||window.addEventListener("resize",On),vn.set(t,e)}(t,s),r}function kn(t,e,i){i&&i.disconnect(),"resize"===e&&function(t){vn.delete(t),vn.size||window.removeEventListener("resize",On)}(t)}function jn(t,e,i){const n=t.canvas,a=c(e=>{null!==t.ctx&&i(function(t,e){const i=fn[t.type]||t.type,{x:n,y:a}=$e(t,e);return{type:i,chart:e,native:t,x:void 0!==n?n:null,y:void 0!==a?a:null}}(e,t))},t,t=>{const e=t[0];return[e,e.offsetX,e.offsetY]});return function(t,e,i){t.addEventListener(e,i,gn)}(n,e,a),a}class Sn extends dn{acquireContext(t,e){const i=t&&t.getContext&&t.getContext("2d");return i&&i.canvas===t?(function(t,e){const i=t.style,n=t.getAttribute("height"),a=t.getAttribute("width");if(t.$chartjs={initial:{height:n,width:a,style:{display:i.display,height:i.height,width:i.width}}},i.display=i.display||"block",i.boxSizing=i.boxSizing||"border-box",pn(a)){const e=Qe(t,"width");void 0!==e&&(t.width=e)}if(pn(n))if(""===t.style.height)t.height=t.width/(e||2);else{const e=Qe(t,"height");void 0!==e&&(t.height=e)}}(t,e),i):null}releaseContext(t){const e=t.canvas;if(!e.$chartjs)return!1;const i=e.$chartjs.initial;["height","width"].forEach(t=>{const n=i[t];f(n)?e.removeAttribute(t):e.setAttribute(t,n)});const n=i.style||{};return Object.keys(n).forEach(t=>{e.style[t]=n[t]}),e.width=e.width,delete e.$chartjs,!0}addEventListener(t,e,i){this.removeEventListener(t,e);const n=t.$proxies||(t.$proxies={}),a={attach:yn,detach:xn,resize:Mn}[e]||jn;n[e]=a(t,e,i)}removeEventListener(t,e){const i=t.$proxies||(t.$proxies={}),n=i[e];n&&(({attach:kn,detach:kn,resize:kn}[e]||mn)(t,e,n),i[e]=void 0)}getDevicePixelRatio(){return window.devicePixelRatio}getMaximumSize(t,e,i,n){return function(t,e,i,n){const a=He(t),s=Ye(a,"margin"),r=We(a.maxWidth,t,"clientWidth")||I,o=We(a.maxHeight,t,"clientHeight")||I,l=function(t,e,i){let n,a;if(void 0===e||void 0===i){const s=Ve(t);if(s){const t=s.getBoundingClientRect(),r=He(s),o=Ye(r,"border","width"),l=Ye(r,"padding");e=t.width-l.width-o.width,i=t.height-l.height-o.height,n=We(r.maxWidth,s,"clientWidth"),a=We(r.maxHeight,s,"clientHeight")}else e=t.clientWidth,i=t.clientHeight}return{width:e,height:i,maxWidth:n||I,maxHeight:a||I}}(t,e,i);let{width:c,height:h}=l;if("content-box"===a.boxSizing){const t=Ye(a,"border","width"),e=Ye(a,"padding");c-=e.width+t.width,h-=e.height+t.height}return c=Math.max(0,c-s.width),h=Math.max(0,n?Math.floor(c/n):h-s.height),c=Xe(Math.min(c,r,l.maxWidth)),h=Xe(Math.min(h,o,l.maxHeight)),c&&!h&&(h=Xe(c/2)),{width:c,height:h}}(t,e,i,n)}isAttached(t){const e=Ve(t);return!(!e||!e.isConnected)}}class Pn{constructor(){this.x=void 0,this.y=void 0,this.active=!1,this.options=void 0,this.$animations=void 0}tooltipPosition(t){const{x:e,y:i}=this.getProps(["x","y"],t);return{x:e,y:i}}hasValue(){return $(this.x)&&$(this.y)}getProps(t,e){const i=this.$animations;if(!e||!i)return this;const n={};return t.forEach(t=>{n[t]=i[t]&&i[t].active()?i[t]._to:this[t]}),n}}Pn.defaults={},Pn.defaultRoutes=void 0;const Dn={values:t=>p(t)?t:""+t,numeric(t,e,i){if(0===t)return"0";const n=this.chart.options.locale;let a,s=t;if(i.length>1){const e=Math.max(Math.abs(i[0].value),Math.abs(i[i.length-1].value));(e<1e-4||e>1e15)&&(a="scientific"),s=function(t,e){let i=e.length>3?e[2].value-e[1].value:e[1].value-e[0].value;return Math.abs(i)>=1&&t!==Math.floor(t)&&(i=t-Math.floor(t)),i}(t,i)}const r=H(Math.abs(s)),o=Math.max(Math.min(-1*Math.floor(r),20),0),l={notation:a,minimumFractionDigits:o,maximumFractionDigits:o};return Object.assign(l,this.options.ticks.format),ei(t,n,l)},logarithmic(t,e,i){if(0===t)return"0";const n=t/Math.pow(10,Math.floor(H(t)));return 1===n||2===n||5===n?Dn.numeric.call(this,t,e,i):""}};var En={formatters:Dn};function Cn(t,e,i,n,a){const s=y(n,0),r=Math.min(y(a,t.length),t.length);let o,l,c,h=0;for(i=Math.ceil(i),a&&(o=a-n,i=o/Math.floor(o/i)),c=s;c<0;)h++,c=Math.round(s+h*i);for(l=Math.max(s,0);le.lineWidth,tickColor:(t,e)=>e.color,offset:!1,borderDash:[],borderDashOffset:0,borderWidth:1},title:{display:!1,text:"",padding:{top:4,bottom:4}},ticks:{minRotation:0,maxRotation:50,mirror:!1,textStrokeWidth:0,textStrokeColor:"",padding:3,display:!0,autoSkip:!0,autoSkipPadding:3,labelOffset:0,callback:En.formatters.values,minor:{},major:{},align:"center",crossAlign:"near",showLabelBackdrop:!1,backdropColor:"rgba(255, 255, 255, 0.75)",backdropPadding:2}}),Yt.route("scale.ticks","color","","color"),Yt.route("scale.grid","color","","borderColor"),Yt.route("scale.grid","borderColor","","borderColor"),Yt.route("scale.title","color","","color"),Yt.describe("scale",{_fallback:!1,_scriptable:t=>!t.startsWith("before")&&!t.startsWith("after")&&"callback"!==t&&"parser"!==t,_indexable:t=>"borderDash"!==t&&"tickBorderDash"!==t}),Yt.describe("scales",{_fallback:"scale"}),Yt.describe("scale.ticks",{_scriptable:t=>"backdropPadding"!==t&&"callback"!==t,_indexable:t=>"backdropPadding"!==t});const Tn=(t,e,i)=>"top"===e||"left"===e?t[e]+i:t[e]-i;function An(t,e){const i=[],n=t.length/e,a=t.length;let s=0;for(;sr+1e-6)))return l}function Rn(t){return t.drawTicks?t.tickLength:0}function Nn(t,e){if(!t.display)return 0;const i=ue(t.font,e),n=de(t.padding);return(p(t.text)?t.text.length:1)*i.lineHeight+n.height}function Fn(t,e,i){let n=(t=>"start"===t?"left":"end"===t?"right":"center")(t);return(i&&"right"!==e||!i&&"right"===e)&&(n=(t=>"left"===t?"right":"right"===t?"left":t)(n)),n}class In extends Pn{constructor(t){super(),this.id=t.id,this.type=t.type,this.options=void 0,this.ctx=t.ctx,this.chart=t.chart,this.top=void 0,this.bottom=void 0,this.left=void 0,this.right=void 0,this.width=void 0,this.height=void 0,this._margins={left:0,right:0,top:0,bottom:0},this.maxWidth=void 0,this.maxHeight=void 0,this.paddingTop=void 0,this.paddingBottom=void 0,this.paddingLeft=void 0,this.paddingRight=void 0,this.axis=void 0,this.labelRotation=void 0,this.min=void 0,this.max=void 0,this._range=void 0,this.ticks=[],this._gridLineItems=null,this._labelItems=null,this._labelSizes=null,this._length=0,this._maxLength=0,this._longestTextCache={},this._startPixel=void 0,this._endPixel=void 0,this._reversePixels=!1,this._userMax=void 0,this._userMin=void 0,this._suggestedMax=void 0,this._suggestedMin=void 0,this._ticksLength=0,this._borderValue=0,this._cache={},this._dataLimitsCached=!1,this.$context=void 0}init(t){this.options=t.setContext(this.getContext()),this.axis=t.axis,this._userMin=this.parse(t.min),this._userMax=this.parse(t.max),this._suggestedMin=this.parse(t.suggestedMin),this._suggestedMax=this.parse(t.suggestedMax)}parse(t,e){return t}getUserBounds(){let{_userMin:t,_userMax:e,_suggestedMin:i,_suggestedMax:n}=this;return t=b(t,Number.POSITIVE_INFINITY),e=b(e,Number.NEGATIVE_INFINITY),i=b(i,Number.POSITIVE_INFINITY),n=b(n,Number.NEGATIVE_INFINITY),{min:b(t,i),max:b(e,n),minDefined:m(t),maxDefined:m(e)}}getMinMax(t){let e,{min:i,max:n,minDefined:a,maxDefined:s}=this.getUserBounds();if(a&&s)return{min:i,max:n};const r=this.getMatchingVisibleMetas();for(let o=0,l=r.length;on?n:i,n=a&&i>n?i:n,{min:b(i,b(n,i)),max:b(n,b(i,n))}}getPadding(){return{left:this.paddingLeft||0,top:this.paddingTop||0,right:this.paddingRight||0,bottom:this.paddingBottom||0}}getTicks(){return this.ticks}getLabels(){const t=this.chart.data;return this.options.labels||(this.isHorizontal()?t.xLabels:t.yLabels)||t.labels||[]}beforeLayout(){this._cache={},this._dataLimitsCached=!1}beforeUpdate(){v(this.options.beforeUpdate,[this])}update(t,e,i){const{beginAtZero:n,grace:a,ticks:s}=this.options,r=s.sampleSize;this.beforeUpdate(),this.maxWidth=t,this.maxHeight=e,this._margins=i=Object.assign({left:0,right:0,top:0,bottom:0},i),this.ticks=null,this._labelSizes=null,this._gridLineItems=null,this._labelItems=null,this.beforeSetDimensions(),this.setDimensions(),this.afterSetDimensions(),this._maxLength=this.isHorizontal()?this.width+i.left+i.right:this.height+i.top+i.bottom,this._dataLimitsCached||(this.beforeDataLimits(),this.determineDataLimits(),this.afterDataLimits(),this._range=function(t,e,i){const{min:n,max:a}=t,s=x(e,(a-n)/2),r=(t,e)=>i&&0===t?0:t+e;return{min:r(n,-Math.abs(s)),max:r(a,s)}}(this,a,n),this._dataLimitsCached=!0),this.beforeBuildTicks(),this.ticks=this.buildTicks()||[],this.afterBuildTicks();const o=rn)return function(t,e,i,n){let a,s=0,r=i[0];for(n=Math.ceil(n),a=0;at-e).pop(),e}(n);for(let t=0,e=s.length-1;ta)return e}return Math.max(a,1)}(a,e,n);if(s>0){let t,i;const n=s>1?Math.round((o-r)/(s-1)):null;for(Cn(e,l,c,f(n)?0:r-n,r),t=0,i=s-1;t=a||i<=1||!this.isHorizontal())return void(this.labelRotation=n);const c=this._getLabelSizes(),h=c.widest.width,d=c.highest.height,u=nt(this.chart.width-h,0,this.maxWidth);s=t.offset?this.maxWidth/i:u/(i-1),h+6>s&&(s=u/(i-(t.offset?.5:1)),r=this.maxHeight-Rn(t.grid)-e.padding-Nn(t.title,this.chart.options.font),o=Math.sqrt(h*h+d*d),l=Q(Math.min(Math.asin(nt((c.highest.height+6)/s,-1,1)),Math.asin(nt(r/o,-1,1))-Math.asin(nt(d/o,-1,1)))),l=Math.max(n,Math.min(a,l))),this.labelRotation=l}afterCalculateLabelRotation(){v(this.options.afterCalculateLabelRotation,[this])}beforeFit(){v(this.options.beforeFit,[this])}fit(){const t={width:0,height:0},{chart:e,options:{ticks:i,title:n,grid:a}}=this,s=this._isVisible(),r=this.isHorizontal();if(s){const s=Nn(n,e.options.font);if(r?(t.width=this.maxWidth,t.height=Rn(a)+s):(t.height=this.maxHeight,t.width=Rn(a)+s),i.display&&this.ticks.length){const{first:e,last:n,widest:a,highest:s}=this._getLabelSizes(),o=2*i.padding,l=G(this.labelRotation),c=Math.cos(l),h=Math.sin(l);if(r){const e=i.mirror?0:h*a.width+c*s.height;t.height=Math.min(this.maxHeight,t.height+e+o)}else{const e=i.mirror?0:c*a.width+h*s.height;t.width=Math.min(this.maxWidth,t.width+e+o)}this._calculatePadding(e,n,h,c)}}this._handleMargins(),r?(this.width=this._length=e.width-this._margins.left-this._margins.right,this.height=t.height):(this.width=t.width,this.height=this._length=e.height-this._margins.top-this._margins.bottom)}_calculatePadding(t,e,i,n){const{ticks:{align:a,padding:s},position:r}=this.options,o=0!==this.labelRotation,l="top"!==r&&"x"===this.axis;if(this.isHorizontal()){const r=this.getPixelForTick(0)-this.left,c=this.right-this.getPixelForTick(this.ticks.length-1);let h=0,d=0;o?l?(h=n*t.width,d=i*e.height):(h=i*t.height,d=n*e.width):"start"===a?d=e.width:"end"===a?h=t.width:(h=t.width/2,d=e.width/2),this.paddingLeft=Math.max((h-r+s)*this.width/(this.width-r),0),this.paddingRight=Math.max((d-c+s)*this.width/(this.width-c),0)}else{let i=e.height/2,n=t.height/2;"start"===a?(i=0,n=t.height):"end"===a&&(i=e.height,n=0),this.paddingTop=i+s,this.paddingBottom=n+s}}_handleMargins(){this._margins&&(this._margins.left=Math.max(this.paddingLeft,this._margins.left),this._margins.top=Math.max(this.paddingTop,this._margins.top),this._margins.right=Math.max(this.paddingRight,this._margins.right),this._margins.bottom=Math.max(this.paddingBottom,this._margins.bottom))}afterFit(){v(this.options.afterFit,[this])}isHorizontal(){const{axis:t,position:e}=this.options;return"top"===e||"bottom"===e||"x"===t}isFullSize(){return this.options.fullSize}_convertTicksToLabels(t){let e,i;for(this.beforeTickToLabelConversion(),this.generateTickLabels(t),e=0,i=t.length;e{const i=t.gc,n=i.length/2;let a;if(n>e){for(a=0;a({width:a[t]||0,height:s[t]||0});return{first:M(0),last:M(e-1),widest:M(w),highest:M(O),widths:a,heights:s}}getLabelForValue(t){return t}getPixelForValue(t,e){return NaN}getValueForPixel(t){}getPixelForTick(t){const e=this.ticks;return t<0||t>e.length-1?null:this.getPixelForValue(e[t].value)}getPixelForDecimal(t){this._reversePixels&&(t=1-t);const e=this._startPixel+t*this._length;return nt(this._alignToPixels?qt(this.chart,e,0):e,-32768,32767)}getDecimalForPixel(t){const e=(t-this._startPixel)/this._length;return this._reversePixels?1-e:e}getBasePixel(){return this.getPixelForValue(this.getBaseValue())}getBaseValue(){const{min:t,max:e}=this;return t<0&&e<0?e:t>0&&e>0?t:0}getContext(t){const e=this.ticks||[];if(t>=0&&tr*n?r/i:o/n:o*n0}_computeGridLineItems(t){const e=this.axis,i=this.chart,n=this.options,{grid:a,position:s}=n,r=a.offset,o=this.isHorizontal(),l=this.ticks.length+(r?1:0),c=Rn(a),h=[],d=a.setContext(this.getContext()),u=d.drawBorder?d.borderWidth:0,f=u/2,p=function(t){return qt(i,t,u)};let m,b,x,v,_,w,O,M,k,j,S,P;if("top"===s)m=p(this.bottom),w=this.bottom-c,M=m-f,j=p(t.top)+f,P=t.bottom;else if("bottom"===s)m=p(this.top),j=t.top,P=p(t.bottom)-f,w=m+f,M=this.top+c;else if("left"===s)m=p(this.right),_=this.right-c,O=m-f,k=p(t.left)+f,S=t.right;else if("right"===s)m=p(this.left),k=t.left,S=p(t.right)-f,_=m+f,O=this.left+c;else if("x"===e){if("center"===s)m=p((t.top+t.bottom)/2+.5);else if(g(s)){const t=Object.keys(s)[0],e=s[t];m=p(this.chart.scales[t].getPixelForValue(e))}j=t.top,P=t.bottom,w=m+f,M=w+c}else if("y"===e){if("center"===s)m=p((t.left+t.right)/2);else if(g(s)){const t=Object.keys(s)[0],e=s[t];m=p(this.chart.scales[t].getPixelForValue(e))}_=m-f,O=_-c,k=t.left,S=t.right}const D=y(n.ticks.maxTicksLimit,l),E=Math.max(1,Math.ceil(l/D));for(b=0;be.value===t);return i>=0?e.setContext(this.getContext(i)).lineWidth:0}drawGrid(t){const e=this.options.grid,i=this.ctx,n=this._gridLineItems||(this._gridLineItems=this._computeGridLineItems(t));let a,s;const r=(t,e,n)=>{n.width&&n.color&&(i.save(),i.lineWidth=n.width,i.strokeStyle=n.color,i.setLineDash(n.borderDash||[]),i.lineDashOffset=n.borderDashOffset,i.beginPath(),i.moveTo(t.x,t.y),i.lineTo(e.x,e.y),i.stroke(),i.restore())};if(e.display)for(a=0,s=n.length;a{this.drawBackground(),this.drawGrid(t),this.drawTitle()}},{z:i+1,draw:()=>{this.drawBorder()}},{z:e,draw:t=>{this.drawLabels(t)}}]:[{z:e,draw:t=>{this.draw(t)}}]}getMatchingVisibleMetas(t){const e=this.chart.getSortedVisibleDatasetMetas(),i=this.axis+"AxisID",n=[];let a,s;for(a=0,s=e.length;a{const n=i.split("."),a=n.pop(),s=[t].concat(n).join("."),r=e[i].split("."),o=r.pop(),l=r.join(".");Yt.route(s,a,l,o)})}(e,t.defaultRoutes),t.descriptors&&Yt.describe(e,t.descriptors)}(t,s,i),this.override&&Yt.override(t.id,t.overrides)),s}get(t){return this.items[t]}unregister(t){const e=this.items,i=t.id,n=this.scope;i in e&&delete e[i],n&&i in Yt[n]&&(delete Yt[n][i],this.override&&delete Vt[i])}}var Bn=new class{constructor(){this.controllers=new zn(ki,"datasets",!0),this.elements=new zn(Pn,"elements"),this.plugins=new zn(Object,"plugins"),this.scales=new zn(In,"scales"),this._typedRegistries=[this.controllers,this.scales,this.elements]}add(...t){this._each("register",t)}remove(...t){this._each("unregister",t)}addControllers(...t){this._each("register",t,this.controllers)}addElements(...t){this._each("register",t,this.elements)}addPlugins(...t){this._each("register",t,this.plugins)}addScales(...t){this._each("register",t,this.scales)}getController(t){return this._get(t,this.controllers,"controller")}getElement(t){return this._get(t,this.elements,"element")}getPlugin(t){return this._get(t,this.plugins,"plugin")}getScale(t){return this._get(t,this.scales,"scale")}removeControllers(...t){this._each("unregister",t,this.controllers)}removeElements(...t){this._each("unregister",t,this.elements)}removePlugins(...t){this._each("unregister",t,this.plugins)}removeScales(...t){this._each("unregister",t,this.scales)}_each(t,e,i){[...e].forEach(e=>{const n=i||this._getRegistryForType(e);i||n.isForType(e)||n===this.plugins&&e.id?this._exec(t,n,e):_(e,e=>{const n=i||this._getRegistryForType(e);this._exec(t,n,e)})})}_exec(t,e,i){const n=C(t);v(i["before"+n],[],i),e[t](i),v(i["after"+n],[],i)}_getRegistryForType(t){for(let e=0;et.filter(t=>!e.some(e=>t.plugin.id===e.plugin.id));this._notify(n(e,i),t,"stop"),this._notify(n(i,e),t,"start")}}function Wn(t,e){return e||!1!==t?!0===t?{}:t:null}function Hn(t,e,i,n){const a=t.pluginScopeKeys(e),s=t.getOptionScopes(i,a);return t.createResolver(s,n,[""],{scriptable:!1,indexable:!1,allKeys:!0})}function Un(t,e){const i=Yt.datasets[t]||{};return((e.datasets||{})[t]||{}).indexAxis||e.indexAxis||i.indexAxis||"x"}function Yn(t,e){return"x"===t||"y"===t?t:e.axis||("top"===(i=e.position)||"bottom"===i?"x":"left"===i||"right"===i?"y":void 0)||t.charAt(0).toLowerCase();var i}function $n(t){const e=t.options||(t.options={});e.plugins=y(e.plugins,{}),e.scales=function(t,e){const i=Vt[t.type]||{scales:{}},n=e.scales||{},a=Un(t.type,e),s=Object.create(null),r=Object.create(null);return Object.keys(n).forEach(t=>{const e=n[t];if(!g(e))return console.error("Invalid scale configuration for scale: "+t);if(e._proxy)return console.warn("Ignoring resolver passed as options for scale: "+t);const o=Yn(t,e),l=function(t,e){return t===e?"_index_":"_value_"}(o,a),c=i.scales||{};s[o]=s[o]||t,r[t]=S(Object.create(null),[{axis:o},e,c[o],c[l]])}),t.data.datasets.forEach(i=>{const a=i.type||t.type,o=i.indexAxis||Un(a,e),l=(Vt[a]||{}).scales||{};Object.keys(l).forEach(t=>{const e=function(t,e){let i=t;return"_index_"===t?i=e:"_value_"===t&&(i="x"===e?"y":"x"),i}(t,o),a=i[e+"AxisID"]||s[e]||e;r[a]=r[a]||Object.create(null),S(r[a],[{axis:e},n[a],l[t]])})}),Object.keys(r).forEach(t=>{const e=r[t];S(e,[Yt.scales[e.type],Yt.scale])}),r}(t,e)}function Xn(t){return(t=t||{}).datasets=t.datasets||[],t.labels=t.labels||[],t}const qn=new Map,Gn=new Set;function Qn(t,e){let i=qn.get(t);return i||(i=e(),qn.set(t,i),Gn.add(i)),i}const Kn=(t,e,i)=>{const n=E(e,i);void 0!==n&&t.add(n)};class Zn{constructor(t){this._config=function(t){return(t=t||{}).data=Xn(t.data),$n(t),t}(t),this._scopeCache=new Map,this._resolverCache=new Map}get platform(){return this._config.platform}get type(){return this._config.type}set type(t){this._config.type=t}get data(){return this._config.data}set data(t){this._config.data=Xn(t)}get options(){return this._config.options}set options(t){this._config.options=t}get plugins(){return this._config.plugins}update(){const t=this._config;this.clearCache(),$n(t)}clearCache(){this._scopeCache.clear(),this._resolverCache.clear()}datasetScopeKeys(t){return Qn(t,()=>[["datasets."+t,""]])}datasetAnimationScopeKeys(t,e){return Qn(`${t}.transition.${e}`,()=>[[`datasets.${t}.transitions.${e}`,"transitions."+e],["datasets."+t,""]])}datasetElementScopeKeys(t,e){return Qn(`${t}-${e}`,()=>[[`datasets.${t}.elements.${e}`,"datasets."+t,"elements."+e,""]])}pluginScopeKeys(t){const e=t.id;return Qn(`${this.type}-plugin-${e}`,()=>[["plugins."+e,...t.additionalOptionScopes||[]]])}_cachedScopes(t,e){const i=this._scopeCache;let n=i.get(t);return n&&!e||(n=new Map,i.set(t,n)),n}getOptionScopes(t,e,i){const{options:n,type:a}=this,s=this._cachedScopes(t,i),r=s.get(e);if(r)return r;const o=new Set;e.forEach(e=>{t&&(o.add(t),e.forEach(e=>Kn(o,t,e))),e.forEach(t=>Kn(o,n,t)),e.forEach(t=>Kn(o,Vt[a]||{},t)),e.forEach(t=>Kn(o,Yt,t)),e.forEach(t=>Kn(o,Wt,t))});const l=Array.from(o);return 0===l.length&&l.push(Object.create(null)),Gn.has(e)&&s.set(e,l),l}chartOptionScopes(){const{options:t,type:e}=this;return[t,Vt[e]||{},Yt.datasets[e]||{},{type:e},Yt,Wt]}resolveNamedOptions(t,e,i,n=[""]){const a={$shared:!0},{resolver:s,subPrefixes:r}=Jn(this._resolverCache,t,n);let o=s;(function(t,e){const{isScriptable:i,isIndexable:n}=Oe(t);for(const a of e){const e=i(a),s=n(a),r=(s||e)&&t[a];if(e&&(A(r)||ta(r))||s&&p(r))return!0}return!1})(s,e)&&(a.$shared=!1,o=we(s,i=A(i)?i():i,this.createResolver(t,i,r)));for(const t of e)a[t]=o[t];return a}createResolver(t,e,i=[""],n){const{resolver:a}=Jn(this._resolverCache,t,i);return g(e)?we(a,e,void 0,n):a}}function Jn(t,e,i){let n=t.get(e);n||(n=new Map,t.set(e,n));const a=i.join();let s=n.get(a);return s||(s={resolver:_e(e,i),subPrefixes:i.filter(t=>!t.toLowerCase().includes("hover"))},n.set(a,s)),s}const ta=t=>g(t)&&Object.getOwnPropertyNames(t).reduce((e,i)=>e||A(t[i]),!1),ea=["top","bottom","left","right","chartArea"];function ia(t,e){return"top"===t||"bottom"===t||-1===ea.indexOf(t)&&"x"===e}function na(t,e){return function(i,n){return i[t]===n[t]?i[e]-n[e]:i[t]-n[t]}}function aa(t){const e=t.chart,i=e.options.animation;e.notifyPlugins("afterRender"),v(i&&i.onComplete,[t],e)}function sa(t){const e=t.chart,i=e.options.animation;v(i&&i.onProgress,[t],e)}function ra(t){return Be()&&"string"==typeof t?t=document.getElementById(t):t&&t.length&&(t=t[0]),t&&t.canvas&&(t=t.canvas),t}const oa={},la=t=>{const e=ra(t);return Object.values(oa).filter(t=>t.canvas===e).pop()};function ca(t,e,i){const n=Object.keys(t);for(const a of n){const n=+a;if(n>=e){const s=t[a];delete t[a],(i>0||n>e)&&(t[n+i]=s)}}}class ha{constructor(t,e){const i=this.config=new Zn(e),n=ra(t),a=la(n);if(a)throw new Error("Canvas is already in use. Chart with ID '"+a.id+"' must be destroyed before the canvas can be reused.");const s=i.createResolver(i.chartOptionScopes(),this.getContext());this.platform=new(i.platform||function(t){return!Be()||"undefined"!=typeof OffscreenCanvas&&t instanceof OffscreenCanvas?un:Sn}(n)),this.platform.updateConfig(i);const r=this.platform.acquireContext(n,s.aspectRatio),o=r&&r.canvas,l=o&&o.height,c=o&&o.width;this.id=u(),this.ctx=r,this.canvas=o,this.width=c,this.height=l,this._options=s,this._aspectRatio=this.aspectRatio,this._layers=[],this._metasets=[],this._stacks=void 0,this.boxes=[],this.currentDevicePixelRatio=void 0,this.chartArea=void 0,this._active=[],this._lastEvent=void 0,this._listeners={},this._responsiveListeners=void 0,this._sortedMetasets=[],this.scales={},this._plugins=new Vn,this.$proxies={},this._hiddenIndices={},this.attached=!1,this._animationsDisabled=void 0,this.$context=void 0,this._doResize=function(t,e){let i;return function(...n){return e?(clearTimeout(i),i=setTimeout(t,e,n)):t.apply(this,n),e}}(t=>this.update(t),s.resizeDelay||0),this._dataChanges=[],oa[this.id]=this,r&&o?(ci.listen(this,"complete",aa),ci.listen(this,"progress",sa),this._initialize(),this.attached&&this.update()):console.error("Failed to create chart: can't acquire context from the given item")}get aspectRatio(){const{options:{aspectRatio:t,maintainAspectRatio:e},width:i,height:n,_aspectRatio:a}=this;return f(t)?e&&a?a:n?i/n:null:t}get data(){return this.config.data}set data(t){this.config.data=t}get options(){return this._options}set options(t){this.config.options=t}_initialize(){return this.notifyPlugins("beforeInit"),this.options.responsive?this.resize():qe(this,this.options.devicePixelRatio),this.bindEvents(),this.notifyPlugins("afterInit"),this}clear(){return Gt(this.canvas,this.ctx),this}stop(){return ci.stop(this),this}resize(t,e){ci.running(this)?this._resizeBeforeDraw={width:t,height:e}:this._resize(t,e)}_resize(t,e){const i=this.options,n=this.canvas,a=i.maintainAspectRatio&&this.aspectRatio,s=this.platform.getMaximumSize(n,t,e,a),r=i.devicePixelRatio||this.platform.getDevicePixelRatio(),o=this.width?"resize":"attach";this.width=s.width,this.height=s.height,this._aspectRatio=this.aspectRatio,qe(this,r,!0)&&(this.notifyPlugins("resize",{size:s}),v(i.onResize,[this,s],this),this.attached&&this._doResize(o)&&this.render())}ensureScalesHaveIDs(){_(this.options.scales||{},(t,e)=>{t.id=e})}buildOrUpdateScales(){const t=this.options,e=t.scales,i=this.scales,n=Object.keys(i).reduce((t,e)=>(t[e]=!1,t),{});let a=[];e&&(a=a.concat(Object.keys(e).map(t=>{const i=e[t],n=Yn(t,i),a="r"===n,s="x"===n;return{options:i,dposition:a?"chartArea":s?"bottom":"left",dtype:a?"radialLinear":s?"category":"linear"}}))),_(a,e=>{const a=e.options,s=a.id,r=Yn(s,a),o=y(a.type,e.dtype);void 0!==a.position&&ia(a.position,r)===ia(e.dposition)||(a.position=e.dposition),n[s]=!0;let l=null;s in i&&i[s].type===o?l=i[s]:(l=new(Bn.getScale(o))({id:s,type:o,ctx:this.ctx,chart:this}),i[l.id]=l),l.init(a,t)}),_(n,(t,e)=>{t||delete i[e]}),_(i,t=>{hn.configure(this,t,t.options),hn.addBox(this,t)})}_updateMetasets(){const t=this._metasets,e=this.data.datasets.length,i=t.length;if(t.sort((t,e)=>t.index-e.index),i>e){for(let t=e;te.length&&delete this._stacks,t.forEach((t,i)=>{0===e.filter(e=>e===t._dataset).length&&this._destroyDatasetMeta(i)})}buildOrUpdateControllers(){const t=[],e=this.data.datasets;let i,n;for(this._removeUnreferencedMetasets(),i=0,n=e.length;i{this.getDatasetMeta(e).controller.reset()},this)}reset(){this._resetElements(),this.notifyPlugins("reset")}update(t){const e=this.config;e.update();const i=this._options=e.createResolver(e.chartOptionScopes(),this.getContext()),n=this._animationsDisabled=!i.animation;if(this._updateScales(),this._checkEventBindings(),this._updateHiddenIndices(),this._plugins.invalidate(),!1===this.notifyPlugins("beforeUpdate",{mode:t,cancelable:!0}))return;const a=this.buildOrUpdateControllers();this.notifyPlugins("beforeElementsUpdate");let s=0;for(let t=0,e=this.data.datasets.length;t{t.reset()}),this._updateDatasets(t),this.notifyPlugins("afterUpdate",{mode:t}),this._layers.sort(na("z","_idx"));const{_active:r,_lastEvent:o}=this;o?this._eventHandler(o,!0):r.length&&this._updateHoverStyles(r,r,!0),this.render()}_updateScales(){_(this.scales,t=>{hn.removeBox(this,t)}),this.ensureScalesHaveIDs(),this.buildOrUpdateScales()}_checkEventBindings(){const t=this.options,e=new Set(Object.keys(this._listeners)),i=new Set(t.events);L(e,i)&&!!this._responsiveListeners===t.responsive||(this.unbindEvents(),this.bindEvents())}_updateHiddenIndices(){const{_hiddenIndices:t}=this,e=this._getUniformDataChanges()||[];for(const{method:i,start:n,count:a}of e)ca(t,n,"_removeElements"===i?-a:a)}_getUniformDataChanges(){const t=this._dataChanges;if(!t||!t.length)return;this._dataChanges=[];const e=this.data.datasets.length,i=e=>new Set(t.filter(t=>t[0]===e).map((t,e)=>e+","+t.splice(1).join(","))),n=i(0);for(let t=1;tt.split(",")).map(t=>({method:t[1],start:+t[2],count:+t[3]}))}_updateLayout(t){if(!1===this.notifyPlugins("beforeLayout",{cancelable:!0}))return;hn.update(this,this.width,this.height,t);const e=this.chartArea,i=e.width<=0||e.height<=0;this._layers=[],_(this.boxes,t=>{i&&"chartArea"===t.position||(t.configure&&t.configure(),this._layers.push(...t._layers()))},this),this._layers.forEach((t,e)=>{t._idx=e}),this.notifyPlugins("afterLayout")}_updateDatasets(t){if(!1!==this.notifyPlugins("beforeDatasetsUpdate",{mode:t,cancelable:!0})){for(let t=0,e=this.data.datasets.length;t=0;--e)this._drawDataset(t[e]);this.notifyPlugins("afterDatasetsDraw")}_drawDataset(t){const e=this.ctx,i=t._clip,n=!i.disabled,a=this.chartArea,s={meta:t,index:t.index,cancelable:!0};!1!==this.notifyPlugins("beforeDatasetDraw",s)&&(n&&Zt(e,{left:!1===i.left?0:a.left-i.left,right:!1===i.right?this.width:a.right+i.right,top:!1===i.top?0:a.top-i.top,bottom:!1===i.bottom?this.height:a.bottom+i.bottom}),t.controller.draw(),n&&Jt(e),s.cancelable=!1,this.notifyPlugins("afterDatasetDraw",s))}getElementsAtEventForMode(t,e,i,n){const a=Ki.modes[e];return"function"==typeof a?a(this,t,i,n):[]}getDatasetMeta(t){const e=this.data.datasets[t],i=this._metasets;let n=i.filter(t=>t&&t._dataset===e).pop();return n||(n={type:null,data:[],dataset:null,controller:null,hidden:null,xAxisID:null,yAxisID:null,order:e&&e.order||0,index:t,_dataset:e,_parsed:[],_sorted:!1},i.push(n)),n}getContext(){return this.$context||(this.$context=pe(null,{chart:this,type:"chart"}))}getVisibleDatasetCount(){return this.getSortedVisibleDatasetMetas().length}isDatasetVisible(t){const e=this.data.datasets[t];if(!e)return!1;const i=this.getDatasetMeta(t);return"boolean"==typeof i.hidden?!i.hidden:!e.hidden}setDatasetVisibility(t,e){this.getDatasetMeta(t).hidden=!e}toggleDataVisibility(t){this._hiddenIndices[t]=!this._hiddenIndices[t]}getDataVisibility(t){return!this._hiddenIndices[t]}_updateVisibility(t,e,i){const n=i?"show":"hide",a=this.getDatasetMeta(t),s=a.controller._resolveAnimations(void 0,n);T(e)?(a.data[e].hidden=!i,this.update()):(this.setDatasetVisibility(t,i),s.update(a,{visible:i}),this.update(e=>e.datasetIndex===t?n:void 0))}hide(t,e){this._updateVisibility(t,e,!1)}show(t,e){this._updateVisibility(t,e,!0)}_destroyDatasetMeta(t){const e=this._metasets[t];e&&e.controller&&e.controller._destroy(),delete this._metasets[t]}_stop(){let t,e;for(this.stop(),ci.remove(this),t=0,e=this.data.datasets.length;t{e.addEventListener(this,i,n),t[i]=n},n=(t,e,i)=>{t.offsetX=e,t.offsetY=i,this._eventHandler(t)};_(this.options.events,t=>i(t,n))}bindResponsiveEvents(){this._responsiveListeners||(this._responsiveListeners={});const t=this._responsiveListeners,e=this.platform,i=(i,n)=>{e.addEventListener(this,i,n),t[i]=n},n=(i,n)=>{t[i]&&(e.removeEventListener(this,i,n),delete t[i])},a=(t,e)=>{this.canvas&&this.resize(t,e)};let s;const r=()=>{n("attach",r),this.attached=!0,this.resize(),i("resize",a),i("detach",s)};s=()=>{this.attached=!1,n("resize",a),this._stop(),this._resize(0,0),i("attach",r)},e.isAttached(this.canvas)?r():s()}unbindEvents(){_(this._listeners,(t,e)=>{this.platform.removeEventListener(this,e,t)}),this._listeners={},_(this._responsiveListeners,(t,e)=>{this.platform.removeEventListener(this,e,t)}),this._responsiveListeners=void 0}updateHoverStyle(t,e,i){const n=i?"set":"remove";let a,s,r,o;for("dataset"===e&&(a=this.getDatasetMeta(t[0].datasetIndex),a.controller["_"+n+"DatasetHoverStyle"]()),r=0,o=t.length;r{const i=this.getDatasetMeta(t);if(!i)throw new Error("No dataset found at index "+t);return{datasetIndex:t,element:i.data[e],index:e}});!w(i,e)&&(this._active=i,this._lastEvent=null,this._updateHoverStyles(i,e))}notifyPlugins(t,e,i){return this._plugins.notify(this,t,e,i)}_updateHoverStyles(t,e,i){const n=this.options.hover,a=(t,e)=>t.filter(t=>!e.some(e=>t.datasetIndex===e.datasetIndex&&t.index===e.index)),s=a(e,t),r=i?t:a(t,e);s.length&&this.updateHoverStyle(s,n.mode,!1),r.length&&n.mode&&this.updateHoverStyle(r,n.mode,!0)}_eventHandler(t,e){const i={event:t,replay:e,cancelable:!0,inChartArea:Kt(t,this.chartArea,this._minPadding)},n=e=>(e.options.events||this.options.events).includes(t.native.type);if(!1===this.notifyPlugins("beforeEvent",i,n))return;const a=this._handleEvent(t,e,i.inChartArea);return i.cancelable=!1,this.notifyPlugins("afterEvent",i,n),(a||i.changed)&&this.render(),this}_handleEvent(t,e,i){const{_active:n=[],options:a}=this,s=e,r=this._getActiveElements(t,n,i,s),o=function(t){return"mouseup"===t.type||"click"===t.type||"contextmenu"===t.type}(t),l=function(t,e,i,n){return i&&"mouseout"!==t.type?n?e:t:null}(t,this._lastEvent,i,o);i&&(this._lastEvent=null,v(a.onHover,[t,r,this],this),o&&v(a.onClick,[t,r,this],this));const c=!w(r,n);return(c||e)&&(this._active=r,this._updateHoverStyles(r,n,e)),this._lastEvent=l,c}_getActiveElements(t,e,i,n){if("mouseout"===t.type)return[];if(!i)return e;const a=this.options.hover;return this.getElementsAtEventForMode(t,a.mode,a,n)}}const da=()=>_(ha.instances,t=>t._plugins.invalidate());function ua(t,e,i){const{startAngle:n,pixelMargin:a,x:s,y:r,outerRadius:o,innerRadius:l}=e;let c=a/o;t.beginPath(),t.arc(s,r,o,n-c,i+c),l>a?(c=a/l,t.arc(s,r,l,i+c,n-c,!0)):t.arc(s,r,a,i+B,n-B),t.closePath(),t.clip()}function fa(t,e,i,n){return{x:i+t*Math.cos(e),y:n+t*Math.sin(e)}}function pa(t,e,i,n,a){const{x:s,y:r,startAngle:o,pixelMargin:l,innerRadius:c}=e,h=Math.max(e.outerRadius+n+i-l,0),d=c>0?c+n+i+l:0;let u=0;const f=a-o;if(n){const t=((c>0?c-n:0)+(h>0?h-n:0))/2;u=(f-(0!==t?f*t/(t+n):f))/2}const p=(f-Math.max(.001,f*h-i/R)/h)/2,g=o+p+u,m=a-p-u,{outerStart:b,outerEnd:y,innerStart:x,innerEnd:v}=function(t,e,i,n){const a=le(t.options.borderRadius,["outerStart","outerEnd","innerStart","innerEnd"]),s=(i-e)/2,r=Math.min(s,n*e/2),o=t=>{const e=(i-Math.min(s,t))*n/2;return nt(t,0,Math.min(s,e))};return{outerStart:o(a.outerStart),outerEnd:o(a.outerEnd),innerStart:nt(a.innerStart,0,r),innerEnd:nt(a.innerEnd,0,r)}}(e,d,h,m-g),_=h-b,w=h-y,O=g+b/_,M=m-y/w,k=d+x,j=d+v,S=g+x/k,P=m-v/j;if(t.beginPath(),t.arc(s,r,h,O,M),y>0){const e=fa(w,M,s,r);t.arc(e.x,e.y,y,M,m+B)}const D=fa(j,m,s,r);if(t.lineTo(D.x,D.y),v>0){const e=fa(j,P,s,r);t.arc(e.x,e.y,v,m+B,P+Math.PI)}if(t.arc(s,r,d,m-v/d,g+x/d,!0),x>0){const e=fa(k,S,s,r);t.arc(e.x,e.y,x,S+Math.PI,g-B)}const E=fa(_,g,s,r);if(t.lineTo(E.x,E.y),b>0){const e=fa(_,O,s,r);t.arc(e.x,e.y,b,g-B,O)}t.closePath()}Object.defineProperties(ha,{defaults:{enumerable:!0,value:Yt},instances:{enumerable:!0,value:oa},overrides:{enumerable:!0,value:Vt},registry:{enumerable:!0,value:Bn},version:{enumerable:!0,value:"3.7.1"},getChart:{enumerable:!0,value:la},register:{enumerable:!0,value:(...t)=>{Bn.add(...t),da()}},unregister:{enumerable:!0,value:(...t)=>{Bn.remove(...t),da()}}});class ga extends Pn{constructor(t){super(),this.options=void 0,this.circumference=void 0,this.startAngle=void 0,this.endAngle=void 0,this.innerRadius=void 0,this.outerRadius=void 0,this.pixelMargin=0,this.fullCircles=0,t&&Object.assign(this,t)}inRange(t,e,i){const n=this.getProps(["x","y"],i),{angle:a,distance:s}=Z(n,{x:t,y:e}),{startAngle:r,endAngle:o,innerRadius:l,outerRadius:c,circumference:h}=this.getProps(["startAngle","endAngle","innerRadius","outerRadius","circumference"],i),d=this.options.spacing/2,u=y(h,o-r)>=N||it(a,r,o),f=at(s,l+d,c+d);return u&&f}getCenterPoint(t){const{x:e,y:i,startAngle:n,endAngle:a,innerRadius:s,outerRadius:r}=this.getProps(["x","y","startAngle","endAngle","innerRadius","outerRadius","circumference"],t),{offset:o,spacing:l}=this.options,c=(n+a)/2,h=(s+r+l+o)/2;return{x:e+Math.cos(c)*h,y:i+Math.sin(c)*h}}tooltipPosition(t){return this.getCenterPoint(t)}draw(t){const{options:e,circumference:i}=this,n=(e.offset||0)/2,a=(e.spacing||0)/2;if(this.pixelMargin="inner"===e.borderAlign?.33:0,this.fullCircles=i>N?Math.floor(i/N):0,0===i||this.innerRadius<0||this.outerRadius<0)return;t.save();let s=0;if(n){s=n/2;const e=(this.startAngle+this.endAngle)/2;t.translate(Math.cos(e)*s,Math.sin(e)*s),this.circumference>=R&&(s=n)}t.fillStyle=e.backgroundColor,t.strokeStyle=e.borderColor;const r=function(t,e,i,n){const{fullCircles:a,startAngle:s,circumference:r}=e;let o=e.endAngle;if(a){pa(t,e,i,n,s+N);for(let e=0;eo&&s>o;return{count:n,start:l,loop:e.loop,ilen:c(r+(c?o-t:t))%s,x=()=>{f!==p&&(t.lineTo(m,p),t.lineTo(m,f),t.lineTo(m,g))};for(l&&(d=a[y(0)],t.moveTo(d.x,d.y)),h=0;h<=o;++h){if(d=a[y(h)],d.skip)continue;const e=d.x,i=d.y,n=0|e;n===u?(ip&&(p=i),m=(b*m+e)/++b):(x(),t.lineTo(e,i),u=n,b=0,f=p=i),g=i}x()}function _a(t){const e=t.options,i=e.borderDash&&e.borderDash.length;return t._decimated||t._loop||e.tension||"monotone"===e.cubicInterpolationMode||e.stepped||i?xa:va}ga.id="arc",ga.defaults={borderAlign:"center",borderColor:"#fff",borderJoinStyle:void 0,borderRadius:0,borderWidth:2,offset:0,spacing:0,angle:void 0},ga.defaultRoutes={backgroundColor:"backgroundColor"};const wa="function"==typeof Path2D;class Oa extends Pn{constructor(t){super(),this.animated=!0,this.options=void 0,this._chart=void 0,this._loop=void 0,this._fullLoop=void 0,this._path=void 0,this._points=void 0,this._segments=void 0,this._decimated=!1,this._pointsUpdated=!1,this._datasetIndex=void 0,t&&Object.assign(this,t)}updateControlPoints(t,e){const i=this.options;if((i.tension||"monotone"===i.cubicInterpolationMode)&&!i.stepped&&!this._pointsUpdated){const n=i.spanGaps?this._loop:this._fullLoop;ze(this._points,i,t,n,e),this._pointsUpdated=!0}}set points(t){this._points=t,delete this._segments,delete this._path,this._pointsUpdated=!1}get points(){return this._points}get segments(){return this._segments||(this._segments=function(t,e){const i=t.points,n=t.options.spanGaps,a=i.length;if(!a)return[];const s=!!t._loop,{start:r,end:o}=function(t,e,i,n){let a=0,s=e-1;if(i&&!n)for(;aa&&t[s%e].skip;)s--;return s%=e,{start:a,end:s}}(i,a,s,n);return function(t,e,i,n){return n&&n.setContext&&i?function(t,e,i,n){const a=t._chart.getContext(),s=oi(t.options),{_datasetIndex:r,options:{spanGaps:o}}=t,l=i.length,c=[];let h=s,d=e[0].start,u=d;function f(t,e,n,a){const s=o?-1:1;if(t!==e){for(t+=l;i[t%l].skip;)t-=s;for(;i[e%l].skip;)e+=s;t%l!=e%l&&(c.push({start:t%l,end:e%l,loop:n,style:a}),h=a,d=e%l)}}for(const t of e){d=o?d:t.start;let e,s=i[d%l];for(u=d+1;u<=t.end;u++){const o=i[u%l];e=oi(n.setContext(pe(a,{type:"segment",p0:s,p1:o,p0DataIndex:(u-1)%l,p1DataIndex:u%l,datasetIndex:r}))),li(e,h)&&f(d,u-1,t.loop,h),s=o,h=e}d"borderDash"!==t&&"fill"!==t};class ka extends Pn{constructor(t){super(),this.options=void 0,this.parsed=void 0,this.skip=void 0,this.stop=void 0,t&&Object.assign(this,t)}inRange(t,e,i){const n=this.options,{x:a,y:s}=this.getProps(["x","y"],i);return Math.pow(t-a,2)+Math.pow(e-s,2)=i)&&a):["origin","start","end","stack","shape"].indexOf(n)>=0&&n}Ca.id="bar",Ca.defaults={borderSkipped:"start",borderWidth:0,borderRadius:0,inflateAmount:"auto",pointStyle:void 0},Ca.defaultRoutes={backgroundColor:"backgroundColor",borderColor:"borderColor"};class Aa{constructor(t){this.x=t.x,this.y=t.y,this.radius=t.radius}pathSegment(t,e,i){const{x:n,y:a,radius:s}=this;return e=e||{start:0,end:N},t.arc(n,a,s,e.end,e.start,!0),!i.bounds}interpolate(t){const{x:e,y:i,radius:n}=this,a=t.angle;return{x:e+Math.cos(a)*n,y:i+Math.sin(a)*n,angle:a}}}function La(t,e,i){for(;e>t;e--){const t=i[e];if(!isNaN(t.x)&&!isNaN(t.y))break}return e}function Ra(t,e,i){const n=[];for(let a=0;a{e=La(t,e,a);const r=a[t],o=a[e];null!==n?(s.push({x:r.x,y:n}),s.push({x:o.x,y:n})):null!==i&&(s.push({x:i,y:r.y}),s.push({x:i,y:o.y}))}),s}(t,e),i.length?new Oa({points:i,options:{tension:0},_loop:n,_fullLoop:n}):null}function za(t,e,i){let n=t[e].fill;const a=[e];let s;if(!i)return n;for(;!1!==n&&-1===a.indexOf(n);){if(!m(n))return n;if(s=t[n],!s)return!1;if(s.visible)return n;a.push(n),n=s.fill}return!1}function Ba(t,e,i){const{segments:n,points:a}=e;let s=!0,r=!1;t.beginPath();for(const o of n){const{start:n,end:l}=o,c=a[n],h=a[La(n,l,a)];s?(t.moveTo(c.x,c.y),s=!1):(t.lineTo(c.x,i),t.lineTo(c.x,c.y)),r=!!e.pathSegment(t,o,{move:r}),r?t.closePath():t.lineTo(h.x,i)}t.lineTo(e.first().x,i),t.closePath(),t.clip()}function Va(t,e,i,n){if(n)return;let a=e[t],s=i[t];return"angle"===t&&(a=et(a),s=et(s)),{property:t,start:a,end:s}}function Wa(t,e,i,n){return t&&e?n(t[i],e[i]):t?t[i]:e?e[i]:0}function Ha(t,e,i){const{top:n,bottom:a}=e.chart.chartArea,{property:s,start:r,end:o}=i||{};"x"===s&&(t.beginPath(),t.rect(r,n,o-r,a-n),t.clip())}function Ua(t,e,i,n){const a=e.interpolate(i,n);a&&t.lineTo(a.x,a.y)}function Ya(t,e){const{line:i,target:n,property:a,color:s,scale:r}=e,o=function(t,e,i){const n=t.segments,a=t.points,s=e.points,r=[];for(const t of n){let{start:n,end:o}=t;o=La(n,o,a);const l=Va(i,a[n],a[o],t.loop);if(!e.segments){r.push({source:t,target:l,start:a[n],end:a[o]});continue}const c=ri(e,l);for(const e of c){const n=Va(i,s[e.start],s[e.end],e.loop),o=si(t,a,n);for(const t of o)r.push({source:t,target:e,start:{[i]:Wa(l,n,"start",Math.max)},end:{[i]:Wa(l,n,"end",Math.min)}})}}return r}(i,n,a);for(const{source:e,target:l,start:c,end:h}of o){const{style:{backgroundColor:o=s}={}}=e,d=!0!==n;t.save(),t.fillStyle=o,Ha(t,r,d&&Va(a,c,h)),t.beginPath();const u=!!i.pathSegment(t,e);let f;if(d){u?t.closePath():Ua(t,n,h,a);const e=!!n.pathSegment(t,l,{move:u,reverse:!0});f=u&&e,f||Ua(t,n,c,a)}t.closePath(),t.fill(f?"evenodd":"nonzero"),t.restore()}}function $a(t,e,i){const n=Fa(e),{line:a,scale:s,axis:r}=e,o=a.options,l=o.fill,c=o.backgroundColor,{above:h=c,below:d=c}=l||{};n&&a.points.length&&(Zt(t,i),function(t,e){const{line:i,target:n,above:a,below:s,area:r,scale:o}=e,l=i._loop?"angle":e.axis;t.save(),"x"===l&&s!==a&&(Ba(t,n,r.top),Ya(t,{line:i,target:n,color:a,scale:o,property:l}),t.restore(),t.save(),Ba(t,n,r.bottom)),Ya(t,{line:i,target:n,color:s,scale:o,property:l}),t.restore()}(t,{line:a,target:n,above:h,below:d,area:i,scale:s,axis:r}),Jt(t))}var Xa={id:"filler",afterDatasetsUpdate(t,e,i){const n=(t.data.datasets||[]).length,a=[];let s,r,o,l;for(r=0;r=0;--e){const i=a[e].$filler;i&&(i.line.updateControlPoints(s,i.axis),n&&$a(t.ctx,i,s))}},beforeDatasetsDraw(t,e,i){if("beforeDatasetsDraw"!==i.drawTime)return;const n=t.getSortedVisibleDatasetMetas();for(let e=n.length-1;e>=0;--e){const i=n[e].$filler;i&&$a(t.ctx,i,t.chartArea)}},beforeDatasetDraw(t,e,i){const n=e.meta.$filler;n&&!1!==n.fill&&"beforeDatasetDraw"===i.drawTime&&$a(t.ctx,n,t.chartArea)},defaults:{propagate:!0,drawTime:"beforeDatasetDraw"}};new WeakMap;const qa={average(t){if(!t.length)return!1;let e,i,n=0,a=0,s=0;for(e=0,i=t.length;e-1?t.split("\n"):t}function Ka(t,e){const{element:i,datasetIndex:n,index:a}=e,s=t.getDatasetMeta(n).controller,{label:r,value:o}=s.getLabelAndValue(a);return{chart:t,label:r,parsed:s.getParsed(a),raw:t.data.datasets[n].data[a],formattedValue:o,dataset:s.getDataset(),dataIndex:a,datasetIndex:n,element:i}}function Za(t,e){const i=t.chart.ctx,{body:n,footer:a,title:s}=t,{boxWidth:r,boxHeight:o}=e,l=ue(e.bodyFont),c=ue(e.titleFont),h=ue(e.footerFont),d=s.length,u=a.length,f=n.length,p=de(e.padding);let g=p.height,m=0,b=n.reduce((t,e)=>t+e.before.length+e.lines.length+e.after.length,0);b+=t.beforeBody.length+t.afterBody.length,d&&(g+=d*c.lineHeight+(d-1)*e.titleSpacing+e.titleMarginBottom),b&&(g+=f*(e.displayColors?Math.max(o,l.lineHeight):l.lineHeight)+(b-f)*l.lineHeight+(b-1)*e.bodySpacing),u&&(g+=e.footerMarginTop+u*h.lineHeight+(u-1)*e.footerSpacing);let y=0;const x=function(t){m=Math.max(m,i.measureText(t).width+y)};return i.save(),i.font=c.string,_(t.title,x),i.font=l.string,_(t.beforeBody.concat(t.afterBody),x),y=e.displayColors?r+2+e.boxPadding:0,_(n,t=>{_(t.before,x),_(t.lines,x),_(t.after,x)}),y=0,i.font=h.string,_(t.footer,x),i.restore(),m+=p.width,{width:m,height:g}}function Ja(t,e,i,n){const{x:a,width:s}=i,{width:r,chartArea:{left:o,right:l}}=t;let c="center";return"center"===n?c=a<=(o+l)/2?"left":"right":a<=s/2?c="left":a>=r-s/2&&(c="right"),function(t,e,i,n){const{x:a,width:s}=n,r=i.caretSize+i.caretPadding;return"left"===t&&a+s+r>e.width||"right"===t&&a-s-r<0||void 0}(c,t,e,i)&&(c="center"),c}function ts(t,e,i){const n=i.yAlign||e.yAlign||function(t,e){const{y:i,height:n}=e;return it.height-n/2?"bottom":"center"}(t,i);return{xAlign:i.xAlign||e.xAlign||Ja(t,e,i,n),yAlign:n}}function es(t,e,i,n){const{caretSize:a,caretPadding:s,cornerRadius:r}=t,{xAlign:o,yAlign:l}=i,c=a+s,{topLeft:h,topRight:d,bottomLeft:u,bottomRight:f}=he(r);let p=function(t,e){let{x:i,width:n}=t;return"right"===e?i-=n:"center"===e&&(i-=n/2),i}(e,o);const g=function(t,e,i){let{y:n,height:a}=t;return"top"===e?n+=i:n-="bottom"===e?a+i:a/2,n}(e,l,c);return"center"===l?"left"===o?p+=c:"right"===o&&(p-=c):"left"===o?p-=Math.max(h,u)+a:"right"===o&&(p+=Math.max(d,f)+a),{x:nt(p,0,n.width-e.width),y:nt(g,0,n.height-e.height)}}function is(t,e,i){const n=de(i.padding);return"center"===e?t.x+t.width/2:"right"===e?t.x+t.width-n.right:t.x+n.left}function ns(t){return Ga([],Qa(t))}function as(t,e){const i=e&&e.dataset&&e.dataset.tooltip&&e.dataset.tooltip.callbacks;return i?t.override(i):t}class ss extends Pn{constructor(t){super(),this.opacity=0,this._active=[],this._eventPosition=void 0,this._size=void 0,this._cachedAnimations=void 0,this._tooltipItems=[],this.$animations=void 0,this.$context=void 0,this.chart=t.chart||t._chart,this._chart=this.chart,this.options=t.options,this.dataPoints=void 0,this.title=void 0,this.beforeBody=void 0,this.body=void 0,this.afterBody=void 0,this.footer=void 0,this.xAlign=void 0,this.yAlign=void 0,this.x=void 0,this.y=void 0,this.height=void 0,this.width=void 0,this.caretX=void 0,this.caretY=void 0,this.labelColors=void 0,this.labelPointStyles=void 0,this.labelTextColors=void 0}initialize(t){this.options=t,this._cachedAnimations=void 0,this.$context=void 0}_resolveAnimations(){const t=this._cachedAnimations;if(t)return t;const e=this.chart,i=this.options.setContext(this.getContext()),n=i.enabled&&e.options.animation&&i.animations,a=new fi(this.chart,n);return n._cacheable&&(this._cachedAnimations=Object.freeze(a)),a}getContext(){return this.$context||(this.$context=(this,pe(this.chart.getContext(),{tooltip:this,tooltipItems:this._tooltipItems,type:"tooltip"})))}getTitle(t,e){const{callbacks:i}=e,n=i.beforeTitle.apply(this,[t]),a=i.title.apply(this,[t]),s=i.afterTitle.apply(this,[t]);let r=[];return r=Ga(r,Qa(n)),r=Ga(r,Qa(a)),r=Ga(r,Qa(s)),r}getBeforeBody(t,e){return ns(e.callbacks.beforeBody.apply(this,[t]))}getBody(t,e){const{callbacks:i}=e,n=[];return _(t,t=>{const e={before:[],lines:[],after:[]},a=as(i,t);Ga(e.before,Qa(a.beforeLabel.call(this,t))),Ga(e.lines,a.label.call(this,t)),Ga(e.after,Qa(a.afterLabel.call(this,t))),n.push(e)}),n}getAfterBody(t,e){return ns(e.callbacks.afterBody.apply(this,[t]))}getFooter(t,e){const{callbacks:i}=e,n=i.beforeFooter.apply(this,[t]),a=i.footer.apply(this,[t]),s=i.afterFooter.apply(this,[t]);let r=[];return r=Ga(r,Qa(n)),r=Ga(r,Qa(a)),r=Ga(r,Qa(s)),r}_createItems(t){const e=this._active,i=this.chart.data,n=[],a=[],s=[];let r,o,l=[];for(r=0,o=e.length;rt.filter(e,n,a,i))),t.itemSort&&(l=l.sort((e,n)=>t.itemSort(e,n,i))),_(l,e=>{const i=as(t.callbacks,e);n.push(i.labelColor.call(this,e)),a.push(i.labelPointStyle.call(this,e)),s.push(i.labelTextColor.call(this,e))}),this.labelColors=n,this.labelPointStyles=a,this.labelTextColors=s,this.dataPoints=l,l}update(t,e){const i=this.options.setContext(this.getContext()),n=this._active;let a,s=[];if(n.length){const t=qa[i.position].call(this,n,this._eventPosition);s=this._createItems(i),this.title=this.getTitle(s,i),this.beforeBody=this.getBeforeBody(s,i),this.body=this.getBody(s,i),this.afterBody=this.getAfterBody(s,i),this.footer=this.getFooter(s,i);const e=this._size=Za(this,i),r=Object.assign({},t,e),o=ts(this.chart,i,r),l=es(i,r,o,this.chart);this.xAlign=o.xAlign,this.yAlign=o.yAlign,a={opacity:1,x:l.x,y:l.y,width:e.width,height:e.height,caretX:t.x,caretY:t.y}}else 0!==this.opacity&&(a={opacity:0});this._tooltipItems=s,this.$context=void 0,a&&this._resolveAnimations().update(this,a),t&&i.external&&i.external.call(this,{chart:this.chart,tooltip:this,replay:e})}drawCaret(t,e,i,n){const a=this.getCaretPosition(t,i,n);e.lineTo(a.x1,a.y1),e.lineTo(a.x2,a.y2),e.lineTo(a.x3,a.y3)}getCaretPosition(t,e,i){const{xAlign:n,yAlign:a}=this,{caretSize:s,cornerRadius:r}=i,{topLeft:o,topRight:l,bottomLeft:c,bottomRight:h}=he(r),{x:d,y:u}=t,{width:f,height:p}=e;let g,m,b,y,x,v;return"center"===a?(x=u+p/2,"left"===n?(g=d,m=g-s,y=x+s,v=x-s):(g=d+f,m=g+s,y=x-s,v=x+s),b=g):(m="left"===n?d+Math.max(o,c)+s:"right"===n?d+f-Math.max(l,h)-s:this.caretX,"top"===a?(y=u,x=y-s,g=m-s,b=m+s):(y=u+p,x=y+s,g=m+s,b=m-s),v=y),{x1:g,x2:m,x3:b,y1:y,y2:x,y3:v}}drawTitle(t,e,i){const n=this.title,a=n.length;let s,r,o;if(a){const l=ii(i.rtl,this.x,this.width);for(t.x=is(this,i.titleAlign,i),e.textAlign=l.textAlign(i.titleAlign),e.textBaseline="middle",s=ue(i.titleFont),r=i.titleSpacing,e.fillStyle=i.titleColor,e.font=s.string,o=0;o0!==t)?(t.beginPath(),t.fillStyle=a.multiKeyBackground,ae(t,{x:e,y:p,w:l,h:o,radius:r}),t.fill(),t.stroke(),t.fillStyle=s.backgroundColor,t.beginPath(),ae(t,{x:i,y:p+1,w:l-2,h:o-2,radius:r}),t.fill()):(t.fillStyle=a.multiKeyBackground,t.fillRect(e,p,l,o),t.strokeRect(e,p,l,o),t.fillStyle=s.backgroundColor,t.fillRect(i,p+1,l-2,o-2))}t.fillStyle=this.labelTextColors[i]}drawBody(t,e,i){const{body:n}=this,{bodySpacing:a,bodyAlign:s,displayColors:r,boxHeight:o,boxWidth:l,boxPadding:c}=i,h=ue(i.bodyFont);let d=h.lineHeight,u=0;const f=ii(i.rtl,this.x,this.width),p=function(i){e.fillText(i,f.x(t.x+u),t.y+d/2),t.y+=d+a},g=f.textAlign(s);let m,b,y,x,v,w,O;for(e.textAlign=s,e.textBaseline="middle",e.font=h.string,t.x=is(this,g,i),e.fillStyle=i.bodyColor,_(this.beforeBody,p),u=r&&"right"!==g?"center"===s?l/2+c:l+2+c:0,x=0,w=n.length;x0&&e.stroke()}_updateAnimationTarget(t){const e=this.chart,i=this.$animations,n=i&&i.x,a=i&&i.y;if(n||a){const i=qa[t.position].call(this,this._active,this._eventPosition);if(!i)return;const s=this._size=Za(this,t),r=Object.assign({},i,this._size),o=ts(e,t,r),l=es(t,r,o,e);n._to===l.x&&a._to===l.y||(this.xAlign=o.xAlign,this.yAlign=o.yAlign,this.width=s.width,this.height=s.height,this.caretX=i.x,this.caretY=i.y,this._resolveAnimations().update(this,l))}}draw(t){const e=this.options.setContext(this.getContext());let i=this.opacity;if(!i)return;this._updateAnimationTarget(e);const n={width:this.width,height:this.height},a={x:this.x,y:this.y};i=Math.abs(i)<.001?0:i;const s=de(e.padding),r=this.title.length||this.beforeBody.length||this.body.length||this.afterBody.length||this.footer.length;e.enabled&&r&&(t.save(),t.globalAlpha=i,this.drawBackground(a,t,n,e),function(t,e){let i,n;"ltr"!==e&&"rtl"!==e||(i=t.canvas.style,n=[i.getPropertyValue("direction"),i.getPropertyPriority("direction")],i.setProperty("direction",e,"important"),t.prevTextDirection=n)}(t,e.textDirection),a.y+=s.top,this.drawTitle(a,t,e),this.drawBody(a,t,e),this.drawFooter(a,t,e),function(t,e){void 0!==e&&(delete t.prevTextDirection,t.canvas.style.setProperty("direction",e[0],e[1]))}(t,e.textDirection),t.restore())}getActiveElements(){return this._active||[]}setActiveElements(t,e){const i=this._active,n=t.map(({datasetIndex:t,index:e})=>{const i=this.chart.getDatasetMeta(t);if(!i)throw new Error("Cannot find a dataset at index "+t);return{datasetIndex:t,element:i.data[e],index:e}}),a=!w(i,n),s=this._positionChanged(n,e);(a||s)&&(this._active=n,this._eventPosition=e,this._ignoreReplayEvents=!0,this.update(!0))}handleEvent(t,e,i=!0){if(e&&this._ignoreReplayEvents)return!1;this._ignoreReplayEvents=!1;const n=this.options,a=this._active||[],s=this._getActiveElements(t,a,e,i),r=this._positionChanged(s,t),o=e||!w(s,a)||r;return o&&(this._active=s,(n.enabled||n.external)&&(this._eventPosition={x:t.x,y:t.y},this.update(!0,e))),o}_getActiveElements(t,e,i,n){const a=this.options;if("mouseout"===t.type)return[];if(!n)return e;const s=this.chart.getElementsAtEventForMode(t,a.mode,a,i);return a.reverse&&s.reverse(),s}_positionChanged(t,e){const{caretX:i,caretY:n,options:a}=this,s=qa[a.position].call(this,t,e);return!1!==s&&(i!==s.x||n!==s.y)}}ss.positioners=qa;var rs={id:"tooltip",_element:ss,positioners:qa,afterInit(t,e,i){i&&(t.tooltip=new ss({chart:t,options:i}))},beforeUpdate(t,e,i){t.tooltip&&t.tooltip.initialize(i)},reset(t,e,i){t.tooltip&&t.tooltip.initialize(i)},afterDraw(t){const e=t.tooltip,i={tooltip:e};!1!==t.notifyPlugins("beforeTooltipDraw",i)&&(e&&e.draw(t.ctx),t.notifyPlugins("afterTooltipDraw",i))},afterEvent(t,e){if(t.tooltip){const i=e.replay;t.tooltip.handleEvent(e.event,i,e.inChartArea)&&(e.changed=!0)}},defaults:{enabled:!0,external:null,position:"average",backgroundColor:"rgba(0,0,0,0.8)",titleColor:"#fff",titleFont:{weight:"bold"},titleSpacing:2,titleMarginBottom:6,titleAlign:"left",bodyColor:"#fff",bodySpacing:2,bodyFont:{},bodyAlign:"left",footerColor:"#fff",footerSpacing:2,footerMarginTop:6,footerFont:{weight:"bold"},footerAlign:"left",padding:6,caretPadding:2,caretSize:5,cornerRadius:6,boxHeight:(t,e)=>e.bodyFont.size,boxWidth:(t,e)=>e.bodyFont.size,multiKeyBackground:"#fff",displayColors:!0,boxPadding:0,borderColor:"rgba(0,0,0,0)",borderWidth:0,animation:{duration:400,easing:"easeOutQuart"},animations:{numbers:{type:"number",properties:["x","y","width","height","caretX","caretY"]},opacity:{easing:"linear",duration:200}},callbacks:{beforeTitle:d,title(t){if(t.length>0){const e=t[0],i=e.chart.data.labels,n=i?i.length:0;if(this&&this.options&&"dataset"===this.options.mode)return e.dataset.label||"";if(e.label)return e.label;if(n>0&&e.dataIndex"filter"!==t&&"itemSort"!==t&&"external"!==t,_indexable:!1,callbacks:{_scriptable:!1,_indexable:!1},animation:{_fallback:!1},animations:{_fallback:"animation"}},additionalOptionScopes:["interaction"]};class os extends In{constructor(t){super(t),this._startValue=void 0,this._valueRange=0,this._addedLabels=[]}init(t){const e=this._addedLabels;if(e.length){const t=this.getLabels();for(const{index:i,label:n}of e)t[i]===n&&t.splice(i,1);this._addedLabels=[]}super.init(t)}parse(t,e){if(f(t))return null;const i=this.getLabels();return((t,e)=>null===t?null:nt(Math.round(t),0,e))(e=isFinite(e)&&i[e]===t?e:function(t,e,i,n){const a=t.indexOf(e);return-1===a?((t,e,i,n)=>("string"==typeof e?(i=t.push(e)-1,n.unshift({index:i,label:e})):isNaN(e)&&(i=null),i))(t,e,i,n):a!==t.lastIndexOf(e)?i:a}(i,t,y(e,t),this._addedLabels),i.length-1)}determineDataLimits(){const{minDefined:t,maxDefined:e}=this.getUserBounds();let{min:i,max:n}=this.getMinMax(!0);"ticks"===this.options.bounds&&(t||(i=0),e||(n=this.getLabels().length-1)),this.min=i,this.max=n}buildTicks(){const t=this.min,e=this.max,i=this.options.offset,n=[];let a=this.getLabels();a=0===t&&e===a.length-1?a:a.slice(t,e+1),this._valueRange=Math.max(a.length-(i?0:1),1),this._startValue=this.min-(i?.5:0);for(let i=t;i<=e;i++)n.push({value:i});return n}getLabelForValue(t){const e=this.getLabels();return t>=0&&te.length-1?null:this.getPixelForValue(e[t].value)}getValueForPixel(t){return Math.round(this._startValue+this.getDecimalForPixel(t)*this._valueRange)}getBasePixel(){return this.bottom}}function ls(t,e,{horizontal:i,minRotation:n}){const a=G(n),s=(i?Math.sin(a):Math.cos(a))||.001,r=.75*e*(""+t).length;return Math.min(e/s,r)}os.id="category",os.defaults={ticks:{callback:os.prototype.getLabelForValue}};class cs extends In{constructor(t){super(t),this.start=void 0,this.end=void 0,this._startValue=void 0,this._endValue=void 0,this._valueRange=0}parse(t,e){return f(t)||("number"==typeof t||t instanceof Number)&&!isFinite(+t)?null:+t}handleTickRangeOptions(){const{beginAtZero:t}=this.options,{minDefined:e,maxDefined:i}=this.getUserBounds();let{min:n,max:a}=this;const s=t=>n=e?n:t,r=t=>a=i?a:t;if(t){const t=U(n),e=U(a);t<0&&e<0?r(0):t>0&&e>0&&s(0)}if(n===a){let e=1;(a>=Number.MAX_SAFE_INTEGER||n<=Number.MIN_SAFE_INTEGER)&&(e=Math.abs(.05*a)),r(a+e),t||s(n-e)}this.min=n,this.max=a}getTickLimit(){const t=this.options.ticks;let e,{maxTicksLimit:i,stepSize:n}=t;return n?(e=Math.ceil(this.max/n)-Math.floor(this.min/n)+1,e>1e3&&(console.warn(`scales.${this.id}.ticks.stepSize: ${n} would result generating up to ${e} ticks. Limiting to 1000.`),e=1e3)):(e=this.computeTickLimit(),i=i||11),i&&(e=Math.min(i,e)),e}computeTickLimit(){return Number.POSITIVE_INFINITY}buildTicks(){const t=this.options,e=t.ticks;let i=this.getTickLimit();i=Math.max(2,i);const n=function(t,e){const i=[],{bounds:n,step:a,min:s,max:r,precision:o,count:l,maxTicks:c,maxDigits:h,includeBounds:d}=t,u=a||1,p=c-1,{min:g,max:m}=e,b=!f(s),y=!f(r),x=!f(l),v=(m-g)/(h+1);let _,w,O,M,k=Y((m-g)/p/u)*u;if(k<1e-14&&!b&&!y)return[{value:g},{value:m}];M=Math.ceil(m/k)-Math.floor(g/k),M>p&&(k=Y(M*k/p/u)*u),f(o)||(_=Math.pow(10,o),k=Math.ceil(k*_)/_),"ticks"===n?(w=Math.floor(g/k)*k,O=Math.ceil(m/k)*k):(w=g,O=m),b&&y&&a&&function(t,e){const i=Math.round(t);return i-e<=t&&i+e>=t}((r-s)/a,k/1e3)?(M=Math.round(Math.min((r-s)/k,c)),k=(r-s)/M,w=s,O=r):x?(w=b?s:w,O=y?r:O,M=l-1,k=(O-w)/M):(M=(O-w)/k,M=X(M,Math.round(M),k/1e3)?Math.round(M):Math.ceil(M));const j=Math.max(K(k),K(w));_=Math.pow(10,f(o)?j:o),w=Math.round(w*_)/_,O=Math.round(O*_)/_;let S=0;for(b&&(d&&w!==s?(i.push({value:s}),w0?i:null;this._zero=!0}determineDataLimits(){const{min:t,max:e}=this.getMinMax(!0);this.min=m(t)?Math.max(0,t):null,this.max=m(e)?Math.max(0,e):null,this.options.beginAtZero&&(this._zero=!0),this.handleTickRangeOptions()}handleTickRangeOptions(){const{minDefined:t,maxDefined:e}=this.getUserBounds();let i=this.min,n=this.max;const a=e=>i=t?i:e,s=t=>n=e?n:t,r=(t,e)=>Math.pow(10,Math.floor(H(t))+e);i===n&&(i<=0?(a(1),s(10)):(a(r(i,-1)),s(r(n,1)))),i<=0&&a(r(n,-1)),n<=0&&s(r(i,1)),this._zero&&this.min!==this._suggestedMin&&i===r(this.min,0)&&a(r(i,-1)),this.min=i,this.max=n}buildTicks(){const t=this.options,e=function(t,e){const i=Math.floor(H(e.max)),n=Math.ceil(e.max/Math.pow(10,i)),a=[];let s=b(t.min,Math.pow(10,Math.floor(H(e.min)))),r=Math.floor(H(s)),o=Math.floor(s/Math.pow(10,r)),l=r<0?Math.pow(10,Math.abs(r)):1;do{a.push({value:s,major:ds(s)}),++o,10===o&&(o=1,++r,l=r>=0?1:l),s=Math.round(o*Math.pow(10,r)*l)/l}while(ra?{start:e-i,end:e}:{start:e,end:e+i}}function gs(t,e,i,n,a){const s=Math.abs(Math.sin(i)),r=Math.abs(Math.cos(i));let o=0,l=0;n.starte.r&&(o=(n.end-e.r)/s,t.r=Math.max(t.r,e.r+o)),a.starte.b&&(l=(a.end-e.b)/r,t.b=Math.max(t.b,e.b+l))}function ms(t){return 0===t||180===t?"center":t<180?"left":"right"}function bs(t,e,i){return 90===i||270===i?t-=e/2:(i>270||i<90)&&(t-=e),t}function ys(t,e,i,n){const{ctx:a}=t;if(i)a.arc(t.xCenter,t.yCenter,e,0,N);else{let i=t.getPointPosition(0,e);a.moveTo(i.x,i.y);for(let s=1;s{const i=v(this.options.pointLabels.callback,[t,e],this);return i||0===i?i:""}).filter((t,e)=>this.chart.getDataVisibility(e))}fit(){const t=this.options;t.display&&t.pointLabels.display?function(t){const e={l:t.left+t._padding.left,r:t.right-t._padding.right,t:t.top+t._padding.top,b:t.bottom-t._padding.bottom},i=Object.assign({},e),n=[],a=[],s=t._pointLabels.length,r=t.options.pointLabels,o=r.centerPointLabels?R/s:0;for(let d=0;d=0&&t=0;a--){const e=n.setContext(t.getPointLabelContext(a)),s=ue(e.font),{x:r,y:o,textAlign:l,left:c,top:h,right:d,bottom:u}=t._pointLabelItems[a],{backdropColor:p}=e;if(!f(p)){const t=de(e.backdropPadding);i.fillStyle=p,i.fillRect(c-t.left,h-t.top,d-c+t.width,u-h+t.height)}ie(i,t._pointLabels[a],r,o+s.lineHeight/2,s,{color:e.color,textAlign:l,textBaseline:"middle"})}}(this,a),n.display&&this.ticks.forEach((t,e)=>{0!==e&&(r=this.getDistanceFromCenterForValue(t.value),function(t,e,i,n){const a=t.ctx,s=e.circular,{color:r,lineWidth:o}=e;!s&&!n||!r||!o||i<0||(a.save(),a.strokeStyle=r,a.lineWidth=o,a.setLineDash(e.borderDash),a.lineDashOffset=e.borderDashOffset,a.beginPath(),ys(t,i,s,n),a.closePath(),a.stroke(),a.restore())}(this,n.setContext(this.getContext(e-1)),r,a))}),i.display){for(t.save(),s=a-1;s>=0;s--){const n=i.setContext(this.getPointLabelContext(s)),{color:a,lineWidth:l}=n;l&&a&&(t.lineWidth=l,t.strokeStyle=a,t.setLineDash(n.borderDash),t.lineDashOffset=n.borderDashOffset,r=this.getDistanceFromCenterForValue(e.ticks.reverse?this.min:this.max),o=this.getPointPosition(s,r),t.beginPath(),t.moveTo(this.xCenter,this.yCenter),t.lineTo(o.x,o.y),t.stroke())}t.restore()}}drawBorder(){}drawLabels(){const t=this.ctx,e=this.options,i=e.ticks;if(!i.display)return;const n=this.getIndexAngle(0);let a,s;t.save(),t.translate(this.xCenter,this.yCenter),t.rotate(n),t.textAlign="center",t.textBaseline="middle",this.ticks.forEach((n,r)=>{if(0===r&&!e.reverse)return;const o=i.setContext(this.getContext(r)),l=ue(o.font);if(a=this.getDistanceFromCenterForValue(this.ticks[r].value),o.showLabelBackdrop){t.font=l.string,s=t.measureText(n.label).width,t.fillStyle=o.backdropColor;const e=de(o.backdropPadding);t.fillRect(-s/2-e.left,-a-l.size/2-e.top,s+e.width,l.size+e.height)}ie(t,n.label,0,-a,l,{color:o.color})}),t.restore()}drawTitle(){}}xs.id="radialLinear",xs.defaults={display:!0,animate:!0,position:"chartArea",angleLines:{display:!0,lineWidth:1,borderDash:[],borderDashOffset:0},grid:{circular:!1},startAngle:0,ticks:{showLabelBackdrop:!0,callback:En.formatters.numeric},pointLabels:{backdropColor:void 0,backdropPadding:2,display:!0,font:{size:10},callback:t=>t,padding:5,centerPointLabels:!1}},xs.defaultRoutes={"angleLines.color":"borderColor","pointLabels.color":"color","ticks.color":"color"},xs.descriptors={angleLines:{_fallback:"grid"}};const vs={millisecond:{common:!0,size:1,steps:1e3},second:{common:!0,size:1e3,steps:60},minute:{common:!0,size:6e4,steps:60},hour:{common:!0,size:36e5,steps:24},day:{common:!0,size:864e5,steps:30},week:{common:!1,size:6048e5,steps:4},month:{common:!0,size:2628e6,steps:12},quarter:{common:!1,size:7884e6,steps:4},year:{common:!0,size:3154e7}},_s=Object.keys(vs);function ws(t,e){return t-e}function Os(t,e){if(f(e))return null;const i=t._adapter,{parser:n,round:a,isoWeekday:s}=t._parseOpts;let r=e;return"function"==typeof n&&(r=n(r)),m(r)||(r="string"==typeof n?i.parse(r,n):i.parse(r)),null===r?null:(a&&(r="week"!==a||!$(s)&&!0!==s?i.startOf(r,a):i.startOf(r,"isoWeek",s)),+r)}function Ms(t,e,i,n){const a=_s.length;for(let s=_s.indexOf(t);s=e?i[n]:i[a]]=!0}}else t[e]=!0}function js(t,e,i){const n=[],a={},s=e.length;let r,o;for(r=0;r=0&&(e[l].major=!0);return e}(t,n,a,i):n}class Ss extends In{constructor(t){super(t),this._cache={data:[],labels:[],all:[]},this._unit="day",this._majorUnit=void 0,this._offsets={},this._normalized=!1,this._parseOpts=void 0}init(t,e){const i=t.time||(t.time={}),n=this._adapter=new Ui._date(t.adapters.date);S(i.displayFormats,n.formats()),this._parseOpts={parser:i.parser,round:i.round,isoWeekday:i.isoWeekday},super.init(t),this._normalized=e.normalized}parse(t,e){return void 0===t?null:Os(this,t)}beforeLayout(){super.beforeLayout(),this._cache={data:[],labels:[],all:[]}}determineDataLimits(){const t=this.options,e=this._adapter,i=t.time.unit||"day";let{min:n,max:a,minDefined:s,maxDefined:r}=this.getUserBounds();function o(t){s||isNaN(t.min)||(n=Math.min(n,t.min)),r||isNaN(t.max)||(a=Math.max(a,t.max))}s&&r||(o(this._getLabelBounds()),"ticks"===t.bounds&&"labels"===t.ticks.source||o(this.getMinMax(!1))),n=m(n)&&!isNaN(n)?n:+e.startOf(Date.now(),i),a=m(a)&&!isNaN(a)?a:+e.endOf(Date.now(),i)+1,this.min=Math.min(n,a-1),this.max=Math.max(n+1,a)}_getLabelBounds(){const t=this.getLabelTimestamps();let e=Number.POSITIVE_INFINITY,i=Number.NEGATIVE_INFINITY;return t.length&&(e=t[0],i=t[t.length-1]),{min:e,max:i}}buildTicks(){const t=this.options,e=t.time,i=t.ticks,n="labels"===i.source?this.getLabelTimestamps():this._generate();"ticks"===t.bounds&&n.length&&(this.min=this._userMin||n[0],this.max=this._userMax||n[n.length-1]);const a=this.min,s=function(t,e,i){let n=0,a=t.length;for(;nn&&t[a-1]>i;)a--;return n>0||a=_s.indexOf(i);s--){const i=_s[s];if(vs[i].common&&t._adapter.diff(a,n,i)>=e-1)return i}return _s[i?_s.indexOf(i):0]}(this,s.length,e.minUnit,this.min,this.max)),this._majorUnit=i.major.enabled&&"year"!==this._unit?function(t){for(let e=_s.indexOf(t)+1,i=_s.length;e1e5*r)throw new Error(e+" and "+i+" are too far apart with stepSize of "+r+" "+s);const f="data"===n.ticks.source&&this.getDataTimestamps();for(h=u,d=0;ht-e).map(t=>+t)}getLabelForValue(t){const e=this._adapter,i=this.options.time;return i.tooltipFormat?e.format(t,i.tooltipFormat):e.format(t,i.displayFormats.datetime)}_tickFormatFunction(t,e,i,n){const a=this.options,s=a.time.displayFormats,r=this._unit,o=this._majorUnit,l=r&&s[r],c=o&&s[o],h=i[e],d=o&&c&&h&&h.major,u=this._adapter.format(t,n||(d?c:l)),f=a.ticks.callback;return f?v(f,[u,e,i],this):u}generateTickLabels(t){let e,i,n;for(e=0,i=t.length;e0?r:1}getDataTimestamps(){let t,e,i=this._cache.data||[];if(i.length)return i;const n=this.getMatchingVisibleMetas();if(this._normalized&&n.length)return this._cache.data=n[0].controller.getAllParsedValues(this);for(t=0,e=n.length;t=t[o].pos&&e<=t[l].pos&&({lo:o,hi:l}=me(t,"pos",e)),({pos:n,time:s}=t[o]),({pos:a,time:r}=t[l])):(e>=t[o].time&&e<=t[l].time&&({lo:o,hi:l}=me(t,"time",e)),({time:n,pos:s}=t[o]),({time:a,pos:r}=t[l]));const c=a-n;return c?s+(r-s)*(e-n)/c:s}Ss.id="time",Ss.defaults={bounds:"data",adapters:{},time:{parser:!1,unit:!1,round:!1,isoWeekday:!1,minUnit:"millisecond",displayFormats:{}},ticks:{source:"auto",major:{enabled:!1}}};class Ds extends Ss{constructor(t){super(t),this._table=[],this._minPos=void 0,this._tableRange=void 0}initOffsets(){const t=this._getTimestampsForTable(),e=this._table=this.buildLookupTable(t);this._minPos=Ps(e,this.min),this._tableRange=Ps(e,this.max)-this._minPos,super.initOffsets(t)}buildLookupTable(t){const{min:e,max:i}=this,n=[],a=[];let s,r,o,l,c;for(s=0,r=t.length;s=e&&l<=i&&n.push(l);if(n.length<2)return[{time:e,pos:0},{time:i,pos:1}];for(s=0,r=n.length;s2&&void 0!==arguments[2]?arguments[2]:"label";const n=[];t.datasets=e.map(e=>{const a=t.datasets.find(t=>t[i]===e[i]);return a&&e.data&&!n.includes(a)?(n.push(a),Object.assign(a,e),a):{...e}})}function Rs(t){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"label";const i={labels:[],datasets:[]};return As(i,t.labels),Ls(i,t.datasets,e),i}function Ns(t,e){let{height:i=150,width:n=300,redraw:a=!1,datasetIdKey:s,type:r,data:o,options:l,plugins:c=[],fallbackContent:h,...d}=t;const u=Object(Es.useRef)(null),f=Object(Es.useRef)(),p=()=>{u.current&&(f.current=new ha(u.current,{type:r,data:Rs(o,s),options:l,plugins:c}),Ts(e,f.current))},g=()=>{Ts(e,null),f.current&&(f.current.destroy(),f.current=null)};return Object(Es.useEffect)(()=>{var t,e;!a&&f.current&&l&&(t=f.current,e=l,t.options={...e})},[a,l]),Object(Es.useEffect)(()=>{!a&&f.current&&As(f.current.config.data,o.labels)},[a,o.labels]),Object(Es.useEffect)(()=>{!a&&f.current&&o.datasets&&Ls(f.current.config.data,o.datasets,s)},[a,o.datasets]),Object(Es.useEffect)(()=>{f.current&&(a?(g(),setTimeout(p)):f.current.update())},[a,l,o.labels,o.datasets]),Object(Es.useEffect)(()=>(p(),()=>g()),[]),Cs.a.createElement("canvas",Object.assign({ref:u,role:"img",height:i,width:n},d),h)}const Fs=Object(Es.forwardRef)(Ns);var Is=i(3),zs=i(2),Bs=i(16),Vs=i(7),Ws=i(8),Hs=i(4);function Us(t,e){Object(Hs.a)(2,arguments);var i=Object(Ws.a)(t),n=Object(Vs.a)(e);return isNaN(n)?new Date(NaN):n?(i.setDate(i.getDate()+n),i):i}function Ys(t,e){Object(Hs.a)(2,arguments);var i=Object(Vs.a)(e);return Us(t,-i)}function $s(t,e){Object(Hs.a)(2,arguments);var i=Object(Ws.a)(t),n=Object(Vs.a)(e);if(isNaN(n))return new Date(NaN);if(!n)return i;var a=i.getDate(),s=new Date(i.getTime());s.setMonth(i.getMonth()+n+1,0);var r=s.getDate();return a>=r?s:(i.setFullYear(s.getFullYear(),s.getMonth(),a),i)}function Xs(t,e){Object(Hs.a)(2,arguments);var i=Object(Vs.a)(e);return $s(t,-i)}function qs(t){return(qs="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function Gs(t,e){if(Object(Hs.a)(2,arguments),!e||"object"!==qs(e))return new Date(NaN);var i=e.years?Object(Vs.a)(e.years):0,n=e.months?Object(Vs.a)(e.months):0,a=e.weeks?Object(Vs.a)(e.weeks):0,s=e.days?Object(Vs.a)(e.days):0,r=e.hours?Object(Vs.a)(e.hours):0,o=e.minutes?Object(Vs.a)(e.minutes):0,l=e.seconds?Object(Vs.a)(e.seconds):0,c=Xs(t,n+12*i),h=Ys(c,s+7*a),d=o+60*r,u=l+60*d,f=1e3*u,p=new Date(h.getTime()-f);return p}function Qs(t){return(Qs="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function Ks(t,e){if(Object(Hs.a)(2,arguments),!e||"object"!==Qs(e))return new Date(NaN);var i=e.years?Object(Vs.a)(e.years):0,n=e.months?Object(Vs.a)(e.months):0,a=e.weeks?Object(Vs.a)(e.weeks):0,s=e.days?Object(Vs.a)(e.days):0,r=e.hours?Object(Vs.a)(e.hours):0,o=e.minutes?Object(Vs.a)(e.minutes):0,l=e.seconds?Object(Vs.a)(e.seconds):0,c=Object(Ws.a)(t),h=n||i?$s(c,n+12*i):c,d=s||a?Us(h,s+7*a):h,u=o+60*r,f=l+60*u,p=1e3*f,g=new Date(d.getTime()+p);return g}function Zs(t,e){var i;Object(Hs.a)(1,arguments);var n=Object(Vs.a)(null!==(i=null==e?void 0:e.additionalDigits)&&void 0!==i?i:2);if(2!==n&&1!==n&&0!==n)throw new RangeError("additionalDigits must be 0, 1 or 2");if("string"!=typeof t&&"[object String]"!==Object.prototype.toString.call(t))return new Date(NaN);var a,s=nr(t);if(s.date){var r=ar(s.date,n);a=sr(r.restDateString,r.year)}if(!a||isNaN(a.getTime()))return new Date(NaN);var o,l=a.getTime(),c=0;if(s.time&&(c=or(s.time),isNaN(c)))return new Date(NaN);if(!s.timezone){var h=new Date(l+c),d=new Date(0);return d.setFullYear(h.getUTCFullYear(),h.getUTCMonth(),h.getUTCDate()),d.setHours(h.getUTCHours(),h.getUTCMinutes(),h.getUTCSeconds(),h.getUTCMilliseconds()),d}return o=cr(s.timezone),isNaN(o)?new Date(NaN):new Date(l+c+o)}Math.pow(10,8);var Js={dateTimeDelimiter:/[T ]/,timeZoneDelimiter:/[Z ]/i,timezone:/([Z+-].*)$/},tr=/^-?(?:(\d{3})|(\d{2})(?:-?(\d{2}))?|W(\d{2})(?:-?(\d{1}))?|)$/,er=/^(\d{2}(?:[.,]\d*)?)(?::?(\d{2}(?:[.,]\d*)?))?(?::?(\d{2}(?:[.,]\d*)?))?$/,ir=/^([+-])(\d{2})(?::?(\d{2}))?$/;function nr(t){var e,i={},n=t.split(Js.dateTimeDelimiter);if(n.length>2)return i;if(/:/.test(n[0])?e=n[0]:(i.date=n[0],e=n[1],Js.timeZoneDelimiter.test(i.date)&&(i.date=t.split(Js.timeZoneDelimiter)[0],e=t.substr(i.date.length,t.length))),e){var a=Js.timezone.exec(e);a?(i.time=e.replace(a[1],""),i.timezone=a[1]):i.time=e}return i}function ar(t,e){var i=new RegExp("^(?:(\\d{4}|[+-]\\d{"+(4+e)+"})|(\\d{2}|[+-]\\d{"+(2+e)+"})$)"),n=t.match(i);if(!n)return{year:NaN,restDateString:""};var a=n[1]?parseInt(n[1]):null,s=n[2]?parseInt(n[2]):null;return{year:null===s?a:100*s,restDateString:t.slice((n[1]||n[2]).length)}}function sr(t,e){if(null===e)return new Date(NaN);var i=t.match(tr);if(!i)return new Date(NaN);var n=!!i[4],a=rr(i[1]),s=rr(i[2])-1,r=rr(i[3]),o=rr(i[4]),l=rr(i[5])-1;if(n)return function(t,e,i){return e>=1&&e<=53&&i>=0&&i<=6}(0,o,l)?function(t,e,i){var n=new Date(0);n.setUTCFullYear(t,0,4);var a=7*(e-1)+i+1-(n.getUTCDay()||7);return n.setUTCDate(n.getUTCDate()+a),n}(e,o,l):new Date(NaN);var c=new Date(0);return function(t,e,i){return e>=0&&e<=11&&i>=1&&i<=(hr[e]||(dr(t)?29:28))}(e,s,r)&&function(t,e){return e>=1&&e<=(dr(t)?366:365)}(e,a)?(c.setUTCFullYear(e,s,Math.max(a,r)),c):new Date(NaN)}function rr(t){return t?parseInt(t):1}function or(t){var e=t.match(er);if(!e)return NaN;var i=lr(e[1]),n=lr(e[2]),a=lr(e[3]);return function(t,e,i){return 24===t?0===e&&0===i:i>=0&&i<60&&e>=0&&e<60&&t>=0&&t<25}(i,n,a)?36e5*i+6e4*n+1e3*a:NaN}function lr(t){return t&&parseFloat(t.replace(",","."))||0}function cr(t){if("Z"===t)return 0;var e=t.match(ir);if(!e)return 0;var i="+"===e[1]?-1:1,n=parseInt(e[2]),a=e[3]&&parseInt(e[3])||0;return function(t,e){return e>=0&&e<=59}(0,a)?i*(36e5*n+6e4*a):NaN}var hr=[31,null,31,30,31,30,31,31,30,31,30,31];function dr(t){return t%400==0||t%4==0&&t%100!=0}var ur=i(77);function fr(t,e){var i=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),i.push.apply(i,n)}return i}function pr(t){for(var e=1;e0,"is-negative":e<0});return Object(o.createElement)("div",{className:s},Object(o.createElement)("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",className:"simpay-admin-charts-badge__icon",width:"16",height:"16"},e>0?Object(o.createElement)("path",{d:"M16.004 9.414l-8.607 8.607-1.414-1.414L14.589 8H7.004V6h11v11h-2V9.414z"}):Object(o.createElement)("path",{d:"M14.59 16.004L5.982 7.397l1.414-1.414 8.607 8.606V7.004h2v11h-11v-2z"})),!n&&Object(o.createElement)("span",null,Math.abs(e),"%"))},Dr="simpay-admin-charts-period-over-period__tooltip",Er=function(t){var e=t.position,i=t.opacity,n=t.data,a=t.delta;if(!n.length)return null;var s=e.top,r=e.left,l=e.right,c=Sr()("simpay-admin-charts-badge",{"is-positive":a>0,"is-negative":a<0});return Object(o.createElement)("div",{className:Dr,style:{top:s,left:r||"auto",right:l||"auto",opacity:i}},n.map((function(t,e){var i=t.label,n=t.value;return Object(o.createElement)("div",{className:"".concat(Dr,"-data"),"data-dataset":e,key:i+Math.random()},Object(o.createElement)("strong",null,i)," ",Object(o.createElement)("em",null,Object(Bs.decodeEntities)(n)))})),0!==a&&Object(o.createElement)("div",{className:"".concat(Dr,"-delta")},Object(o.createElement)("div",{className:c},Object(o.createElement)("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",className:"simpay-admin-charts-badge__icon"},a>0?Object(o.createElement)("path",{fillRule:"evenodd",d:"M5.22 14.78a.75.75 0 001.06 0l7.22-7.22v5.69a.75.75 0 001.5 0v-7.5a.75.75 0 00-.75-.75h-7.5a.75.75 0 000 1.5h5.69l-7.22 7.22a.75.75 0 000 1.06z",clipRule:"evenodd"}):Object(o.createElement)("path",{d:"M6.28 5.22a.75.75 0 00-1.06 1.06l7.22 7.22H6.75a.75.75 0 000 1.5h7.5a.747.747 0 00.75-.75v-7.5a.75.75 0 00-1.5 0v5.69L6.28 5.22z"}))),Object(o.createElement)("span",null,Object(o.createInterpolateElement)(Object(zs.sprintf)(/* translators: %s: delta percentage */ Object(zs.__)("%1$s%% vs. previous period","simple-pay"),Math.abs(a)),{delta:Object(o.createElement)("strong",{className:a>0?"is-positive":"is-negative"})}))))},Cr=function(t){var e=t.chart,i=function(t,e){var i=Object(o.useState)({marginTop:0,marginRight:0,marginBottom:0,marginLeft:0}),n=r()(i,2),a=n[0],s=a.marginTop,l=a.marginRight,c=a.marginBottom,h=a.marginLeft,d=n[1];return Object(o.useEffect)((function(){t.current&&d({marginTop:Math.floor(t.current.chartArea.top),marginRight:Math.floor(t.current.width-t.current.chartArea.right),marginBottom:Math.floor(t.current.chartArea.bottom),marginLeft:Math.floor(t.current.chartArea.left)})}),[t,e]),{marginTop:s,marginRight:l,marginBottom:c,marginLeft:h}}(t.chartRef,e),n=i.marginLeft,a=i.marginRight;return Object(o.createElement)("div",{style:{width:"100%",position:"relative",fontSize:"12px",display:"flex",justifyContent:"space-between",marginTop:"-2px"}},Object(o.createElement)("div",{style:{marginLeft:n,textAlign:"left"}},e.datasets[0].data[0].x),Object(o.createElement)("div",{style:{marginRight:a,textAlign:"right"}},e.datasets[0].data[e.datasets[0].data.length-1].x))};function Tr(t,e){var i=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),i.push.apply(i,n)}return i}function Ar(t){for(var e=1;e0}))}));return Object(o.createElement)("div",{className:"simpay-admin-charts-period-over-period",style:a},!_&&Object(o.createElement)("div",{className:"simpay-admin-charts-no-data",style:Ar(Ar({},a),{},{height:"calc(".concat(a.height," + 15px)")})},Object(o.createElement)("div",null,Object(o.createElement)("strong",null,Object(zs.sprintf)(/* translators: %s Currency code. */ Object(zs.__)("No %s transactions found.","simple-pay"),d.code.toUpperCase())),Object(o.createElement)("div",null,Object(zs.__)("Please select a different currency, date range, or check back later.","simple-pay")))),Object(o.createElement)(Fs,{type:"line",ref:u,options:v,plugins:[xr,(y="rgb(".concat(h.primary_color.join(","),")"),{id:"YGridLineHover",afterDraw:function(t){var e,i;if(null!==(e=t.tooltip)&&void 0!==e&&null!==(i=e._active)&&void 0!==i&&i.length){var n=t.tooltip._active[0].element.x,a=t.scales.yAxis,s=t.ctx;s.save(),s.beginPath(),s.moveTo(n,a.top),s.lineTo(n,a.bottom),s.lineWidth=2,s.strokeStyle=y,s.stroke(),s.restore()}}})],data:{datasets:f}}),Object(o.createElement)(Cr,{chartRef:u,chart:h}),Object(o.createElement)(Er,m),Object(o.createElement)(Is.Popover.Slot,null))}},function(t,e){t.exports=window.wp.data},function(t,e){t.exports=window.wp.htmlEntities},,,function(t,e){function i(){return t.exports=i=Object.assign?Object.assign.bind():function(t){for(var e=1;et.length)&&(e=t.length);for(var i=0,n=new Array(e);i=s.getTime()?i+1:e.getTime()>=l.getTime()?i:i-1}function f(t){Object(n.a)(1,arguments);var e=u(t),i=new Date(0);i.setUTCFullYear(e,0,4),i.setUTCHours(0,0,0,0);var a=d(i);return a}var p={};function g(){return p}function m(t,e){var i,a,s,o,c,h,d,u;Object(n.a)(1,arguments);var f=g(),p=Object(l.a)(null!==(i=null!==(a=null!==(s=null!==(o=null==e?void 0:e.weekStartsOn)&&void 0!==o?o:null==e||null===(c=e.locale)||void 0===c||null===(h=c.options)||void 0===h?void 0:h.weekStartsOn)&&void 0!==s?s:f.weekStartsOn)&&void 0!==a?a:null===(d=f.locale)||void 0===d||null===(u=d.options)||void 0===u?void 0:u.weekStartsOn)&&void 0!==i?i:0);if(!(p>=0&&p<=6))throw new RangeError("weekStartsOn must be between 0 and 6 inclusively");var m=Object(r.a)(t),b=m.getUTCDay(),y=(b=1&&y<=7))throw new RangeError("firstWeekContainsDate must be between 1 and 7 inclusively");var x=new Date(0);x.setUTCFullYear(p+1,0,y),x.setUTCHours(0,0,0,0);var v=m(x,e),_=new Date(0);_.setUTCFullYear(p,0,y),_.setUTCHours(0,0,0,0);var w=m(_,e);return f.getTime()>=v.getTime()?p+1:f.getTime()>=w.getTime()?p:p-1}function y(t,e){var i,a,s,r,o,c,h,d;Object(n.a)(1,arguments);var u=g(),f=Object(l.a)(null!==(i=null!==(a=null!==(s=null!==(r=null==e?void 0:e.firstWeekContainsDate)&&void 0!==r?r:null==e||null===(o=e.locale)||void 0===o||null===(c=o.options)||void 0===c?void 0:c.firstWeekContainsDate)&&void 0!==s?s:u.firstWeekContainsDate)&&void 0!==a?a:null===(h=u.locale)||void 0===h||null===(d=h.options)||void 0===d?void 0:d.firstWeekContainsDate)&&void 0!==i?i:1),p=b(t,e),y=new Date(0);y.setUTCFullYear(p,0,f),y.setUTCHours(0,0,0,0);var x=m(y,e);return x}function x(t,e){for(var i=t<0?"-":"",n=Math.abs(t).toString();n.length0?i:1-i;return x("yy"===e?n%100:n,e.length)},_=function(t,e){var i=t.getUTCMonth();return"M"===e?String(i+1):x(i+1,2)},w=function(t,e){return x(t.getUTCDate(),e.length)},O=function(t,e){return x(t.getUTCHours()%12||12,e.length)},M=function(t,e){return x(t.getUTCHours(),e.length)},k=function(t,e){return x(t.getUTCMinutes(),e.length)},j=function(t,e){return x(t.getUTCSeconds(),e.length)},S=function(t,e){var i=e.length,n=t.getUTCMilliseconds();return x(Math.floor(n*Math.pow(10,i-3)),e.length)};function P(t,e){var i=t>0?"-":"+",n=Math.abs(t),a=Math.floor(n/60),s=n%60;if(0===s)return i+String(a);var r=e||"";return i+String(a)+r+x(s,2)}function D(t,e){return t%60==0?(t>0?"-":"+")+x(Math.abs(t)/60,2):E(t,e)}function E(t,e){var i=e||"",n=t>0?"-":"+",a=Math.abs(t);return n+x(Math.floor(a/60),2)+i+x(a%60,2)}var C={G:function(t,e,i){var n=t.getUTCFullYear()>0?1:0;switch(e){case"G":case"GG":case"GGG":return i.era(n,{width:"abbreviated"});case"GGGGG":return i.era(n,{width:"narrow"});case"GGGG":default:return i.era(n,{width:"wide"})}},y:function(t,e,i){if("yo"===e){var n=t.getUTCFullYear(),a=n>0?n:1-n;return i.ordinalNumber(a,{unit:"year"})}return v(t,e)},Y:function(t,e,i,n){var a=b(t,n),s=a>0?a:1-a;return"YY"===e?x(s%100,2):"Yo"===e?i.ordinalNumber(s,{unit:"year"}):x(s,e.length)},R:function(t,e){return x(u(t),e.length)},u:function(t,e){return x(t.getUTCFullYear(),e.length)},Q:function(t,e,i){var n=Math.ceil((t.getUTCMonth()+1)/3);switch(e){case"Q":return String(n);case"QQ":return x(n,2);case"Qo":return i.ordinalNumber(n,{unit:"quarter"});case"QQQ":return i.quarter(n,{width:"abbreviated",context:"formatting"});case"QQQQQ":return i.quarter(n,{width:"narrow",context:"formatting"});case"QQQQ":default:return i.quarter(n,{width:"wide",context:"formatting"})}},q:function(t,e,i){var n=Math.ceil((t.getUTCMonth()+1)/3);switch(e){case"q":return String(n);case"qq":return x(n,2);case"qo":return i.ordinalNumber(n,{unit:"quarter"});case"qqq":return i.quarter(n,{width:"abbreviated",context:"standalone"});case"qqqqq":return i.quarter(n,{width:"narrow",context:"standalone"});case"qqqq":default:return i.quarter(n,{width:"wide",context:"standalone"})}},M:function(t,e,i){var n=t.getUTCMonth();switch(e){case"M":case"MM":return _(t,e);case"Mo":return i.ordinalNumber(n+1,{unit:"month"});case"MMM":return i.month(n,{width:"abbreviated",context:"formatting"});case"MMMMM":return i.month(n,{width:"narrow",context:"formatting"});case"MMMM":default:return i.month(n,{width:"wide",context:"formatting"})}},L:function(t,e,i){var n=t.getUTCMonth();switch(e){case"L":return String(n+1);case"LL":return x(n+1,2);case"Lo":return i.ordinalNumber(n+1,{unit:"month"});case"LLL":return i.month(n,{width:"abbreviated",context:"standalone"});case"LLLLL":return i.month(n,{width:"narrow",context:"standalone"});case"LLLL":default:return i.month(n,{width:"wide",context:"standalone"})}},w:function(t,e,i,a){var s=function(t,e){Object(n.a)(1,arguments);var i=Object(r.a)(t),a=m(i,e).getTime()-y(i,e).getTime();return Math.round(a/6048e5)+1}(t,a);return"wo"===e?i.ordinalNumber(s,{unit:"week"}):x(s,e.length)},I:function(t,e,i){var a=function(t){Object(n.a)(1,arguments);var e=Object(r.a)(t),i=d(e).getTime()-f(e).getTime();return Math.round(i/6048e5)+1}(t);return"Io"===e?i.ordinalNumber(a,{unit:"week"}):x(a,e.length)},d:function(t,e,i){return"do"===e?i.ordinalNumber(t.getUTCDate(),{unit:"date"}):w(t,e)},D:function(t,e,i){var a=function(t){Object(n.a)(1,arguments);var e=Object(r.a)(t),i=e.getTime();e.setUTCMonth(0,1),e.setUTCHours(0,0,0,0);var a=e.getTime(),s=i-a;return Math.floor(s/864e5)+1}(t);return"Do"===e?i.ordinalNumber(a,{unit:"dayOfYear"}):x(a,e.length)},E:function(t,e,i){var n=t.getUTCDay();switch(e){case"E":case"EE":case"EEE":return i.day(n,{width:"abbreviated",context:"formatting"});case"EEEEE":return i.day(n,{width:"narrow",context:"formatting"});case"EEEEEE":return i.day(n,{width:"short",context:"formatting"});case"EEEE":default:return i.day(n,{width:"wide",context:"formatting"})}},e:function(t,e,i,n){var a=t.getUTCDay(),s=(a-n.weekStartsOn+8)%7||7;switch(e){case"e":return String(s);case"ee":return x(s,2);case"eo":return i.ordinalNumber(s,{unit:"day"});case"eee":return i.day(a,{width:"abbreviated",context:"formatting"});case"eeeee":return i.day(a,{width:"narrow",context:"formatting"});case"eeeeee":return i.day(a,{width:"short",context:"formatting"});case"eeee":default:return i.day(a,{width:"wide",context:"formatting"})}},c:function(t,e,i,n){var a=t.getUTCDay(),s=(a-n.weekStartsOn+8)%7||7;switch(e){case"c":return String(s);case"cc":return x(s,e.length);case"co":return i.ordinalNumber(s,{unit:"day"});case"ccc":return i.day(a,{width:"abbreviated",context:"standalone"});case"ccccc":return i.day(a,{width:"narrow",context:"standalone"});case"cccccc":return i.day(a,{width:"short",context:"standalone"});case"cccc":default:return i.day(a,{width:"wide",context:"standalone"})}},i:function(t,e,i){var n=t.getUTCDay(),a=0===n?7:n;switch(e){case"i":return String(a);case"ii":return x(a,e.length);case"io":return i.ordinalNumber(a,{unit:"day"});case"iii":return i.day(n,{width:"abbreviated",context:"formatting"});case"iiiii":return i.day(n,{width:"narrow",context:"formatting"});case"iiiiii":return i.day(n,{width:"short",context:"formatting"});case"iiii":default:return i.day(n,{width:"wide",context:"formatting"})}},a:function(t,e,i){var n=t.getUTCHours()/12>=1?"pm":"am";switch(e){case"a":case"aa":return i.dayPeriod(n,{width:"abbreviated",context:"formatting"});case"aaa":return i.dayPeriod(n,{width:"abbreviated",context:"formatting"}).toLowerCase();case"aaaaa":return i.dayPeriod(n,{width:"narrow",context:"formatting"});case"aaaa":default:return i.dayPeriod(n,{width:"wide",context:"formatting"})}},b:function(t,e,i){var n,a=t.getUTCHours();switch(n=12===a?"noon":0===a?"midnight":a/12>=1?"pm":"am",e){case"b":case"bb":return i.dayPeriod(n,{width:"abbreviated",context:"formatting"});case"bbb":return i.dayPeriod(n,{width:"abbreviated",context:"formatting"}).toLowerCase();case"bbbbb":return i.dayPeriod(n,{width:"narrow",context:"formatting"});case"bbbb":default:return i.dayPeriod(n,{width:"wide",context:"formatting"})}},B:function(t,e,i){var n,a=t.getUTCHours();switch(n=a>=17?"evening":a>=12?"afternoon":a>=4?"morning":"night",e){case"B":case"BB":case"BBB":return i.dayPeriod(n,{width:"abbreviated",context:"formatting"});case"BBBBB":return i.dayPeriod(n,{width:"narrow",context:"formatting"});case"BBBB":default:return i.dayPeriod(n,{width:"wide",context:"formatting"})}},h:function(t,e,i){if("ho"===e){var n=t.getUTCHours()%12;return 0===n&&(n=12),i.ordinalNumber(n,{unit:"hour"})}return O(t,e)},H:function(t,e,i){return"Ho"===e?i.ordinalNumber(t.getUTCHours(),{unit:"hour"}):M(t,e)},K:function(t,e,i){var n=t.getUTCHours()%12;return"Ko"===e?i.ordinalNumber(n,{unit:"hour"}):x(n,e.length)},k:function(t,e,i){var n=t.getUTCHours();return 0===n&&(n=24),"ko"===e?i.ordinalNumber(n,{unit:"hour"}):x(n,e.length)},m:function(t,e,i){return"mo"===e?i.ordinalNumber(t.getUTCMinutes(),{unit:"minute"}):k(t,e)},s:function(t,e,i){return"so"===e?i.ordinalNumber(t.getUTCSeconds(),{unit:"second"}):j(t,e)},S:function(t,e){return S(t,e)},X:function(t,e,i,n){var a=(n._originalDate||t).getTimezoneOffset();if(0===a)return"Z";switch(e){case"X":return D(a);case"XXXX":case"XX":return E(a);case"XXXXX":case"XXX":default:return E(a,":")}},x:function(t,e,i,n){var a=(n._originalDate||t).getTimezoneOffset();switch(e){case"x":return D(a);case"xxxx":case"xx":return E(a);case"xxxxx":case"xxx":default:return E(a,":")}},O:function(t,e,i,n){var a=(n._originalDate||t).getTimezoneOffset();switch(e){case"O":case"OO":case"OOO":return"GMT"+P(a,":");case"OOOO":default:return"GMT"+E(a,":")}},z:function(t,e,i,n){var a=(n._originalDate||t).getTimezoneOffset();switch(e){case"z":case"zz":case"zzz":return"GMT"+P(a,":");case"zzzz":default:return"GMT"+E(a,":")}},t:function(t,e,i,n){var a=n._originalDate||t;return x(Math.floor(a.getTime()/1e3),e.length)},T:function(t,e,i,n){return x((n._originalDate||t).getTime(),e.length)}},T=function(t,e){switch(t){case"P":return e.date({width:"short"});case"PP":return e.date({width:"medium"});case"PPP":return e.date({width:"long"});case"PPPP":default:return e.date({width:"full"})}},A=function(t,e){switch(t){case"p":return e.time({width:"short"});case"pp":return e.time({width:"medium"});case"ppp":return e.time({width:"long"});case"pppp":default:return e.time({width:"full"})}},L={p:A,P:function(t,e){var i,n=t.match(/(P+)(p+)?/)||[],a=n[1],s=n[2];if(!s)return T(t,e);switch(a){case"P":i=e.dateTime({width:"short"});break;case"PP":i=e.dateTime({width:"medium"});break;case"PPP":i=e.dateTime({width:"long"});break;case"PPPP":default:i=e.dateTime({width:"full"})}return i.replace("{{date}}",T(a,e)).replace("{{time}}",A(s,e))}};function R(t){var e=new Date(Date.UTC(t.getFullYear(),t.getMonth(),t.getDate(),t.getHours(),t.getMinutes(),t.getSeconds(),t.getMilliseconds()));return e.setUTCFullYear(t.getFullYear()),t.getTime()-e.getTime()}var N=["D","DD"],F=["YY","YYYY"];function I(t){return-1!==N.indexOf(t)}function z(t){return-1!==F.indexOf(t)}function B(t,e,i){if("YYYY"===t)throw new RangeError("Use `yyyy` instead of `YYYY` (in `".concat(e,"`) for formatting years to the input `").concat(i,"`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md"));if("YY"===t)throw new RangeError("Use `yy` instead of `YY` (in `".concat(e,"`) for formatting years to the input `").concat(i,"`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md"));if("D"===t)throw new RangeError("Use `d` instead of `D` (in `".concat(e,"`) for formatting days of the month to the input `").concat(i,"`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md"));if("DD"===t)throw new RangeError("Use `dd` instead of `DD` (in `".concat(e,"`) for formatting days of the month to the input `").concat(i,"`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md"))}var V={lessThanXSeconds:{one:"less than a second",other:"less than {{count}} seconds"},xSeconds:{one:"1 second",other:"{{count}} seconds"},halfAMinute:"half a minute",lessThanXMinutes:{one:"less than a minute",other:"less than {{count}} minutes"},xMinutes:{one:"1 minute",other:"{{count}} minutes"},aboutXHours:{one:"about 1 hour",other:"about {{count}} hours"},xHours:{one:"1 hour",other:"{{count}} hours"},xDays:{one:"1 day",other:"{{count}} days"},aboutXWeeks:{one:"about 1 week",other:"about {{count}} weeks"},xWeeks:{one:"1 week",other:"{{count}} weeks"},aboutXMonths:{one:"about 1 month",other:"about {{count}} months"},xMonths:{one:"1 month",other:"{{count}} months"},aboutXYears:{one:"about 1 year",other:"about {{count}} years"},xYears:{one:"1 year",other:"{{count}} years"},overXYears:{one:"over 1 year",other:"over {{count}} years"},almostXYears:{one:"almost 1 year",other:"almost {{count}} years"}};function W(t){return function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},i=e.width?String(e.width):t.defaultWidth,n=t.formats[i]||t.formats[t.defaultWidth];return n}}var H={date:W({formats:{full:"EEEE, MMMM do, y",long:"MMMM do, y",medium:"MMM d, y",short:"MM/dd/yyyy"},defaultWidth:"full"}),time:W({formats:{full:"h:mm:ss a zzzz",long:"h:mm:ss a z",medium:"h:mm:ss a",short:"h:mm a"},defaultWidth:"full"}),dateTime:W({formats:{full:"{{date}} 'at' {{time}}",long:"{{date}} 'at' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},defaultWidth:"full"})},U={lastWeek:"'last' eeee 'at' p",yesterday:"'yesterday at' p",today:"'today at' p",tomorrow:"'tomorrow at' p",nextWeek:"eeee 'at' p",other:"P"};function Y(t){return function(e,i){var n;if("formatting"===(null!=i&&i.context?String(i.context):"standalone")&&t.formattingValues){var a=t.defaultFormattingWidth||t.defaultWidth,s=null!=i&&i.width?String(i.width):a;n=t.formattingValues[s]||t.formattingValues[a]}else{var r=t.defaultWidth,o=null!=i&&i.width?String(i.width):t.defaultWidth;n=t.values[o]||t.values[r]}return n[t.argumentCallback?t.argumentCallback(e):e]}}function $(t){return function(e){var i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=i.width,a=n&&t.matchPatterns[n]||t.matchPatterns[t.defaultMatchWidth],s=e.match(a);if(!s)return null;var r,o=s[0],l=n&&t.parsePatterns[n]||t.parsePatterns[t.defaultParseWidth],c=Array.isArray(l)?q(l,(function(t){return t.test(o)})):X(l,(function(t){return t.test(o)}));r=t.valueCallback?t.valueCallback(c):c,r=i.valueCallback?i.valueCallback(r):r;var h=e.slice(o.length);return{value:r,rest:h}}}function X(t,e){for(var i in t)if(t.hasOwnProperty(i)&&e(t[i]))return i}function q(t,e){for(var i=0;i0?"in "+n:n+" ago":n},formatLong:H,formatRelative:function(t,e,i,n){return U[t]},localize:{ordinalNumber:function(t,e){var i=Number(t),n=i%100;if(n>20||n<10)switch(n%10){case 1:return i+"st";case 2:return i+"nd";case 3:return i+"rd"}return i+"th"},era:Y({values:{narrow:["B","A"],abbreviated:["BC","AD"],wide:["Before Christ","Anno Domini"]},defaultWidth:"wide"}),quarter:Y({values:{narrow:["1","2","3","4"],abbreviated:["Q1","Q2","Q3","Q4"],wide:["1st quarter","2nd quarter","3rd quarter","4th quarter"]},defaultWidth:"wide",argumentCallback:function(t){return t-1}}),month:Y({values:{narrow:["J","F","M","A","M","J","J","A","S","O","N","D"],abbreviated:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],wide:["January","February","March","April","May","June","July","August","September","October","November","December"]},defaultWidth:"wide"}),day:Y({values:{narrow:["S","M","T","W","T","F","S"],short:["Su","Mo","Tu","We","Th","Fr","Sa"],abbreviated:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],wide:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"]},defaultWidth:"wide"}),dayPeriod:Y({values:{narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"}},defaultWidth:"wide",formattingValues:{narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"}},defaultFormattingWidth:"wide"})},match:{ordinalNumber:(G={matchPattern:/^(\d+)(th|st|nd|rd)?/i,parsePattern:/\d+/i,valueCallback:function(t){return parseInt(t,10)}},function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},i=t.match(G.matchPattern);if(!i)return null;var n=i[0],a=t.match(G.parsePattern);if(!a)return null;var s=G.valueCallback?G.valueCallback(a[0]):a[0];s=e.valueCallback?e.valueCallback(s):s;var r=t.slice(n.length);return{value:s,rest:r}}),era:$({matchPatterns:{narrow:/^(b|a)/i,abbreviated:/^(b\.?\s?c\.?|b\.?\s?c\.?\s?e\.?|a\.?\s?d\.?|c\.?\s?e\.?)/i,wide:/^(before christ|before common era|anno domini|common era)/i},defaultMatchWidth:"wide",parsePatterns:{any:[/^b/i,/^(a|c)/i]},defaultParseWidth:"any"}),quarter:$({matchPatterns:{narrow:/^[1234]/i,abbreviated:/^q[1234]/i,wide:/^[1234](th|st|nd|rd)? quarter/i},defaultMatchWidth:"wide",parsePatterns:{any:[/1/i,/2/i,/3/i,/4/i]},defaultParseWidth:"any",valueCallback:function(t){return t+1}}),month:$({matchPatterns:{narrow:/^[jfmasond]/i,abbreviated:/^(jan|feb|mar|apr|may|jun|jul|aug|sep|oct|nov|dec)/i,wide:/^(january|february|march|april|may|june|july|august|september|october|november|december)/i},defaultMatchWidth:"wide",parsePatterns:{narrow:[/^j/i,/^f/i,/^m/i,/^a/i,/^m/i,/^j/i,/^j/i,/^a/i,/^s/i,/^o/i,/^n/i,/^d/i],any:[/^ja/i,/^f/i,/^mar/i,/^ap/i,/^may/i,/^jun/i,/^jul/i,/^au/i,/^s/i,/^o/i,/^n/i,/^d/i]},defaultParseWidth:"any"}),day:$({matchPatterns:{narrow:/^[smtwf]/i,short:/^(su|mo|tu|we|th|fr|sa)/i,abbreviated:/^(sun|mon|tue|wed|thu|fri|sat)/i,wide:/^(sunday|monday|tuesday|wednesday|thursday|friday|saturday)/i},defaultMatchWidth:"wide",parsePatterns:{narrow:[/^s/i,/^m/i,/^t/i,/^w/i,/^t/i,/^f/i,/^s/i],any:[/^su/i,/^m/i,/^tu/i,/^w/i,/^th/i,/^f/i,/^sa/i]},defaultParseWidth:"any"}),dayPeriod:$({matchPatterns:{narrow:/^(a|p|mi|n|(in the|at) (morning|afternoon|evening|night))/i,any:/^([ap]\.?\s?m\.?|midnight|noon|(in the|at) (morning|afternoon|evening|night))/i},defaultMatchWidth:"any",parsePatterns:{any:{am:/^a/i,pm:/^p/i,midnight:/^mi/i,noon:/^no/i,morning:/morning/i,afternoon:/afternoon/i,evening:/evening/i,night:/night/i}},defaultParseWidth:"any"})},options:{weekStartsOn:0,firstWeekContainsDate:1}},K=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,Z=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,J=/^'([^]*?)'?$/,tt=/''/g,et=/[a-zA-Z]/;function it(t,e,i){var a,s,c,d,u,f,p,m,b,y,x,v,_,w,O,M,k,j;Object(n.a)(2,arguments);var S=String(e),P=g(),D=null!==(a=null!==(s=null==i?void 0:i.locale)&&void 0!==s?s:P.locale)&&void 0!==a?a:Q,E=Object(l.a)(null!==(c=null!==(d=null!==(u=null!==(f=null==i?void 0:i.firstWeekContainsDate)&&void 0!==f?f:null==i||null===(p=i.locale)||void 0===p||null===(m=p.options)||void 0===m?void 0:m.firstWeekContainsDate)&&void 0!==u?u:P.firstWeekContainsDate)&&void 0!==d?d:null===(b=P.locale)||void 0===b||null===(y=b.options)||void 0===y?void 0:y.firstWeekContainsDate)&&void 0!==c?c:1);if(!(E>=1&&E<=7))throw new RangeError("firstWeekContainsDate must be between 1 and 7 inclusively");var T=Object(l.a)(null!==(x=null!==(v=null!==(_=null!==(w=null==i?void 0:i.weekStartsOn)&&void 0!==w?w:null==i||null===(O=i.locale)||void 0===O||null===(M=O.options)||void 0===M?void 0:M.weekStartsOn)&&void 0!==_?_:P.weekStartsOn)&&void 0!==v?v:null===(k=P.locale)||void 0===k||null===(j=k.options)||void 0===j?void 0:j.weekStartsOn)&&void 0!==x?x:0);if(!(T>=0&&T<=6))throw new RangeError("weekStartsOn must be between 0 and 6 inclusively");if(!D.localize)throw new RangeError("locale must contain localize property");if(!D.formatLong)throw new RangeError("locale must contain formatLong property");var A=Object(r.a)(t);if(!o(A))throw new RangeError("Invalid time value");var N=R(A),F=h(A,N),V={firstWeekContainsDate:E,weekStartsOn:T,locale:D,_originalDate:A},W=S.match(Z).map((function(t){var e=t[0];return"p"===e||"P"===e?(0,L[e])(t,D.formatLong):t})).join("").match(K).map((function(n){if("''"===n)return"'";var a=n[0];if("'"===a)return nt(n);var s=C[a];if(s)return null!=i&&i.useAdditionalWeekYearTokens||!z(n)||B(n,e,String(t)),null!=i&&i.useAdditionalDayOfYearTokens||!I(n)||B(n,e,String(t)),s(F,n,D.localize,V);if(a.match(et))throw new RangeError("Format string contains an unescaped latin alphabet character `"+a+"`");return n})).join("");return W}function nt(t){var e=t.match(J);return e?e[1].replace(tt,"'"):t}},function(t,e,i){"use strict";i.r(e);var n=i(0),a=(i(37),i(3)),s=i(6),r=i.n(s),o=i(2),l=i(9),c=Object(n.createElement)(l.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},Object(n.createElement)(l.Path,{fillRule:"evenodd",d:"M10.289 4.836A1 1 0 0111.275 4h1.306a1 1 0 01.987.836l.244 1.466c.787.26 1.503.679 2.108 1.218l1.393-.522a1 1 0 011.216.437l.653 1.13a1 1 0 01-.23 1.273l-1.148.944a6.025 6.025 0 010 2.435l1.149.946a1 1 0 01.23 1.272l-.653 1.13a1 1 0 01-1.216.437l-1.394-.522c-.605.54-1.32.958-2.108 1.218l-.244 1.466a1 1 0 01-.987.836h-1.306a1 1 0 01-.986-.836l-.244-1.466a5.995 5.995 0 01-2.108-1.218l-1.394.522a1 1 0 01-1.217-.436l-.653-1.131a1 1 0 01.23-1.272l1.149-.946a6.026 6.026 0 010-2.435l-1.148-.944a1 1 0 01-.23-1.272l.653-1.131a1 1 0 011.217-.437l1.393.522a5.994 5.994 0 012.108-1.218l.244-1.466zM14.929 12a3 3 0 11-6 0 3 3 0 016 0z",clipRule:"evenodd"})),h=i(10),d=i(14),u=simpayAdminPageActivityReports,f=u.user_id,p=u.currencies,g=u.default_currency,m=i(19),b=i.n(m),y=i(16),x=i(11),v=i.n(x),_=i(25),w=i.n(_);function O(t,e){var i=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),i.push.apply(i,n)}return i}function M(t){for(var e=1;e0&&Object(n.createElement)(n.Fragment,null,Object(n.createElement)(a.CardDivider,null),Object(n.createElement)("h3",{className:"".concat("simpay-activity-reports-card-today","-today-misc-title")},Object(o.__)("Top Forms","simple-pay")),Object(n.createElement)("div",{className:"".concat("simpay-activity-reports-card-today","-forms")},s.map((function(t){return Object(n.createElement)(P,b()({key:t.id},t))})))),r&&Object(n.createElement)("div",{className:"".concat("simpay-activity-reports-card-today","-tip")},Object(n.createElement)("strong",null,Object(n.createElement)("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},Object(n.createElement)("path",{d:"M11.7 2.805a.75.75 0 01.6 0A60.65 60.65 0 0122.83 8.72a.75.75 0 01-.231 1.337 49.949 49.949 0 00-9.902 3.912l-.003.002-.34.18a.75.75 0 01-.707 0A50.009 50.009 0 007.5 12.174v-.224c0-.131.067-.248.172-.311a54.614 54.614 0 014.653-2.52.75.75 0 00-.65-1.352 56.129 56.129 0 00-4.78 2.589 1.858 1.858 0 00-.859 1.228 49.803 49.803 0 00-4.634-1.527.75.75 0 01-.231-1.337A60.653 60.653 0 0111.7 2.805z"}),Object(n.createElement)("path",{d:"M13.06 15.473a48.45 48.45 0 017.666-3.282c.134 1.414.22 2.843.255 4.285a.75.75 0 01-.46.71 47.878 47.878 0 00-8.105 4.342.75.75 0 01-.832 0 47.877 47.877 0 00-8.104-4.342.75.75 0 01-.461-.71c.035-1.442.121-2.87.255-4.286A48.4 48.4 0 016 13.18v1.27a1.5 1.5 0 00-.14 2.508c-.09.38-.222.753-.397 1.11.452.213.901.434 1.346.661a6.729 6.729 0 00.551-1.608 1.5 1.5 0 00.14-2.67v-.645a48.549 48.549 0 013.44 1.668 2.25 2.25 0 002.12 0z"}),Object(n.createElement)("path",{d:"M4.462 19.462c.42-.419.753-.89 1-1.394.453.213.902.434 1.347.661a6.743 6.743 0 01-1.286 1.794.75.75 0 11-1.06-1.06z"})),r.title),Object(n.createElement)("p",null,r.text," ",Object(n.createElement)("a",{href:Object(y.decodeEntities)(r.href),target:"_blank",rel:"noreferrer"},Object(o.__)("Learn More →","simple-pay")))))))},C=function(t){var e=t.currency;return Object(n.createElement)("div",{className:"simpay-admin-charts-no-data",style:{width:"100%",height:"100%"}},Object(n.createElement)("div",null,Object(n.createElement)("strong",null,Object(o.sprintf)(/* translators: %s Currency code. */ -Object(o.__)("No %s transactions found.","simple-pay"),e.toUpperCase())),Object(n.createElement)("div",null,Object(o.__)("Please select a different currency or check back later.","simple-pay"))))},T=i(13),A=i.n(T),L=function(t){var e=t.currency,i=t.amount_total_formatted,s=t.status,r=t.status_formatted,l=t.email,c=t.payment_method_type_icon,h=t.date_created_human_time_diff,d=t.links,u=d.customer,f=d.payment,p="simpay-activity-reports-card-latest-payment",g=A()("simpay-activity-reports-badge",{"is-succeeded":"succeeded"===s,"is-failed":"failed"===s});return Object(n.createElement)("tr",{className:p},Object(n.createElement)("td",{className:"".concat(p,"__amount")},Object(y.decodeEntities)(i)," ",Object(n.createElement)("small",{style:{fontWeight:"normal"}},e.toUpperCase())),Object(n.createElement)("td",{className:"".concat(p,"__type")},""!==c&&Object(n.createElement)("span",{dangerouslySetInnerHTML:{__html:c}})),Object(n.createElement)("td",{className:"".concat(p,"__status")},Object(n.createElement)("div",{className:g},Object(n.createElement)("span",null,r),Object(n.createElement)("svg",{"aria-hidden":"true",className:"simpay-activity-reports-badge__icon",height:"12",width:"12",viewBox:"0 0 16 16",xmlns:"http://www.w3.org/2000/svg",fill:"currentColor",style:{marginLeft:"4px"}},"succeeded"===s?Object(n.createElement)("path",{d:"M5.297 13.213.293 8.255c-.39-.394-.39-1.033 0-1.426s1.024-.394 1.414 0l4.294 4.224 8.288-8.258c.39-.393 1.024-.393 1.414 0s.39 1.033 0 1.426L6.7 13.208a.994.994 0 0 1-1.402.005z",fillRule:"evenodd"}):Object(n.createElement)("path",{d:"m8 6.585 4.593-4.592a1 1 0 0 1 1.415 1.416L9.417 8l4.591 4.591a1 1 0 0 1-1.415 1.416L8 9.415l-4.592 4.592a1 1 0 0 1-1.416-1.416L6.584 8l-4.59-4.591a1 1 0 1 1 1.415-1.416z",fillRule:"evenodd"})))),Object(n.createElement)("td",{className:"".concat(p,"__email")},Object(n.createElement)(a.Tooltip,{text:Object(o.__)("View customer records","simple-pay")},Object(n.createElement)("a",{href:u,target:"_blank",rel:"noreferrer noopener"},l))),Object(n.createElement)("td",{className:"".concat(p,"__date")},Object(n.createElement)(a.Tooltip,{text:Object(o.__)("View payment record","simple-pay")},Object(n.createElement)("a",{href:f,target:"_blank",rel:"noreferrer noopener"},h))))},R=simpayAdminPageActivityReports,N=R.default_currency,F=R.links.all_payments,I=function(){var t=j("/wpsp/__internal__/report/latest-payments",{currency:N},[]),e=t.data.payments;return Object(n.createElement)(a.Card,{elevation:2,className:"simpay-activity-reports-card-latest"},Object(n.createElement)(a.CardHeader,null,Object(n.createElement)("h2",{className:"simpay-activity-reports-card-title"},Object(o.__)("Latest Payments","simple-pay")),Object(n.createElement)(a.Button,{className:"simpay-activity-reports-card-title-link",href:F,variant:"link",isSmall:!0,target:"_blank"},Object(o.__)("View More →","simple-pay"))),Object(n.createElement)(a.CardBody,null,t.isLoading&&Object(n.createElement)(a.Spinner,null),!t.isLoading&&e.length>0&&Object(n.createElement)("table",{className:"".concat("simpay-activity-reports-card-latest","-payments")},Object(n.createElement)("tbody",null,e.map((function(t){return Object(n.createElement)(L,b()({key:t.id},t))})))),!t.isLoading&&0===e.length&&Object(n.createElement)(C,{currency:N})))},z=i(8),B=i(4);function V(t,e){Object(B.a)(2,arguments);var i=Object(z.a)(t),n=Object(z.a)(e),a=i.getFullYear()-n.getFullYear(),s=i.getMonth()-n.getMonth();return 12*a+s}function W(t,e){Object(B.a)(2,arguments);var i=Object(z.a)(t),n=Object(z.a)(e),a=i.getTime()-n.getTime();return a<0?-1:a>0?1:a}function H(t){Object(B.a)(1,arguments);var e=Object(z.a)(t);return e.setHours(23,59,59,999),e}function U(t){Object(B.a)(1,arguments);var e=Object(z.a)(t),i=e.getMonth();return e.setFullYear(e.getFullYear(),i+1,0),e.setHours(23,59,59,999),e}function Y(t){Object(B.a)(1,arguments);var e=Object(z.a)(t);return H(e).getTime()===U(e).getTime()}var $=i(77),X=i(33);function q(t,e){var i=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),i.push.apply(i,n)}return i}function G(t){for(var e=1;e27&&n.setDate(30),n.setMonth(n.getMonth()-s*r);var o=W(n,a)===-s;Y(Object(z.a)(t))&&1===r&&1===W(t,a)&&(o=!1),i=s*(r-Number(o))}return 0===i?0:i}(new Date(s.end),new Date(s.start))>12?(e=Object(X.dateI18n)("F Y",s.start),i=Object(X.dateI18n)("F Y",s.end)):"today"===s.type?(e=Object(X.dateI18n)(l.formats.date,K),i=e):(e=Object(X.dateI18n)(l.formats.date,s.start),i=Object(X.dateI18n)(l.formats.date,s.end)),Object(n.createElement)("div",{className:"simpay-activity-reports-card-reports-date-range"},Object(n.createElement)(a.SelectControl,{label:Object(o.__)("Report range","simple-pay"),value:s.type,options:"custom"===s.type?[].concat(c,[{label:Object(o.__)("Custom","simple-pay"),value:"custom"}]):c,onChange:function(t){r(G(G({},s),{},{type:t,start:Object(d.d)(t,K),end:Object(d.c)(t,s.end)}))},hideLabelFromVision:!0}),Object(n.createElement)(a.Dropdown,{position:"bottom center",popoverProps:{noArrow:!1},renderToggle:function(t){var i=t.isOpen,s=t.onToggle;return Object(n.createElement)(a.Button,{variant:"tertiary",onClick:s,"aria-expanded":i},e)},renderContent:function(t){var e=t.onToggle;return Object(n.createElement)(a.DatePicker,{currentDate:new Date(s.start),onChange:function(t){r(G(G({},s),{},{start:Object($.a)(new Date(t),"yyyy-MM-dd 00:00:00"),type:"custom"})),e()},startOfWeek:l.l10n.startOfWeek,isInvalidDate:function(t){return t>new Date(s.end)}})}}),Object(n.createElement)("span",{style:{color:"#ccc"}},"–"),Object(n.createElement)(a.Dropdown,{position:"bottom center",popoverProps:{noArrow:!1},renderToggle:function(t){var e=t.isOpen,s=t.onToggle;return Object(n.createElement)(a.Button,{variant:"tertiary",onClick:s,"aria-expanded":e},i)},renderContent:function(t){var e=t.onToggle;return Object(n.createElement)(a.DatePicker,{currentDate:new Date(s.end),onChange:function(t){r(G(G({},s),{},{end:Object($.a)(new Date(t),"yyyy-MM-dd 23:59:59"),type:"custom"})),e()},startOfWeek:l.l10n.startOfWeek,isInvalidDate:function(t){return tnew Date}})}}))},J="simpay-activity-reports-data-bar",tt=function(t){var e=t.isLoading,i=t.label,s=t.data;return Object(n.createElement)("div",{className:J},Object(n.createElement)("div",{className:"".concat(J,"__header")},Object(n.createElement)("h3",{className:"".concat(J,"__label")},i),!e&&Object(n.createElement)("div",{className:"".concat(J,"__legend")},s.map((function(t){var e=t.label,i=t.color;return Object(n.createElement)("div",{key:e,className:"".concat(J,"__legend-item"),style:{color:i}},Object(n.createElement)("span",null,e))})))),Object(n.createElement)("div",{className:"".concat(J,"__bar")},!e&&s.length>0&&s.map((function(t){return Object(n.createElement)(a.Button,{key:t.label,label:"".concat(t.label,": ").concat(t.value,"%"),showTooltip:!0,className:"".concat(J,"__bar-item"),style:{backgroundColor:t.color,flexBasis:"".concat(t.value,"%"),flexGrow:1}},Object(n.createElement)("div",{className:"screen-reader-text"},t.label))})),!e&&0===s.length&&Object(n.createElement)("div",{className:"".concat(J,"__bar-item-none")},Object(o.__)("n/a","simple-pay"))))},et=function(t){var e=t.currency,i=t.range,a=j("/wpsp/__internal__/report/payment-info",{range:i,currency:e},[i]),s=a.data,r=s.payment_method_types,l=s.payment_statuses;return Object(n.createElement)("div",{className:"".concat("simpay-activity-reports-card-reports","-payment-breakdown")},Object(n.createElement)(tt,{label:Object(o.__)("Payment Methods","simple-pay"),data:r,isLoading:a.isLoading}),Object(n.createElement)(tt,{label:Object(o.__)("Payments","simple-pay"),data:l,isLoading:a.isLoading}))},it=function(t){var e=t.currency,i=t.range,a=j("/wpsp/__internal__/report/gross-volume-period-over-period",{range:i,currency:e},[i]),s=a.data,r=s.delta,l=s.total_formatted;return Object(n.createElement)(n.Fragment,null,Object(n.createElement)("div",{className:"".concat("simpay-activity-reports-card-reports","-report-title")},Object(n.createElement)("h3",null,Object(o.__)("Gross Volume","simple-pay"),!a.isLoading&&Object(n.createElement)(n.Fragment,null,": ",Object(n.createElement)("em",null,Object(y.decodeEntities)(l)))),!a.isLoading&&Object(n.createElement)(d.a,{delta:r})),Object(n.createElement)(d.b,{report:a,style:{width:"100%",height:"300px"},config:{yAxisIsCurrency:!0}}))},nt=simpayAdminPageActivityReports.default_currency,at=function(t){var e=t.range,i=j("/wpsp/__internal__/report/successful-payments-period-over-period",{range:e,currency:nt},[e]),a=i.data,s=a.delta,r=a.total_formatted;return Object(n.createElement)(n.Fragment,null,Object(n.createElement)("div",{className:"".concat("simpay-activity-reports-card-reports","-report-title")},Object(n.createElement)("h3",null,Object(o.__)("Successful Payments","simple-pay"),!i.isLoading&&Object(n.createElement)(n.Fragment,null,": ",Object(n.createElement)("em",null,r))),!i.isLoading&&Object(n.createElement)(d.a,{delta:s})),Object(n.createElement)(d.b,{report:i,style:{width:"100%",height:"300px"},config:{yAxisIsCurrency:!1}}))},st=simpayAdminPageActivityReports,rt=st.user_id,ot=st.default_range,lt=ot.start,ct=ot.end,ht=ot.type,dt=st.default_currency,ut=function(){var t=Object(d.e)(rt,"simpay_activity_reports_range",{start:Object(d.d)(ht,lt),end:Object(d.c)(ht,ct),type:ht}),e=r()(t,2),i=e[0],s=e[1];return Object(n.createElement)(a.Card,{elevation:2,className:"simpay-activity-reports-card-reports"},Object(n.createElement)(a.CardHeader,{className:"".concat("simpay-activity-reports-card-reports","-header")},Object(n.createElement)("h2",{className:"simpay-activity-reports-card-title"},Object(o.__)("Reports","simple-pay")),Object(n.createElement)(Z,{range:i,setRange:s})),Object(n.createElement)(a.CardBody,null,Object(n.createElement)(et,{range:i,currency:dt}),Object(n.createElement)(a.CardDivider,null),Object(n.createElement)(it,{range:i,currency:dt}),Object(n.createElement)(a.CardDivider,null),Object(n.createElement)(at,{range:i,currency:dt})))};Object(n.render)(Object(n.createElement)((function(){var t=Object(d.e)(f,"simpay_activity_reports_currency",g),e=r()(t,3),i=e[0],s=e[1],l=e[2];function u(){var t=Object(h.addQueryArgs)(window.location.href,{currency:i});window.location.href=t}return Object(n.createElement)(n.Fragment,null,Object(n.createElement)(a.Dropdown,{position:"bottom center",popoverProps:{noArrow:!1},renderToggle:function(t){var e=t.isOpen,i=t.onToggle;return Object(n.createElement)(a.Button,{variant:"secondary",onClick:i,"aria-expanded":e,icon:c,tooltip:Object(o.__)("Settings","simple-pay")})},renderContent:function(){return Object(n.createElement)(n.Fragment,null,Object(n.createElement)(a.SelectControl,{label:Object(o.__)("Currency","simple-pay"),value:i,onChange:s,options:p.map((function(t){return{label:t,value:t.toLowerCase()}})),help:Object(o.__)("Activity with the selected currency and global payment mode will be shown.","simple-pay")}),Object(n.createElement)(a.Button,{type:"submit",variant:"primary",onClick:u,isBusy:l,disabled:l},Object(o.__)("Update","simple-pay")))}}),Object(n.createElement)(a.Popover.Slot,null))}),null),document.getElementById("simpay-admin-page-activity-reports-config")),Object(n.render)(Object(n.createElement)((function(){return Object(n.createElement)("div",{className:"simpay-activity-reports"},Object(n.createElement)(E,null),Object(n.createElement)(I,null),Object(n.createElement)(ut,null),Object(n.createElement)(a.Popover.Slot,null))}),null),document.getElementById("simpay-admin-page-activity-reports"))}]); \ No newline at end of file +Object(o.__)("No %s transactions found.","simple-pay"),e.toUpperCase())),Object(n.createElement)("div",null,Object(o.__)("Please select a different currency or check back later.","simple-pay"))))},T=i(13),A=i.n(T),L=function(t){var e=t.currency,i=t.amount_total_formatted,s=t.status,r=t.status_formatted,l=t.email,c=t.payment_method_type_icon,h=t.date_created_human_time_diff,d=t.links,u=d.customer,f=d.payment,p="simpay-activity-reports-card-latest-payment",g=A()("simpay-activity-reports-badge",{"is-succeeded":"succeeded"===s,"is-failed":"failed"===s});return Object(n.createElement)("tr",{className:p},Object(n.createElement)("td",{className:"".concat(p,"__amount")},Object(y.decodeEntities)(i)," ",Object(n.createElement)("small",{style:{fontWeight:"normal"}},e.toUpperCase())),Object(n.createElement)("td",{className:"".concat(p,"__type")},""!==c&&Object(n.createElement)("span",{dangerouslySetInnerHTML:{__html:c}})),Object(n.createElement)("td",{className:"".concat(p,"__status")},Object(n.createElement)("div",{className:g},Object(n.createElement)("span",null,r),Object(n.createElement)("svg",{"aria-hidden":"true",className:"simpay-activity-reports-badge__icon",height:"12",width:"12",viewBox:"0 0 16 16",xmlns:"http://www.w3.org/2000/svg",fill:"currentColor",style:{marginLeft:"4px"}},"succeeded"===s?Object(n.createElement)("path",{d:"M5.297 13.213.293 8.255c-.39-.394-.39-1.033 0-1.426s1.024-.394 1.414 0l4.294 4.224 8.288-8.258c.39-.393 1.024-.393 1.414 0s.39 1.033 0 1.426L6.7 13.208a.994.994 0 0 1-1.402.005z",fillRule:"evenodd"}):Object(n.createElement)("path",{d:"m8 6.585 4.593-4.592a1 1 0 0 1 1.415 1.416L9.417 8l4.591 4.591a1 1 0 0 1-1.415 1.416L8 9.415l-4.592 4.592a1 1 0 0 1-1.416-1.416L6.584 8l-4.59-4.591a1 1 0 1 1 1.415-1.416z",fillRule:"evenodd"})))),Object(n.createElement)("td",{className:"".concat(p,"__email")},Object(n.createElement)(a.Tooltip,{text:Object(o.__)("View customer records","simple-pay")},Object(n.createElement)("a",{href:u,target:"_blank",rel:"noreferrer noopener"},l))),Object(n.createElement)("td",{className:"".concat(p,"__date")},Object(n.createElement)(a.Tooltip,{text:Object(o.__)("View payment record","simple-pay")},Object(n.createElement)("a",{href:f,target:"_blank",rel:"noreferrer noopener"},h))))},R=simpayAdminPageActivityReports,N=R.default_currency,F=R.links.all_payments,I=function(){var t=j("/wpsp/__internal__/report/latest-payments",{currency:N},[]),e=t.data.payments;return Object(n.createElement)(a.Card,{elevation:2,className:"simpay-activity-reports-card-latest"},Object(n.createElement)(a.CardHeader,null,Object(n.createElement)("h2",{className:"simpay-activity-reports-card-title"},Object(o.__)("Latest Payments","simple-pay")),Object(n.createElement)(a.Button,{className:"simpay-activity-reports-card-title-link",href:F,variant:"link",isSmall:!0,target:"_blank"},Object(o.__)("View More →","simple-pay"))),Object(n.createElement)(a.CardBody,null,t.isLoading&&Object(n.createElement)(a.Spinner,null),!t.isLoading&&e.length>0&&Object(n.createElement)("table",{className:"".concat("simpay-activity-reports-card-latest","-payments")},Object(n.createElement)("tbody",null,e.map((function(t){return Object(n.createElement)(L,b()({key:t.id},t))})))),!t.isLoading&&0===e.length&&Object(n.createElement)(C,{currency:N})))},z=i(8),B=i(4);function V(t,e){Object(B.a)(2,arguments);var i=Object(z.a)(t),n=Object(z.a)(e),a=i.getFullYear()-n.getFullYear(),s=i.getMonth()-n.getMonth();return 12*a+s}function W(t,e){Object(B.a)(2,arguments);var i=Object(z.a)(t),n=Object(z.a)(e),a=i.getTime()-n.getTime();return a<0?-1:a>0?1:a}function H(t){Object(B.a)(1,arguments);var e=Object(z.a)(t);return e.setHours(23,59,59,999),e}function U(t){Object(B.a)(1,arguments);var e=Object(z.a)(t),i=e.getMonth();return e.setFullYear(e.getFullYear(),i+1,0),e.setHours(23,59,59,999),e}function Y(t){Object(B.a)(1,arguments);var e=Object(z.a)(t);return H(e).getTime()===U(e).getTime()}var $=i(77),X=i(33);function q(t,e){var i=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),i.push.apply(i,n)}return i}function G(t){for(var e=1;e27&&n.setDate(30),n.setMonth(n.getMonth()-s*r);var o=W(n,a)===-s;Y(Object(z.a)(t))&&1===r&&1===W(t,a)&&(o=!1),i=s*(r-Number(o))}return 0===i?0:i}(new Date(s.end),new Date(s.start))>12?(e=Object(X.dateI18n)("F Y",s.start),i=Object(X.dateI18n)("F Y",s.end)):"today"===s.type?(e=Object(X.dateI18n)(l.formats.date,K),i=e):(e=Object(X.dateI18n)(l.formats.date,s.start),i=Object(X.dateI18n)(l.formats.date,s.end)),Object(n.createElement)("div",{className:"simpay-activity-reports-card-reports-date-range"},Object(n.createElement)(a.SelectControl,{label:Object(o.__)("Report range","simple-pay"),value:s.type,options:"custom"===s.type?[].concat(c,[{label:Object(o.__)("Custom","simple-pay"),value:"custom"}]):c,onChange:function(t){r(G(G({},s),{},{type:t,start:Object(d.d)(t,K),end:Object(d.c)(t,s.end)}))},hideLabelFromVision:!0}),Object(n.createElement)(a.Dropdown,{position:"bottom center",popoverProps:{noArrow:!1},renderToggle:function(t){var i=t.isOpen,s=t.onToggle;return Object(n.createElement)(a.Button,{variant:"tertiary",onClick:s,"aria-expanded":i},e)},renderContent:function(t){var e=t.onToggle;return Object(n.createElement)(a.DatePicker,{currentDate:new Date(s.start),onChange:function(t){r(G(G({},s),{},{start:Object($.a)(new Date(t),"yyyy-MM-dd 00:00:00"),type:"custom"})),e()},startOfWeek:l.l10n.startOfWeek,isInvalidDate:function(t){return t>new Date(s.end)}})}}),Object(n.createElement)("span",{style:{color:"#ccc"}},"–"),Object(n.createElement)(a.Dropdown,{position:"bottom center",popoverProps:{noArrow:!1},renderToggle:function(t){var e=t.isOpen,s=t.onToggle;return Object(n.createElement)(a.Button,{variant:"tertiary",onClick:s,"aria-expanded":e},i)},renderContent:function(t){var e=t.onToggle;return Object(n.createElement)(a.DatePicker,{currentDate:new Date(s.end),onChange:function(t){r(G(G({},s),{},{end:Object($.a)(new Date(t),"yyyy-MM-dd 23:59:59"),type:"custom"})),e()},startOfWeek:l.l10n.startOfWeek,isInvalidDate:function(t){return tnew Date}})}}))},J="simpay-activity-reports-data-bar",tt=function(t){var e=t.isLoading,i=t.label,s=t.data;return Object(n.createElement)("div",{className:J},Object(n.createElement)("div",{className:"".concat(J,"__header")},Object(n.createElement)("h3",{className:"".concat(J,"__label")},i),!e&&Object(n.createElement)("div",{className:"".concat(J,"__legend")},s.map((function(t){var e=t.label,i=t.color;return Object(n.createElement)("div",{key:e,className:"".concat(J,"__legend-item"),style:{color:i}},Object(n.createElement)("span",null,e))})))),Object(n.createElement)("div",{className:"".concat(J,"__bar")},!e&&s.length>0&&s.map((function(t){return Object(n.createElement)(a.Button,{key:t.label,label:"".concat(t.label,": ").concat(t.value,"%"),showTooltip:!0,className:"".concat(J,"__bar-item"),style:{backgroundColor:t.color,flexBasis:"".concat(t.value,"%"),flexGrow:1}},Object(n.createElement)("div",{className:"screen-reader-text"},t.label))})),!e&&0===s.length&&Object(n.createElement)("div",{className:"".concat(J,"__bar-item-none")},Object(o.__)("n/a","simple-pay"))))},et=function(t){var e=t.currency,i=t.range,a=j("/wpsp/__internal__/report/payment-info",{range:i,currency:e},[i]),s=a.data,r=s.payment_method_types,l=s.payment_statuses;return Object(n.createElement)("div",{className:"".concat("simpay-activity-reports-card-reports","-payment-breakdown")},Object(n.createElement)(tt,{label:Object(o.__)("Payment Methods","simple-pay"),data:r,isLoading:a.isLoading}),Object(n.createElement)(tt,{label:Object(o.__)("Payments","simple-pay"),data:l,isLoading:a.isLoading}))},it=function(t){var e=t.currency,i=t.range,a=j("/wpsp/__internal__/report/gross-volume-period-over-period",{range:i,currency:e},[i]),s=a.data,r=s.delta,l=s.total_formatted;return Object(n.createElement)(n.Fragment,null,Object(n.createElement)("div",{className:"".concat("simpay-activity-reports-card-reports","-report-title")},Object(n.createElement)("h3",null,Object(o.__)("Gross Volume","simple-pay"),!a.isLoading&&Object(n.createElement)(n.Fragment,null,": ",Object(n.createElement)("em",null,Object(y.decodeEntities)(l)))),!a.isLoading&&Object(n.createElement)(d.a,{delta:r})),Object(n.createElement)(d.b,{report:a,style:{width:"100%",height:"300px"},config:{yAxisIsCurrency:!0}}))},nt=simpayAdminPageActivityReports.default_currency,at=function(t){var e=t.range,i=j("/wpsp/__internal__/report/successful-payments-period-over-period",{range:e,currency:nt},[e]),a=i.data,s=a.delta,r=a.total_formatted;return Object(n.createElement)(n.Fragment,null,Object(n.createElement)("div",{className:"".concat("simpay-activity-reports-card-reports","-report-title")},Object(n.createElement)("h3",null,Object(o.__)("Successful Payments","simple-pay"),!i.isLoading&&Object(n.createElement)(n.Fragment,null,": ",Object(n.createElement)("em",null,r))),!i.isLoading&&Object(n.createElement)(d.a,{delta:s})),Object(n.createElement)(d.b,{report:i,style:{width:"100%",height:"300px"},config:{yAxisIsCurrency:!1}}))},st=simpayAdminPageActivityReports,rt=st.user_id,ot=st.default_range,lt=ot.start,ct=ot.end,ht=ot.type,dt=st.default_currency,ut=function(){var t=Object(d.e)(rt,"simpay_activity_reports_range",{start:Object(d.d)(ht,lt),end:Object(d.c)(ht,ct),type:ht}),e=r()(t,2),i=e[0],s=e[1];return Object(n.createElement)(a.Card,{elevation:2,className:"simpay-activity-reports-card-reports"},Object(n.createElement)(a.CardHeader,{className:"".concat("simpay-activity-reports-card-reports","-header")},Object(n.createElement)("h2",{className:"simpay-activity-reports-card-title"},Object(o.__)("Reports","simple-pay")),Object(n.createElement)(Z,{range:i,setRange:s})),Object(n.createElement)(a.CardBody,null,Object(n.createElement)(et,{range:i,currency:dt}),Object(n.createElement)(a.CardDivider,null),Object(n.createElement)(it,{range:i,currency:dt}),Object(n.createElement)(a.CardDivider,null),Object(n.createElement)(at,{range:i,currency:dt})))};Object(n.render)(Object(n.createElement)((function(){var t=Object(d.e)(f,"simpay_activity_reports_currency",g),e=r()(t,3),i=e[0],s=e[1],l=e[2];function u(){var t=Object(h.addQueryArgs)(window.location.href,{currency:i});window.location.href=t}return Object(n.createElement)(n.Fragment,null,Object(n.createElement)(a.Dropdown,{position:"bottom center",popoverProps:{noArrow:!1},renderToggle:function(t){var e=t.isOpen,i=t.onToggle;return Object(n.createElement)(a.Button,{variant:"secondary",onClick:i,"aria-expanded":e,icon:c,tooltip:Object(o.__)("Settings","simple-pay")})},renderContent:function(){return Object(n.createElement)("div",{style:{width:"200px",padding:"8px"}},Object(n.createElement)(a.SelectControl,{label:Object(o.__)("Currency","simple-pay"),value:i,onChange:s,options:p.map((function(t){return{label:t,value:t.toLowerCase()}})),help:Object(o.__)("Activity with the selected currency and global payment mode will be shown.","simple-pay")}),Object(n.createElement)(a.Button,{type:"submit",variant:"primary",onClick:u,isBusy:l,disabled:l},Object(o.__)("Update","simple-pay")))}}),Object(n.createElement)(a.Popover.Slot,null))}),null),document.getElementById("simpay-admin-page-activity-reports-config")),Object(n.render)(Object(n.createElement)((function(){return Object(n.createElement)("div",{className:"simpay-activity-reports"},Object(n.createElement)(E,null),Object(n.createElement)(I,null),Object(n.createElement)(ut,null),Object(n.createElement)(a.Popover.Slot,null))}),null),document.getElementById("simpay-admin-page-activity-reports"))}]); \ No newline at end of file diff --git a/includes/core/assets/js/simpay-admin-page-setup-wizard-css.min.asset.php b/includes/core/assets/js/simpay-admin-page-setup-wizard-css.min.asset.php index f85fc4eb..8d01e16d 100644 --- a/includes/core/assets/js/simpay-admin-page-setup-wizard-css.min.asset.php +++ b/includes/core/assets/js/simpay-admin-page-setup-wizard-css.min.asset.php @@ -1 +1 @@ - array(), 'version' => '50487b4cd04528284a1dbbbdb5a6edba'); \ No newline at end of file + array(), 'version' => 'e39ad941d113c7896bed785b47f7101b'); \ No newline at end of file diff --git a/includes/core/functions/shared.php b/includes/core/functions/shared.php index 9f283831..8a2a866a 100644 --- a/includes/core/functions/shared.php +++ b/includes/core/functions/shared.php @@ -566,7 +566,7 @@ function simpay_shared_script_variables() { /* translators: %1$s Invoice limit. %2$s Recurring interval count -- not output when 1. %3$s Recurring interval. %4$s Recurring amount limit */ 'recurringIntervalDisplayInvoiceLimit' => esc_html_x( '%1$d payments of %2$s every %3$s %4$s', - 'recurring interval', + 'recurring interval with invoice limit', 'stripe' ), /* translators: %1$s Invoice limit. %2$s Recurring interval count -- not output when 1. %3$s Recurring interval. %4$s Recurring amount */ @@ -1307,9 +1307,13 @@ function simpay_get_payment_form_setting( $setting = array(); foreach ( $methods as $method ) { - $setting[ $method ] = array( - 'id' => $method, - ); + if ( is_array( $method ) ) { + $setting[ $method['id'] ] = $method; + } else { + $setting[ $method ] = array( + 'id' => $method, + ); + } } break; diff --git a/includes/core/payments/class-stripe-api.php b/includes/core/payments/class-stripe-api.php index f4063839..7e874791 100644 --- a/includes/core/payments/class-stripe-api.php +++ b/includes/core/payments/class-stripe-api.php @@ -159,44 +159,6 @@ public static function request( delete_transient( $cache_key ); } - // Special handling for submitting an order, which cannot use the legacy static handling. - // https://github.com/stripe/stripe-php#clientservice-patterns-vs-legacy-patterns. - if ( ! simpay_is_upe() && 'Order' === $class ) { - Stripe::setApiVersion( '2020-08-27;orders_beta=v4' ); - - $stripe = new \SimplePay\Vendor\Stripe\StripeClient( - array( - 'stripe_version' => '2020-08-27;orders_beta=v4', - ) - ); - - switch ( $function ) { - case 'reopen': - return $stripe->orders->reopen( - $id_or_args, - array(), - $args - ); - - break; - case 'submit': - return $stripe->orders->submit( - $id_or_args, - $args, - $opts - ); - - break; - default: - return call_user_func( - array( '\SimplePay\Vendor\Stripe\\' . $class, $function ), - $id_or_args, - $args, - $opts - ); - } - } - // Special handling for tax calculations. // If the request starts with Tax, handle it. if ( simpay_is_upe() && false !== strpos( $class, 'Tax' ) ) { diff --git a/includes/core/recaptcha/index.php b/includes/core/recaptcha/index.php index 26763fd8..ebde1b09 100644 --- a/includes/core/recaptcha/index.php +++ b/includes/core/recaptcha/index.php @@ -479,164 +479,6 @@ function validate_hcaptcha_payment( $paymentintent_args, $form, $form_data, $for ); } -/** - * Validates reCAPTCHA before Order preview. - * - * @since 4.6.0 - * - * @param \WP_REST_Request $request Incoming REST API request data. - * @param SimplePay\Core\Abstracts\Form $form Form instance. - * @throws \Exception If reCAPTCHA cannot be validated. - */ -function validate_recaptcha_order_preview( $request, $form ) { - // Only validate reCAPTCHA v3. - $existing_recaptcha = simpay_get_setting( 'recaptcha_site_key', '' ); - $default = ! empty( $existing_recaptcha ) - ? 'recaptcha-v3' - : ''; - $type = simpay_get_setting( 'captcha_type', $default ); - - if ( 'recaptcha-v3' !== $type ) { - return; - } - - $recaptcha_token = isset( $request['captcha'], $request['captcha']['recaptcha'] ) - ? sanitize_text_field( $request['captcha']['recaptcha'] ) - : false; - - // Ensure a token exists. - if ( false === $recaptcha_token ) { - throw new \Exception( __( 'Invalid reCAPTCHA. Please try again.', 'stripe' ) ); - } - - // Validate token. - $valid = validate_recaptcha( - $recaptcha_token, - sprintf( - 'simple_pay_form_%s_%s', - $form->id, - 'order_preview' - ) - ); - - if ( false === $valid ) { - throw new \Exception( __( 'Invalid reCAPTCHA. Please try again.', 'stripe' ) ); - } -} -// Only validate hCaptcha here if UPE is not enabled. Otherwise it is handled -// in the updated `wpsp/__internal__payment` endpoint. -if ( ! simpay_is_upe() ) { - add_action( - 'simpay_before_order_preview_from_payment_form_request', - __NAMESPACE__ . '\\validate_recaptcha_order_preview', - 10, - 2 - ); -} - -/** - * Validates reCAPTCHA before Order submission. - * - * @since 4.6.0 - * - * @param \WP_REST_Request $request Incoming REST API request data. - * @param SimplePay\Core\Abstracts\Form $form Form instance. - * @throws \Exception If reCAPTCHA cannot be validated. - */ -function validate_recaptcha_order_submit( $request, $form ) { - // Only validate reCAPTCHA v3. - $existing_recaptcha = simpay_get_setting( 'recaptcha_site_key', '' ); - $default = ! empty( $existing_recaptcha ) - ? 'recaptcha-v3' - : ''; - $type = simpay_get_setting( 'captcha_type', $default ); - - if ( 'recaptcha-v3' !== $type ) { - return; - } - - $recaptcha_token = isset( $request['captcha'], $request['captcha']['recaptcha'] ) - ? sanitize_text_field( $request['captcha']['recaptcha'] ) - : false; - - // Ensure a token exists. - if ( false === $recaptcha_token ) { - throw new \Exception( __( 'Invalid reCAPTCHA. Please try again.', 'stripe' ) ); - } - - // Validate token. - $valid = validate_recaptcha( - $recaptcha_token, - sprintf( - 'simple_pay_form_%s_%s', - $form->id, - 'order_submit' - ) - ); - - if ( false === $valid ) { - throw new \Exception( __( 'Invalid reCAPTCHA. Please try again.', 'stripe' ) ); - } -} -// Only validate hCaptcha here if UPE is not enabled. Otherwise it is handled -// in the updated `wpsp/__internal__payment` endpoint. -if ( ! simpay_is_upe() ) { - add_action( - 'simpay_before_order_submit_from_payment_form_request', - __NAMESPACE__ . '\\validate_recaptcha_order_submit', - 10, - 2 - ); -} - -/** - * Validates hCaptcha before Order submission. - * - * @since 4.6.6 - * - * @param \WP_REST_Request $request Incoming REST API request data. - * @param SimplePay\Core\Abstracts\Form $form Form instance. - * @throws \Exception If reCAPTCHA cannot be validated. - */ -function validate_hcaptcha_order_submit( $request, $form ) { - // Only validate hCaptcha. - $existing_recaptcha = simpay_get_setting( 'recaptcha_site_key', '' ); - $default = ! empty( $existing_recaptcha ) - ? 'recaptcha-v3' - : ''; - $type = simpay_get_setting( 'captcha_type', $default ); - - if ( 'hcaptcha' !== $type ) { - return; - } - - $hcaptcha_token = isset( $request['form_values'], $request['form_values']['h-captcha-response'] ) - ? sanitize_text_field( $request['form_values']['h-captcha-response'] ) - : ''; - - // Validate token. - $valid = validate_hcaptcha( $hcaptcha_token ); - - if ( false === $valid ) { - throw new \Exception( - __( - 'Invalid CAPTCHA. Please reload the page and try again.', - 'stripe' - ) - ); - } -} -// Only validate hCaptcha here if UPE is not enabled. Otherwise it is handled -// in the updated `wpsp/__internal__payment` endpoint. -if ( ! simpay_is_upe() ) { - add_action( - 'simpay_before_order_submit_from_payment_form_request', - __NAMESPACE__ . '\\validate_hcaptcha_order_submit', - 10, - 2 - ); -} - /** * Adds an Inbox notification if no CAPTCHA type has been set. * diff --git a/lib/Stripe/CHANGELOG.md b/lib/Stripe/CHANGELOG.md index 5be9a4c4..c4fcd0e4 100644 --- a/lib/Stripe/CHANGELOG.md +++ b/lib/Stripe/CHANGELOG.md @@ -1,12 +1,283 @@ # Changelog -## 10.6.0-beta.1 - 2023-02-02 -* [#1440](https://github.com/stripe/stripe-php/pull/1440) API Updates for beta branch - * Updated stable APIs to the latest version - * Add support for `all` method on resource `Transaction` - * Add support for `inferred_balances_refresh`, `subscriptions`, and `transaction_refresh` on `FinancialConnections.Account` - * Add support for `manual_entry`, `prefetch`, `status_details`, and `status` on `FinancialConnections.Session` - * Add support for new resource `FinancialConnections.Transaction` +## 13.3.0 - 2023-11-09 +* [#1603](https://github.com/stripe/stripe-php/pull/1603) Update generated code + * Add support for new value `terminal_reader_hardware_fault` on enum `StripeError.code` + +## 13.2.1 - 2023-11-06 +* [#1602](https://github.com/stripe/stripe-php/pull/1602) Fix error when "id" is not a string. + +## 13.2.0 - 2023-11-02 +* [#1599](https://github.com/stripe/stripe-php/pull/1599) Update generated code + * Add support for new resource `Tax.Registration` + * Add support for `all`, `create`, and `update` methods on resource `Registration` + * Add support for new value `token_card_network_invalid` on enum `StripeError.code` + * Add support for new value `payment_unreconciled` on enum `BalanceTransaction.type` + * Add support for `revolut_pay` on `PaymentMethod` + * Add support for new value `revolut_pay` on enum `PaymentMethod.type` + +## 13.1.0 - 2023-10-26 +* [#1595](https://github.com/stripe/stripe-php/pull/1595) Update generated code + * Add support for new value `balance_invalid_parameter` on enum `StripeError.code` + +## 13.0.0 - 2023-10-16 +* This release changes the pinned API version to `2023-10-16`. Please read the [API Upgrade Guide](https://stripe.com/docs/upgrades#2023-10-16) and carefully review the API changes before upgrading `stripe-php` package. +* [#1593](https://github.com/stripe/stripe-php/pull/1593) Update generated code + - Added `additional_tos_acceptances` field on `Person` + +## 12.8.0 - 2023-10-16 +* [#1590](https://github.com/stripe/stripe-php/pull/1590) Update generated code + * Add support for new values `issuing_token.created` and `issuing_token.updated` on enum `Event.type` + +## 12.7.0 - 2023-10-11 +* [#1589](https://github.com/stripe/stripe-php/pull/1589) Update generated code + * Add support for `client_secret`, `redirect_on_completion`, `return_url`, and `ui_mode` on `Checkout.Session` + * Add support for `offline` on `Terminal.Configuration` + +## 12.6.0 - 2023-10-05 +* [#1586](https://github.com/stripe/stripe-php/pull/1586) Update generated code + * Add support for new resource `Issuing.Token` + * Add support for `all`, `retrieve`, and `update` methods on resource `Token` + * Add support for `token` on `Issuing.Authorization` and `Issuing.Transaction` +* [#1569](https://github.com/stripe/stripe-php/pull/1569) Fix: Do not bother removing `friendsofphp/php-cs-fixer` + +## 12.5.0 - 2023-09-28 +* [#1582](https://github.com/stripe/stripe-php/pull/1582) Generate Discount, SourceTransaction and use sections in more places +* [#1584](https://github.com/stripe/stripe-php/pull/1584) Update generated code + * Add support for `rendering` on `Invoice` + +## 12.4.0 - 2023-09-21 +* [#1579](https://github.com/stripe/stripe-php/pull/1579) Update generated code + * Add back constant for `invoiceitem.updated` webhook event. This was mistakenly removed in v12.2.0. +* [#1566](https://github.com/stripe/stripe-php/pull/1566) Fix: Remove `squizlabs/php_codesniffer` +* [#1568](https://github.com/stripe/stripe-php/pull/1568) Enhancement: Reference `phpunit.xsd` as installed with `composer` +* [#1565](https://github.com/stripe/stripe-php/pull/1565) Enhancement: Use PHP 8.2 as leading PHP version + +## 12.3.0 - 2023-09-14 +* [#1577](https://github.com/stripe/stripe-php/pull/1577) Update generated code + * Add support for new resource `PaymentMethodConfiguration` + * Add support for `all`, `create`, `retrieve`, and `update` methods on resource `PaymentMethodConfiguration` + * Add support for `payment_method_configuration_details` on `Checkout.Session`, `PaymentIntent`, and `SetupIntent` +* [#1573](https://github.com/stripe/stripe-php/pull/1573) Update generated code + * Add support for `capture`, `create`, `expire`, `increment`, and `reverse` test helper methods on resource `Issuing.Authorization` + * Add support for `create_force_capture`, `create_unlinked_refund`, and `refund` test helper methods on resource `Issuing.Transaction` + * Add support for new value `stripe_tax_inactive` on enum `StripeError.code` + +## 12.2.0 - 2023-09-07 +* [#1571](https://github.com/stripe/stripe-php/pull/1571) Update generated code + * Add support for new resource `PaymentMethodDomain` + * Add support for `all`, `create`, `retrieve`, `update`, and `validate` methods on resource `PaymentMethodDomain` + * Add support for new values `treasury.credit_reversal.created`, `treasury.credit_reversal.posted`, `treasury.debit_reversal.completed`, `treasury.debit_reversal.created`, `treasury.debit_reversal.initial_credit_granted`, `treasury.financial_account.closed`, `treasury.financial_account.created`, `treasury.financial_account.features_status_updated`, `treasury.inbound_transfer.canceled`, `treasury.inbound_transfer.created`, `treasury.inbound_transfer.failed`, `treasury.inbound_transfer.succeeded`, `treasury.outbound_payment.canceled`, `treasury.outbound_payment.created`, `treasury.outbound_payment.expected_arrival_date_updated`, `treasury.outbound_payment.failed`, `treasury.outbound_payment.posted`, `treasury.outbound_payment.returned`, `treasury.outbound_transfer.canceled`, `treasury.outbound_transfer.created`, `treasury.outbound_transfer.expected_arrival_date_updated`, `treasury.outbound_transfer.failed`, `treasury.outbound_transfer.posted`, `treasury.outbound_transfer.returned`, `treasury.received_credit.created`, `treasury.received_credit.failed`, `treasury.received_credit.succeeded`, and `treasury.received_debit.created` on enum `Event.type` + * Remove support for value `invoiceitem.updated` from enum `Event.type` + * Add support for `features` on `Product` + +## 12.1.0 - 2023-08-31 +* [#1560](https://github.com/stripe/stripe-php/pull/1560) Update generated code + * Add support for new resource `AccountSession` + * Add support for `create` method on resource `AccountSession` + * Add support for new values `obligation_inbound`, `obligation_outbound`, `obligation_payout_failure`, `obligation_payout`, `obligation_reversal_inbound`, and `obligation_reversal_outbound` on enum `BalanceTransaction.type` + * Change type of `Event.type` from `string` to `enum` + * Add support for `application` on `PaymentLink` +* [#1562](https://github.com/stripe/stripe-php/pull/1562) Nicer ApiErrorException::__toString() +* [#1558](https://github.com/stripe/stripe-php/pull/1558) Update generated code + * Add support for `payment_method_details` on `Dispute` + * Add support for `prefetch` on `FinancialConnections.Session` + +## 12.0.0 - 2023-08-18 +**⚠️ ACTION REQUIRED: the breaking change in this release likely affects you ⚠️** + +### Version pinning + +In this release, Stripe API Version `2023-08-16` (the latest at time of release) will be sent by default on all requests. This is a significant change with wide ramifications. The API version affects the properties you see on responses, the parameters you are allowed to send on requests, and so on. The previous default was to use your [Stripe account's default API version](https://stripe.com/docs/development/dashboard/request-logs#view-your-default-api-version). + +To successfully upgrade to stripe-php v12, you must either + +1. **(Recommended) Upgrade your integration to be compatible with API Version `2023-08-16`.** + + Please read the API Changelog carefully for each API Version from `2023-08-16` back to your [Stripe account's default API version](https://stripe.com/docs/development/dashboard/request-logs#view-your-default-api-version). Determine if you are using any of the APIs that have changed in a breaking way, and adjust your integration accordingly. Carefully test your changes with Stripe [Test Mode](https://stripe.com/docs/keys#test-live-modes) before deploying them to production. + + You can read the [v12 migration guide](https://github.com/stripe/stripe-php/wiki/Migration-guide-for-v12) for more detailed instructions. +2. **(Alternative option) Specify a version other than `2023-08-16` when initializing `stripe-php`.** + + If you were previously initializing stripe-php without an explicit API Version, you can postpone modifying your integration by specifying a version equal to your [Stripe account's default API version](https://stripe.com/docs/development/dashboard/request-logs#view-your-default-api-version). For example: + + ```diff + // if using StripeClient + - $stripe = new \Stripe\StripeClient('sk_test_xyz'); + + $stripe = new \Stripe\StripeClient([ + + 'api_key' => 'sk_test_xyz', + 'stripe_version' => '2020-08-27', + + ]); + + // if using the global client + Stripe.apiKey = "sk_test_xyz"; + + Stripe::setApiVersion('2020-08-27'); + ``` + + If you were already initializing stripe-php with an explicit API Version, upgrading to v12 will not affect your integration. + + Read the [v12 migration guide](https://github.com/stripe/stripe-php/wiki/Migration-guide-for-v12) for more details. + + Going forward, each major release of this library will be *pinned* by default to the latest Stripe API Version at the time of release. + + That is, instead of upgrading stripe-php and separately upgrading your Stripe API Version through the Stripe Dashboard, whenever you upgrade major versions of stripe-php, you should also upgrade your integration to be compatible with the latest Stripe API version. + +### Other changes +" ⚠️" symbol highlights breaking changes. +* [#1553](https://github.com/stripe/stripe-php/pull/1553)⚠️ Remove deprecated enum value `Invoice.STATUS_DELETE` + +* [#1550](https://github.com/stripe/stripe-php/pull/1550) PHPDoc changes + * Remove support for `alternate_statement_descriptors`, `destination`, and `dispute` on `Charge` + * Remove support for value `charge_refunded` from enum `Dispute.status` + * Remove support for `rendering` on `Invoice` + * Remove support for `attributes`, `caption`, and `deactivate_on` on `Product` + +## 11.0.0 - 2023-08-16 +Please do not use stripe-php v11. It did not correctly apply the [pinning behavior](https://github.com/stripe/stripe-php/blob/master/CHANGELOG.md#version-pinning) and was removed from packagist + +## 10.21.0 - 2023-08-10 +* [#1546](https://github.com/stripe/stripe-php/pull/1546) Update generated code + * Add support for new value `payment_reversal` on enum `BalanceTransaction.type` + * Add support for new value `adjusted_for_overdraft` on enum `CustomerBalanceTransaction.type` + +## 10.20.0 - 2023-08-03 +* [#1539](https://github.com/stripe/stripe-php/pull/1539) Update generated code + * Add support for `subscription_details` on `Invoice` + * Add support for new values `sepa_debit_fingerprint` and `us_bank_account_fingerprint` on enum `Radar.ValueList.item_type` + +## 10.19.0 - 2023-07-27 +* [#1534](https://github.com/stripe/stripe-php/pull/1534) Update generated code + * Improve PHPDoc type for `ApplicationFee.refunds` + * Add support for `deleted` on `Apps.Secret` +* [#1526](https://github.com/stripe/stripe-php/pull/1526) Add constants for payment intent cancellation reasons +* [#1533](https://github.com/stripe/stripe-php/pull/1533) Update generated code + * Add support for new value `service_tax` on enum `TaxRate.tax_type` +* [#1487](https://github.com/stripe/stripe-php/pull/1487) PHPDoc: use union of literals for $method parameter throughout + +## 10.18.0 - 2023-07-20 +* [#1533](https://github.com/stripe/stripe-php/pull/1533) Update generated code + * Add support for new value `service_tax` on enum `TaxRate.tax_type` +* [#1526](https://github.com/stripe/stripe-php/pull/1526) Add constants for payment intent cancellation reasons +* [#1487](https://github.com/stripe/stripe-php/pull/1487) PHPDoc: use union of literals for $method parameter throughout + +## 10.17.0 - 2023-07-13 +* [#1525](https://github.com/stripe/stripe-php/pull/1525) Update generated code + * Add support for new resource `Tax.Settings` + * Add support for `retrieve` and `update` methods on resource `Settings` + * Add support for new value `invalid_tax_location` on enum `StripeError.code` + * Add support for `product` on `Tax.TransactionLineItem` + * Add constant for `tax.settings.updated` webhook event +* [#1520](https://github.com/stripe/stripe-php/pull/1520) Update generated code + * Release specs are identical. + +## 10.16.0 - 2023-06-29 +* [#1517](https://github.com/stripe/stripe-php/pull/1517) Update generated code + * Add support for new value `application_fees_not_allowed` on enum `StripeError.code` + * Add support for `effective_at` on `CreditNote` and `Invoice` + * Add support for `on_behalf_of` on `Mandate` +* [#1514](https://github.com/stripe/stripe-php/pull/1514) Update generated code + * Release specs are identical. +* [#1512](https://github.com/stripe/stripe-php/pull/1512) Update generated code + * Change type of `Checkout.Session.success_url` from `string` to `nullable(string)` + +## 10.15.0 - 2023-06-08 +* [#1506](https://github.com/stripe/stripe-php/pull/1506) Update generated code + * Add support for `preferred_locales` on `Issuing.Cardholder` + +## 10.14.0 - 2023-05-25 +* [#1503](https://github.com/stripe/stripe-php/pull/1503) Update generated code + * Add support for `zip` on `PaymentMethod` + * Add support for new value `zip` on enum `PaymentMethod.type` +* [#1502](https://github.com/stripe/stripe-php/pull/1502) Generate error codes +* [#1501](https://github.com/stripe/stripe-php/pull/1501) Update generated code + +* [#1499](https://github.com/stripe/stripe-php/pull/1499) Update generated code + * Add support for new values `amusement_tax` and `communications_tax` on enum `TaxRate.tax_type` + +## 10.13.0 - 2023-05-11 +* [#1490](https://github.com/stripe/stripe-php/pull/1490) Update generated code + * Add support for `paypal` on `PaymentMethod` + * Add support for `effective_percentage` on `TaxRate` +* [#1488](https://github.com/stripe/stripe-php/pull/1488) Increment PHPStan to strictness level 2 +* [#1483](https://github.com/stripe/stripe-php/pull/1483) Update generated code + +* [#1480](https://github.com/stripe/stripe-php/pull/1480) Update generated code + * Change type of `Identity.VerificationSession.options` from `VerificationSessionOptions` to `nullable(VerificationSessionOptions)` + * Change type of `Identity.VerificationSession.type` from `enum('document'|'id_number')` to `nullable(enum('document'|'id_number'))` +* [#1478](https://github.com/stripe/stripe-php/pull/1478) Update generated code + * Release specs are identical. +* [#1475](https://github.com/stripe/stripe-php/pull/1475) Update generated code + + +## 10.12.1 - 2023-04-04 +* [#1473](https://github.com/stripe/stripe-php/pull/1473) Update generated code + * Add back `deleted` from `Invoice.status`. + +## 10.12.0 - 2023-03-30 +* [#1470](https://github.com/stripe/stripe-php/pull/1470) Update generated code + * Remove support for `create` method on resource `Tax.Transaction` + * This is not a breaking change, as this method was deprecated before the Tax Transactions API was released in favor of the `createFromCalculation` method. + * Remove support for value `deleted` from enum `Invoice.status` + * This is not a breaking change, as the value was never returned or accepted as input. +* [#1468](https://github.com/stripe/stripe-php/pull/1468) Trigger workflow for tags +* [#1467](https://github.com/stripe/stripe-php/pull/1467) Update generated code (new) + * Release specs are identical. + +## 10.11.0 - 2023-03-23 +* [#1458](https://github.com/stripe/stripe-php/pull/1458) Update generated code + * Add support for new resources `Tax.CalculationLineItem`, `Tax.Calculation`, `Tax.TransactionLineItem`, and `Tax.Transaction` + * Add support for `create` and `list_line_items` methods on resource `Calculation` + * Add support for `create_from_calculation`, `create_reversal`, `create`, `list_line_items`, and `retrieve` methods on resource `Transaction` + * Add support for `currency_conversion` on `Checkout.Session` + * Add support for new value `automatic_async` on enum `PaymentIntent.capture_method` + * Add support for new value `link` on enum `PaymentLink.payment_method_types[]` + * Add support for `automatic_payment_methods` on `SetupIntent` + +## 10.10.0 - 2023-03-16 +* [#1457](https://github.com/stripe/stripe-php/pull/1457) API Updates + * Add support for `future_requirements` and `requirements` on `BankAccount` + * Add support for new value `automatic_async` on enum `PaymentIntent.capture_method` + * Add support for new value `cashapp` on enum `PaymentLink.payment_method_types[]` + * Add support for `cashapp` on `PaymentMethod` + * Add support for new value `cashapp` on enum `PaymentMethod.type` +* [#1454](https://github.com/stripe/stripe-php/pull/1454) Update generated code (new) + * Add support for new value `cashapp` on enum `PaymentLink.payment_method_types[]` + * Add support for `cashapp` on `PaymentMethod` + * Add support for new value `cashapp` on enum `PaymentMethod.type` + +## 10.9.1 - 2023-03-14 +* [#1453](https://github.com/stripe/stripe-php/pull/1453) Restore StripeClient.getService + +## 10.9.0 - 2023-03-09 +* [#1450](https://github.com/stripe/stripe-php/pull/1450) API Updates + * Add support for `cancellation_details` on `Subscription` + * Fix return types on custom methods (extends https://github.com/stripe/stripe-php/pull/1446) + +* [#1446](https://github.com/stripe/stripe-php/pull/1446) stripe->customers->retrievePaymentMethod returns the wrong class (type hint) + +## 10.8.0 - 2023-03-02 +* [#1447](https://github.com/stripe/stripe-php/pull/1447) API Updates + * Add support for `reconciliation_status` on `Payout` + * Add support for new value `lease_tax` on enum `TaxRate.tax_type` + +## 10.7.0 - 2023-02-23 +* [#1444](https://github.com/stripe/stripe-php/pull/1444) API Updates + * Add support for new value `igst` on enum `TaxRate.tax_type` + +## 10.6.1 - 2023-02-21 +* [#1443](https://github.com/stripe/stripe-php/pull/1443) Remove init.php from the list of ignored files + +## 10.6.0 - 2023-02-16 +* [#1441](https://github.com/stripe/stripe-php/pull/1441) API Updates + * Add support for `refund_payment` method on resource `Terminal.Reader` + * Add support for `custom_fields` on `Checkout.Session` and `PaymentLink` +* [#1236](https://github.com/stripe/stripe-php/pull/1236) subscription_proration_date not always presented in Invoice +* [#1431](https://github.com/stripe/stripe-php/pull/1431) Fix: Do not use unbounded version constraint for `actions/checkout` +* [#1436](https://github.com/stripe/stripe-php/pull/1436) Enhancement: Enable and configure `visibility_required` fixer +* [#1432](https://github.com/stripe/stripe-php/pull/1432) Enhancement: Update `actions/cache` +* [#1434](https://github.com/stripe/stripe-php/pull/1434) Fix: Remove parentheses +* [#1433](https://github.com/stripe/stripe-php/pull/1433) Enhancement: Run tests on PHP 8.2 +* [#1438](https://github.com/stripe/stripe-php/pull/1438) Update .gitattributes ## 10.5.0 - 2023-02-02 * [#1439](https://github.com/stripe/stripe-php/pull/1439) API Updates @@ -17,16 +288,6 @@ * Add support for `trial_settings` on `Subscription` * Add support for new value `paused` on enum `Subscription.status` -## 10.5.0-beta.2 - 2023-01-26 -* [#1429](https://github.com/stripe/stripe-php/pull/1429) API Updates for beta branch - * Updated stable APIs to the latest version - * Add support for `list_transactions` method on resource `Tax.Transaction` - -## 10.5.0-beta.1 - 2023-01-19 -* [#1427](https://github.com/stripe/stripe-php/pull/1427) API Updates for beta branch - * Updated stable APIs to the latest version - * Add support for `Tax.Settings` resource. - ## 10.4.0 - 2023-01-19 * [#1381](https://github.com/stripe/stripe-php/pull/1381) Add getService methods to StripeClient and AbstractServiceFactory to allow mocking * [#1424](https://github.com/stripe/stripe-php/pull/1424) API Updates @@ -36,45 +297,15 @@ * [#1425](https://github.com/stripe/stripe-php/pull/1425) Fix Stripe::setAccountId parameter type * [#1418](https://github.com/stripe/stripe-php/pull/1418) Switch to mb_convert_encoding to fix utf8_encode deprecation warning -## 10.4.0-beta.3 - 2023-01-12 -* [#1423](https://github.com/stripe/stripe-php/pull/1423) API Updates for beta branch - * Updated stable APIs to the latest version - * Add support for `Tax.Registration` resource. - * Change `draft_quote` method implementation from hitting `/v1/quotes/{quotes}/draft` to `/v1/quotes/{quotes}/mark_draft` - -## 10.4.0-beta.2 - 2023-01-05 -* [#1420](https://github.com/stripe/stripe-php/pull/1420) API Updates for beta branch - * Updated stable APIs to the latest version - * Add support for `mark_stale_quote` method on resource `Quote` - -## 10.4.0-beta.1 - 2022-12-22 -* [#1414](https://github.com/stripe/stripe-php/pull/1414) API Updates for beta branch - * Updated stable APIs to the latest version - * Move `$stripe->taxCalculations` to `$stripe->tax->calculations` and `$stripe->taxTransactions` to `$stripe->tax->transactions` - ## 10.3.0 - 2022-12-22 * [#1413](https://github.com/stripe/stripe-php/pull/1413) API Updates Change `CheckoutSession.cancel_url` to be nullable. -## 10.3.0-beta.1 - 2022-12-15 -* [#1412](https://github.com/stripe/stripe-php/pull/1412) API Updates for beta branch - * Updated stable APIs to the latest version - * Add support for new resources `QuoteLine`, `TaxCalculation`, and `TaxTransaction` - * Add support for `create` and `list_line_items` methods on resource `TaxCalculation` - * Add support for `create_reversal`, `create`, and `retrieve` methods on resource `TaxTransaction` - ## 10.2.0 - 2022-12-15 * [#1411](https://github.com/stripe/stripe-php/pull/1411) API Updates * Add support for new value `invoice_overpaid` on enum `CustomerBalanceTransaction.type` * [#1407](https://github.com/stripe/stripe-php/pull/1407) API Updates -## 10.2.0-beta.1 - 2022-12-08 -* [#1408](https://github.com/stripe/stripe-php/pull/1408) API Updates for beta branch - * Updated stable APIs to the latest version -* [#1406](https://github.com/stripe/stripe-php/pull/1406) API Updates for beta branch - * Updated stable APIs to the latest version -* [#1398](https://github.com/stripe/stripe-php/pull/1398) API Updates for beta branch - * Updated stable APIs to the latest version ## 10.1.0 - 2022-12-06 * [#1405](https://github.com/stripe/stripe-php/pull/1405) API Updates @@ -96,6 +327,28 @@ Breaking changes that arose during code generation of the library that we postpo "⚠️" symbol highlights breaking changes. +### Deprecated +* [#1382](https://github.com/stripe/stripe-php/pull/1382) Mark `resource.save` as deprecated. Prefer the static update method that doesn't require retrieval of the resource to update it. +```PHP +// before +$resource = Price::retrieve(self::TEST_RESOURCE_ID); +$resource->metadata['key'] = 'value'; +$resource->save(); + +// after +$resource = Price::update('price_123', [ + 'metadata' => ['key' => 'value'], +]); +``` + +### ⚠️ Removed +- [#1377](https://github.com/stripe/stripe-php/pull/1377) Removed deprecated `Sku` resource and service +- [#1375](https://github.com/stripe/stripe-php/pull/1375) Removed deprecated `Orders` resource and service +- [#1375](https://github.com/stripe/stripe-php/pull/1375) Removed deprecated `Product` field from the `LineItem` +- [#1388](https://github.com/stripe/stripe-php/pull/1388) Removed deprecated `AlipayAccount` resource +- [#1396](https://github.com/stripe/stripe-php/pull/1396) Removed `charges` field on `PaymentIntent` and replace it with `latest_charge`. + + ## 9.9.0 - 2022-11-08 * [#1394](https://github.com/stripe/stripe-php/pull/1394) API Updates * Add support for new values `eg_tin`, `ph_tin`, and `tr_tin` on enum `TaxId.type` @@ -103,17 +356,6 @@ Breaking changes that arose during code generation of the library that we postpo * Add support for `on_behalf_of` on `Subscription` * [#1379](https://github.com/stripe/stripe-php/pull/1379) Do not run Coveralls in PR-s -## 9.9.0-beta.2 - 2022-11-02 -* [#1390](https://github.com/stripe/stripe-php/pull/1390) API Updates for beta branch - * Updated beta APIs to the latest stable version - -## 9.9.0-beta.1 - 2022-10-21 -* [#1384](https://github.com/stripe/stripe-php/pull/1384) API Updates for beta branch - * Updated stable APIs to the latest version - * Add support for `network_data` on `Issuing.Transaction` - * Add support for `paypal` on `Source` - * Add support for new value `paypal` on enum `Source.type` - ## 9.8.0 - 2022-10-20 * [#1383](https://github.com/stripe/stripe-php/pull/1383) API Updates * Add support for new values `jp_trn` and `ke_pin` on enum `TaxId.type` @@ -127,15 +369,6 @@ Breaking changes that arose during code generation of the library that we postpo * [#1370](https://github.com/stripe/stripe-php/pull/1370) API Updates * Add support for `created` on `Checkout.Session` -## 9.7.0-beta.2 - 2022-10-07 -* [#1373](https://github.com/stripe/stripe-php/pull/1373) API Updates for beta branch - * Updated stable APIs to the latest version - -## 9.7.0-beta.1 - 2022-09-26 -* [#1368](https://github.com/stripe/stripe-php/pull/1368) API Updates for beta branch - * Updated stable APIs to the latest version - * Add `FinancingOffer`, `FinancingSummary` and `FinancingTransaction` resources. - ## 9.6.0 - 2022-09-15 * [#1365](https://github.com/stripe/stripe-php/pull/1365) API Updates * Add support for `from_invoice` and `latest_revision` on `Invoice` @@ -158,22 +391,12 @@ Breaking changes that arose during code generation of the library that we postpo * Addresses https://github.com/stripe/stripe-php/issues/1353. The library today does not actually return a `ErrorObject` for these fields, so the type annotation was incorrect. * [#1356](https://github.com/stripe/stripe-php/pull/1356) Add beta readme.md section -## 9.4.0-beta.1 - 2022-08-26 -* [#1358](https://github.com/stripe/stripe-php/pull/1358) API Updates for beta branch - * Updated stable APIs to the latest version - * Add support for the beta [Gift Card API](https://stripe.com/docs/gift-cards). - ## 9.3.0 - 2022-08-23 * [#1355](https://github.com/stripe/stripe-php/pull/1355) API Updates * Change type of `Treasury.OutboundTransfer.destination_payment_method` from `string` to `string | null` * Change the return type of `CustomerService.fundCashBalance` test helper from `CustomerBalanceTransaction` to `CustomerCashBalanceTransaction`. * This would generally be considered a breaking change, but we've worked with all existing users to migrate and are comfortable releasing this as a minor as it is solely a test helper method. This was essentially broken prior to this change. -## 9.3.0-beta.1 - 2022-08-23 -* [#1354](https://github.com/stripe/stripe-php/pull/1354) API Updates for beta branch - - Updated stable APIs to the latest version - - `Stripe-Version` beta headers are not pinned by-default and need to be manually specified, please refer to [beta SDKs README section](https://github.com/stripe/stripe-php/blob/master/README.md#beta-sdks) - ## 9.2.0 - 2022-08-19 * [#1352](https://github.com/stripe/stripe-php/pull/1352) API Updates * Add support for new resource `CustomerCashBalanceTransaction` @@ -182,11 +405,6 @@ Breaking changes that arose during code generation of the library that we postpo * [#1351](https://github.com/stripe/stripe-php/pull/1351) Add a support section to the readme * [#1304](https://github.com/stripe/stripe-php/pull/1304) Allow passing PSR-3 loggers to setLogger as they are compatible -## 9.2.0-beta.1 - 2022-08-11 -* [#1349](https://github.com/stripe/stripe-php/pull/1349) API Updates for beta branch - - Updated stable APIs to the latest version - - Add `refundPayment` method to Terminal resource - ## 9.1.0 - 2022-08-11 * [#1348](https://github.com/stripe/stripe-php/pull/1348) API Updates * Add support for `payment_method_collection` on `Checkout.Session` and `PaymentLink` @@ -194,11 +412,6 @@ Breaking changes that arose during code generation of the library that we postpo * [#1346](https://github.com/stripe/stripe-php/pull/1346) API Updates * Add support for `expires_at` on `Apps.Secret` -## 9.1.0-beta.1 - 2022-08-03 -* [#1345](https://github.com/stripe/stripe-php/pull/1345) API Updates for beta branch - - Updated stable APIs to the latest version - - Added the `Order` resource support - ## 9.0.0 - 2022-08-02 Breaking changes that arose during code generation of the library that we postponed for the next major version. For changes to the SDK, read more detailed description at https://github.com/stripe/stripe-php/wiki/Migration-guide-for-v9. For changes to the Stripe products, read more at https://stripe.com/docs/upgrades#2022-08-01. @@ -210,30 +423,43 @@ Breaking changes that arose during code generation of the library that we postpo * [#1273](https://github.com/stripe/stripe-php/pull/1273) Add some PHPDoc return types and fixes * [#1341](https://github.com/stripe/stripe-php/pull/1341) Next major release changes +### Added +* Add `alternate_statement_descriptors`, `authorization_code`, and `level3` properties to `Charge` resource. +* Add `previewLines` method to `CreditNote` resource. +* Add `transfer_data` property to `Subscription` resource. +* Add `SOURCE_TYPE_FPX` constant to `Transfer` resource. +* Add new error code constants to `ErrorObject`. +* Add support for `shipping_cost` and `shipping_details` on `Checkout.Session` + +### ⚠️ Changed +* Updated certificate bundle ([#1314](https://github.com/stripe/stripe-php/pull/1314)) +* Add `params` parameter to `close` method in `Dispute` resource. + +### ⚠️ Removed +* Remove deprecated `AlipayAccount`, `BitcoinReceiver`, `BitcoinTransaction`, `Recipient`, `RecipientTransfer`, and `ThreeDSecure` resources. +* Remove `CAPABILITY_CARD_PAYMENTS`, `CAPABILITY_LEGACY_PAYMENTS`, `CAPABILITY_PLATFORM_PAYMENTS`, `CAPABILITY_TRANSFERS`, `CAPABILITY_STATUS_ACTIVE`, `CAPABILITY_STATUS_INACTIVE`, and `CAPABILITY_STATUS_PENDING` constants from `Account` resource. Please use up-to-date values from https://stripe.com/docs/connect/account-capabilities. +* Remove `AssociatedObjects` array property from `EphemeralKey` resource. The field was undocumented and unsupported. +* Remove `details` method from `Card` resource. The endpoint was deprecated and no longer exists. +* Remove `recipient` property from `Card` resource. The property was deprecated. +* Remove ability to list `Card` resources for a particular `Recipient`. +* Remove `sources` property from `Card` resource. The property was deprecated. +* Remove `FAILURE_REASON` constant from `Refund` resource. The value was deprecated. +* Remove `Recipient` resource. The resource was deprecated. +* Remove `OrderItem` resource. The resource was deprecated. +* Remove `all` method from `LineItem`. +* Remove `cancel` method from `Transfer` and `TransferService`. This method is deprecated. +* Remove `allTransactions` method from `SourceService` service. Please use `allSourceTransactions` method instead. +* Remove `persons` method from `Account` resource. Please use `allPersons` method instead. +* Remove `sourceTransactions` method from `Source` resource. Please use `allSourceTransactions` method instead. +* Remove `usageRecordSummaries` method from `SubscriptionItem` resource. Please use `allUsageRecordSummaries` method instead. +* Remove `SOURCE_TYPE_ALIPAY_ACCOUNT` and `SOURCE_TYPE_FINANCING` constants from `Transfer` resource. The values were deprecated and are no longer in use. +* Remove deprecated error code constants from `ErrorObject`: `CODE_ACCOUNT_ALREADY_EXISTS`, `CODE_ORDER_CREATION_FAILED`, `CODE_ORDER_REQUIRED_SETTINGS`, `CODE_ORDER_STATUS_INVALID`, `CODE_ORDER_UPSTREAM_TIMEOUT`, and `CODE_UPSTREAM_ORDER_CREATION_FAILED`. +* Remove deprecated event constants from `Webhook`: `ISSUER_FRAUD_RECORD_CREATED`, ` ORDER_PAYMENT_FAILED`, `ORDER_PAYMENT_SUCCEEDED`, `ORDER_UPDATED`, `ORDER_RETURN_CREATED`, `PAYMENT_METHOD_CARD_AUTOMATICALLY_UPDATED`, `PING`, `PROMOTION_CODE_DELETED`, and `TREASURY_RECEIVED_CREDIT_REVERSED`. The events are deprecated and no longer sent by Stripe. + ## 8.12.0 - 2022-07-25 * [#1332](https://github.com/stripe/stripe-php/pull/1332) API Updates * Add support for `default_currency` and `invoice_credit_balance` on `Customer` -## 8.12.0-beta.1 - 2022-07-22 -* [#1331](https://github.com/stripe/stripe-php/pull/1331) API Updates for beta branch - - Updated stable APIs to the latest version -* [#1328](https://github.com/stripe/stripe-php/pull/1328) API Updates for beta branch - - Updated stable APIs to the latest version - - Add `QuotePhase` resource -* [#1325](https://github.com/stripe/stripe-php/pull/1325) API Updates for beta branch - - Updated stable APIs to the latest version - - Add `QuotePhaseConfiguration` service. - - Add `Price.migrate_to` property - - Add `SubscriptionSchedule.amend` method. - - Add `Discount.subscription_item` property. - - Add `Quote.subscription_data.billing_behavior`, `billing_cycle_anchor`, `end_behavior`, `from_schedule`, `from_subscription`, `prebilling`, `proration_behavior` properties. - - Add `phases` parameter to `Quote.create` - - Add `Subscription.discounts`, `prebilling` properties. -* [#1320](https://github.com/stripe/stripe-php/pull/1320) API Updates for beta branch - - Include `server_side_confirmation_beta=v1` beta - - Add `secretKeyConfirmation` to `PaymentIntent` -* [#1317](https://github.com/stripe/stripe-php/pull/1317) API Updates for beta branch - - Updated stable APIs to the latest version ## 8.11.0 - 2022-07-18 * [#1324](https://github.com/stripe/stripe-php/pull/1324) API Updates @@ -299,6 +525,7 @@ Breaking changes that arose during code generation of the library that we postpo * Add support for `id_number_secondary_provided` on `Person` * [#1295](https://github.com/stripe/stripe-php/pull/1295) API Updates + ## 8.3.0 - 2022-05-23 * [#1294](https://github.com/stripe/stripe-php/pull/1294) API Updates * Add support for new resource `Apps.Secret` @@ -338,6 +565,7 @@ Breaking changes that arose during code generation of the library that we postpo * Add support for `default_price` on `Product` * Add support for `instructions_email` on `Refund` + ## 7.127.0 - 2022-05-05 * [#1281](https://github.com/stripe/stripe-php/pull/1281) API Updates * Add support for new resources `FinancialConnections.AccountOwner`, `FinancialConnections.AccountOwnership`, `FinancialConnections.Account`, and `FinancialConnections.Session` @@ -368,6 +596,7 @@ Breaking changes that arose during code generation of the library that we postpo * Add support for new value `customer_balance` on enum `PaymentMethod.type` * Add support for `configuration_overrides` on `Terminal.Location` + ## 7.123.0 - 2022-04-13 * [#1263](https://github.com/stripe/stripe-php/pull/1263) API Updates * Add support for `increment_authorization` method on resource `PaymentIntent` @@ -405,6 +634,7 @@ Breaking changes that arose during code generation of the library that we postpo * Add support for new values `bg_uic`, `hu_tin`, and `si_tin` on enum `TaxId.type` * Add `test_helpers.test_clock.advancing`, `test_helpers.test_clock.created`, `test_helpers.test_clock.deleted`, `test_helpers.test_clock.internal_failure`, and `test_helpers.test_clock.ready` events. + ## 7.117.0 - 2022-03-18 * [#1254](https://github.com/stripe/stripe-php/pull/1254) API Updates * Add support for `status` on `Card` @@ -415,6 +645,7 @@ Breaking changes that arose during code generation of the library that we postpo * [#1248](https://github.com/stripe/stripe-php/pull/1248) API Updates * Add support for `proration_details` on `InvoiceLineItem` + ## 7.115.0 - 2022-03-01 * [#1245](https://github.com/stripe/stripe-php/pull/1245) [#1247](https://github.com/stripe/stripe-php/pull/1247) API Updates * Add support for new resource `TestHelpers.TestClock` @@ -439,6 +670,7 @@ Breaking changes that arose during code generation of the library that we postpo * Add support for `phone_number_collection` on `PaymentLink` * Add support for new value `is_vat` on enum `TaxId.type` + ## 7.111.0 - 2022-01-20 * [#1233](https://github.com/stripe/stripe-php/pull/1233) API Updates * Add support for new resource `PaymentLink` @@ -583,6 +815,7 @@ Breaking changes that arose during code generation of the library that we postpo * [#1141](https://github.com/stripe/stripe-php/pull/1141) Update PHPDocs * Add support for `url` on `Checkout\Session` + ## 7.83.0 - 2021-06-07 * [#1140](https://github.com/stripe/stripe-php/pull/1140) API Updates * Added support for `tax_id_collection` on `Checkout\Session` and `Checkout\Session#create` @@ -650,6 +883,7 @@ Breaking changes that arose during code generation of the library that we postpo * Add support for `nationality` on `Person` * Add member `gb_vat` of `TaxID` enum + ## 7.69.0 - 2021-01-21 * [#1079](https://github.com/stripe/stripe-php/pull/1079) Update PHPDocs @@ -1971,4 +2205,3 @@ Pull requests included in this release: - Add new Transfer resource - Switch from using HTTP Basic auth to Bearer auth. (Note: Stripe will support Basic auth for the indefinite future, but recommends Bearer auth when possible going forward) - Numerous test suite improvements - diff --git a/lib/Stripe/CODE_OF_CONDUCT.md b/lib/Stripe/CODE_OF_CONDUCT.md deleted file mode 100644 index 349f5a0b..00000000 --- a/lib/Stripe/CODE_OF_CONDUCT.md +++ /dev/null @@ -1,77 +0,0 @@ -# Contributor Covenant Code of Conduct - -## Our Pledge - -In the interest of fostering an open and welcoming environment, we as -contributors and maintainers pledge to make participation in our project and -our community a harassment-free experience for everyone, regardless of age, body -size, disability, ethnicity, sex characteristics, gender identity and expression, -level of experience, education, socio-economic status, nationality, personal -appearance, race, religion, or sexual identity and orientation. - -## Our Standards - -Examples of behavior that contributes to creating a positive environment -include: - -* Using welcoming and inclusive language -* Being respectful of differing viewpoints and experiences -* Gracefully accepting constructive criticism -* Focusing on what is best for the community -* Showing empathy towards other community members - -Examples of unacceptable behavior by participants include: - -* The use of sexualized language or imagery and unwelcome sexual attention or - advances -* Trolling, insulting/derogatory comments, and personal or political attacks -* Public or private harassment -* Publishing others' private information, such as a physical or electronic - address, without explicit permission -* Other conduct which could reasonably be considered inappropriate in a - professional setting - -## Our Responsibilities - -Project maintainers are responsible for clarifying the standards of acceptable -behavior and are expected to take appropriate and fair corrective action in -response to any instances of unacceptable behavior. - -Project maintainers have the right and responsibility to remove, edit, or -reject comments, commits, code, wiki edits, issues, and other contributions -that are not aligned to this Code of Conduct, or to ban temporarily or -permanently any contributor for other behaviors that they deem inappropriate, -threatening, offensive, or harmful. - -## Scope - -This Code of Conduct applies within all project spaces, and it also applies when -an individual is representing the project or its community in public spaces. -Examples of representing a project or community include using an official -project e-mail address, posting via an official social media account, or acting -as an appointed representative at an online or offline event. Representation of -a project may be further defined and clarified by project maintainers. - -## Enforcement - -Instances of abusive, harassing, or otherwise unacceptable behavior may be -reported by contacting the project team at conduct@stripe.com. All -complaints will be reviewed and investigated and will result in a response that -is deemed necessary and appropriate to the circumstances. The project team is -obligated to maintain confidentiality with regard to the reporter of an incident. -Further details of specific enforcement policies may be posted separately. - -Project maintainers who do not follow or enforce the Code of Conduct in good -faith may face temporary or permanent repercussions as determined by other -members of the project's leadership. - -## Attribution - -This Code of Conduct is adapted from the [Contributor Covenant][homepage], version 1.4, -available at https://www.contributor-covenant.org/version/1/4/code-of-conduct.html - -[homepage]: https://www.contributor-covenant.org - -For answers to common questions about this code of conduct, see -https://www.contributor-covenant.org/faq - diff --git a/lib/Stripe/Makefile b/lib/Stripe/Makefile deleted file mode 100644 index 68c1586d..00000000 --- a/lib/Stripe/Makefile +++ /dev/null @@ -1,39 +0,0 @@ -export PHPDOCUMENTOR_VERSION := v3.0.0 - -vendor: composer.json - composer install - -vendor/bin/phpdoc: vendor - curl -sfL https://github.com/phpDocumentor/phpDocumentor/releases/download/$(PHPDOCUMENTOR_VERSION)/phpDocumentor.phar -o vendor/bin/phpdoc - chmod +x vendor/bin/phpdoc - -test: vendor - vendor/bin/phpunit -.PHONY: test - -fmt: vendor - PHP_CS_FIXER_IGNORE_ENV=true vendor/bin/php-cs-fixer fix -v --using-cache=no -.PHONY: fmt - -fmtcheck: vendor - PHP_CS_FIXER_IGNORE_ENV=true vendor/bin/php-cs-fixer fix -v --dry-run --using-cache=no -.PHONY: fmtcheck - -phpdoc: vendor/bin/phpdoc - vendor/bin/phpdoc - -phpstan: vendor - php -d memory_limit=512M vendor/bin/phpstan analyse lib tests -.PHONY: phpstan - -phpstan-baseline: vendor/bin/phpstan - php -d memory_limit=512M vendor/bin/phpstan analyse lib tests --generate-baseline -.PHONY: phpstan-baseline - -update-version: - @echo "$(VERSION)" > VERSION - @perl -pi -e 's|VERSION = '\''[.\-\w\d]+'\''|VERSION = '\''$(VERSION)'\''|' lib/Stripe.php -.PHONY: update-version - -codegen-format: fmt -.PHONY: codegen-format diff --git a/lib/Stripe/OPENAPI_VERSION b/lib/Stripe/OPENAPI_VERSION index 4e134f2a..777bda66 100644 --- a/lib/Stripe/OPENAPI_VERSION +++ b/lib/Stripe/OPENAPI_VERSION @@ -1 +1 @@ -v223 \ No newline at end of file +v654 \ No newline at end of file diff --git a/lib/Stripe/README.md b/lib/Stripe/README.md index 5e703087..a8da1e82 100644 --- a/lib/Stripe/README.md +++ b/lib/Stripe/README.md @@ -27,7 +27,7 @@ composer require stripe/stripe-php To use the bindings, use Composer's [autoload](https://getcomposer.org/doc/01-basic-usage.md#autoloading): ```php -require_once('vendor/autoload.php'); +require_once 'vendor/autoload.php'; ``` ## Manual Installation @@ -35,7 +35,7 @@ require_once('vendor/autoload.php'); If you do not wish to use Composer, you can download the [latest release](https://github.com/stripe/stripe-php/releases). Then, to use the bindings, include the `init.php` file. ```php -require_once('/path/to/stripe-php/init.php'); +require_once '/path/to/stripe-php/init.php'; ``` ## Dependencies @@ -246,7 +246,7 @@ background terminal ([stripe-mock's README][stripe-mock] also contains instructions for installing via Homebrew and other methods): ```bash -go get -u github.com/stripe/stripe-mock +go install github.com/stripe/stripe-mock@latest stripe-mock ``` diff --git a/lib/Stripe/VERSION b/lib/Stripe/VERSION index ac718ef1..ac565bc1 100644 --- a/lib/Stripe/VERSION +++ b/lib/Stripe/VERSION @@ -1 +1 @@ -10.6.0-beta.1 +13.3.0 diff --git a/lib/Stripe/build.php b/lib/Stripe/build.php deleted file mode 100644 index 3fab2d67..00000000 --- a/lib/Stripe/build.php +++ /dev/null @@ -1,25 +0,0 @@ -#!/usr/bin/env php -create and manage Express or - * Custom accounts. + * For Custom accounts, the properties below are always returned. For other accounts, some properties are returned until that + * account has started to go through Connect Onboarding. Once you create an Account Link + * for a Standard or Express account, some parameters are no longer returned. These are marked as Custom Only or Custom and Express + * below. Learn about the differences between accounts. * * @property string $id Unique identifier for the object. * @property string $object String representing the object's type. Objects of the same type share the same value. * @property null|\SimplePay\Vendor\Stripe\StripeObject $business_profile Business information about the account. * @property null|string $business_type The business type. - * @property \SimplePay\Vendor\Stripe\StripeObject $capabilities - * @property bool $charges_enabled Whether the account can create live charges. - * @property \SimplePay\Vendor\Stripe\StripeObject $company - * @property \SimplePay\Vendor\Stripe\StripeObject $controller - * @property string $country The account's country. - * @property int $created Time at which the account was connected. Measured in seconds since the Unix epoch. - * @property string $default_currency Three-letter ISO currency code representing the default currency for the account. This must be a currency that SimplePay\Vendor\Stripe supports in the account's country. - * @property bool $details_submitted Whether account details have been submitted. Standard accounts cannot receive payouts before this is true. - * @property null|string $email An email address associated with the account. You can treat this as metadata: it is not used for authentication or messaging account holders. - * @property \SimplePay\Vendor\Stripe\Collection<\SimplePay\Vendor\Stripe\BankAccount|\SimplePay\Vendor\Stripe\Card> $external_accounts External accounts (bank accounts and debit cards) currently attached to this account - * @property \SimplePay\Vendor\Stripe\StripeObject $future_requirements - * @property \SimplePay\Vendor\Stripe\Person $individual

This is an object representing a person associated with a SimplePay\Vendor\Stripe account.

A platform cannot access a Standard or Express account's persons after the account starts onboarding, such as after generating an account link for the account. See the Standard onboarding or Express onboarding documentation for information about platform pre-filling and account onboarding steps.

Related guide: Handling Identity Verification with the API.

- * @property \SimplePay\Vendor\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 bool $payouts_enabled Whether SimplePay\Vendor\Stripe can send payouts to this account. - * @property \SimplePay\Vendor\Stripe\StripeObject $requirements + * @property null|\SimplePay\Vendor\Stripe\StripeObject $capabilities + * @property null|bool $charges_enabled Whether the account can create live charges. + * @property null|\SimplePay\Vendor\Stripe\StripeObject $company + * @property null|\SimplePay\Vendor\Stripe\StripeObject $controller + * @property null|string $country The account's country. + * @property null|int $created Time at which the account was connected. Measured in seconds since the Unix epoch. + * @property null|string $default_currency Three-letter ISO currency code representing the default currency for the account. This must be a currency that SimplePay\Vendor\Stripe supports in the account's country. + * @property null|bool $details_submitted Whether account details have been submitted. Standard accounts cannot receive payouts before this is true. + * @property null|string $email An email address associated with the account. It's not used for authentication and SimplePay\Vendor\Stripe doesn't market to this field without explicit approval from the platform. + * @property null|\SimplePay\Vendor\Stripe\Collection<\SimplePay\Vendor\Stripe\BankAccount|\SimplePay\Vendor\Stripe\Card> $external_accounts External accounts (bank accounts and debit cards) currently attached to this account + * @property null|\SimplePay\Vendor\Stripe\StripeObject $future_requirements + * @property null|\SimplePay\Vendor\Stripe\Person $individual

This is an object representing a person associated with a SimplePay\Vendor\Stripe account.

A platform cannot access a Standard or Express account's persons after the account starts onboarding, such as after generating an account link for the account. See the Standard onboarding or Express onboarding documentation for information about platform prefilling and account onboarding steps.

Related guide: Handling identity verification with the API

+ * @property null|\SimplePay\Vendor\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|bool $payouts_enabled Whether SimplePay\Vendor\Stripe can send payouts to this account. + * @property null|\SimplePay\Vendor\Stripe\StripeObject $requirements * @property null|\SimplePay\Vendor\Stripe\StripeObject $settings Options for customizing how the account functions within Stripe. - * @property \SimplePay\Vendor\Stripe\StripeObject $tos_acceptance - * @property string $type The SimplePay\Vendor\Stripe account type. Can be standard, express, or custom. + * @property null|\SimplePay\Vendor\Stripe\StripeObject $tos_acceptance + * @property null|string $type The SimplePay\Vendor\Stripe account type. Can be standard, express, or custom. */ class Account extends ApiResource { diff --git a/lib/Stripe/lib/AccountLink.php b/lib/Stripe/lib/AccountLink.php index 0eb92a0e..32b40998 100644 --- a/lib/Stripe/lib/AccountLink.php +++ b/lib/Stripe/lib/AccountLink.php @@ -5,13 +5,10 @@ namespace SimplePay\Vendor\Stripe; /** - * Account Links are the means by which a Connect platform grants a connected - * account permission to access Stripe-hosted applications, such as Connect - * Onboarding. + * Account Links are the means by which a Connect platform grants a connected account permission to access + * Stripe-hosted applications, such as Connect Onboarding. * - * Related guide: Connect - * Onboarding. + * Related guide: Connect Onboarding * * @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. diff --git a/lib/Stripe/lib/AccountSession.php b/lib/Stripe/lib/AccountSession.php index cd866f98..9193678e 100644 --- a/lib/Stripe/lib/AccountSession.php +++ b/lib/Stripe/lib/AccountSession.php @@ -5,20 +5,18 @@ namespace SimplePay\Vendor\Stripe; /** - * An AccountSession allows a Connect platform to grant access to a connected - * account in Connect embedded UIs. + * An AccountSession allows a Connect platform to grant access to a connected account in Connect embedded components. * - * We recommend that you create an AccountSession each time you need to display an - * embedded UI to your user. Do not save AccountSessions to your database as they - * expire relatively quickly, and cannot be used more than once. + * We recommend that you create an AccountSession each time you need to display an embedded component + * to your user. Do not save AccountSessions to your database as they expire relatively + * quickly, and cannot be used more than once. * - * Related guide: Connect - * embedded UIs. + * Related guide: Connect embedded components * * @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 UIs and learn about how client_secret should be handled.

+ * @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 \SimplePay\Vendor\Stripe\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. */ diff --git a/lib/Stripe/lib/ApiOperations/NestedResource.php b/lib/Stripe/lib/ApiOperations/NestedResource.php index 1cb6ea65..8aa3f8c5 100644 --- a/lib/Stripe/lib/ApiOperations/NestedResource.php +++ b/lib/Stripe/lib/ApiOperations/NestedResource.php @@ -10,7 +10,7 @@ trait NestedResource { /** - * @param string $method + * @param 'delete'|'get'|'post' $method * @param string $url * @param null|array $params * @param null|array|string $options diff --git a/lib/Stripe/lib/ApiOperations/Request.php b/lib/Stripe/lib/ApiOperations/Request.php index 793d5aa5..ed165ab2 100644 --- a/lib/Stripe/lib/ApiOperations/Request.php +++ b/lib/Stripe/lib/ApiOperations/Request.php @@ -27,7 +27,7 @@ protected static function _validateParams($params = null) } /** - * @param string $method HTTP method ('get', 'post', etc.) + * @param 'delete'|'get'|'post' $method HTTP method ('get', 'post', etc.) * @param string $url URL for the request * @param array $params list of parameters for the request * @param null|array|string $options @@ -46,7 +46,7 @@ protected function _request($method, $url, $params = [], $options = null) } /** - * @param string $method HTTP method ('get', 'post', etc.) + * @param 'delete'|'get'|'post' $method HTTP method ('get', 'post', etc.) * @param string $url URL for the request * @param callable $readBodyChunk function that will receive chunks of data from a successful request body * @param array $params list of parameters for the request @@ -61,7 +61,7 @@ protected function _requestStream($method, $url, $readBodyChunk, $params = [], $ } /** - * @param string $method HTTP method ('get', 'post', etc.) + * @param 'delete'|'get'|'post' $method HTTP method ('get', 'post', etc.) * @param string $url URL for the request * @param array $params list of parameters for the request * @param null|array|string $options @@ -82,7 +82,7 @@ protected static function _staticRequest($method, $url, $params, $options) } /** - * @param string $method HTTP method ('get', 'post', etc.) + * @param 'delete'|'get'|'post' $method HTTP method ('get', 'post', etc.) * @param string $url URL for the request * @param callable $readBodyChunk function that will receive chunks of data from a successful request body * @param array $params list of parameters for the request diff --git a/lib/Stripe/lib/ApiOperations/SingletonRetrieve.php b/lib/Stripe/lib/ApiOperations/SingletonRetrieve.php index 2481fe77..8e995539 100644 --- a/lib/Stripe/lib/ApiOperations/SingletonRetrieve.php +++ b/lib/Stripe/lib/ApiOperations/SingletonRetrieve.php @@ -11,9 +11,8 @@ trait SingletonRetrieve { /** - * @param array|string $id the ID of the API resource to retrieve, + * @param null|array|string $opts the ID of the API resource to retrieve, * or an options array containing an `id` key - * @param null|array|string $opts * * @throws \SimplePay\Vendor\Stripe\Exception\ApiErrorException if the request fails * diff --git a/lib/Stripe/lib/ApiRequestor.php b/lib/Stripe/lib/ApiRequestor.php index dd2e54ea..b58f9caf 100644 --- a/lib/Stripe/lib/ApiRequestor.php +++ b/lib/Stripe/lib/ApiRequestor.php @@ -106,7 +106,7 @@ private static function _encodeObjects($d) } /** - * @param string $method + * @param 'delete'|'get'|'post' $method * @param string $url * @param null|array $params * @param null|array $headers @@ -128,7 +128,7 @@ public function request($method, $url, $params = null, $headers = null) } /** - * @param string $method + * @param 'delete'|'get'|'post' $method * @param string $url * @param callable $readBodyChunkCallable * @param null|array $params @@ -325,7 +325,7 @@ private static function _defaultHeaders($apiKey, $clientInfo = null) $uaString = 'Stripe/v1 PhpBindings/' . Stripe::VERSION; $langVersion = \PHP_VERSION; - $uname_disabled = static::_isDisabled(\ini_get('disable_functions'), 'php_uname'); + $uname_disabled = self::_isDisabled(\ini_get('disable_functions'), 'php_uname'); $uname = $uname_disabled ? '(disabled)' : \php_uname(); $appInfo = Stripe::getAppInfo(); @@ -348,6 +348,7 @@ private static function _defaultHeaders($apiKey, $clientInfo = null) 'X-Stripe-Client-User-Agent' => \json_encode($ua), 'User-Agent' => $uaString, 'Authorization' => 'Bearer ' . $apiKey, + 'Stripe-Version' => Stripe::getApiVersion(), ]; } @@ -377,7 +378,7 @@ private function _prepareRequest($method, $url, $params, $headers) if ($params && \is_array($params)) { $optionKeysInParams = \array_filter( - static::$OPTIONS_KEYS, + self::$OPTIONS_KEYS, function ($key) use ($params) { return \array_key_exists($key, $params); } @@ -393,9 +394,6 @@ function ($key) use ($params) { $absUrl = $this->_apiBase . $url; $params = self::_encodeObjects($params); $defaultHeaders = $this->_defaultHeaders($myApiKey, $clientUAInfo); - if (Stripe::$apiVersion) { - $defaultHeaders['Stripe-Version'] = Stripe::$apiVersion; - } if (Stripe::$accountId) { $defaultHeaders['Stripe-Account'] = Stripe::$accountId; @@ -432,7 +430,7 @@ function ($key) use ($params) { } /** - * @param string $method + * @param 'delete'|'get'|'post' $method * @param string $url * @param array $params * @param array $headers @@ -469,7 +467,7 @@ private function _requestRaw($method, $url, $params, $headers) } /** - * @param string $method + * @param 'delete'|'get'|'post' $method * @param string $url * @param array $params * @param array $headers diff --git a/lib/Stripe/lib/ApiResource.php b/lib/Stripe/lib/ApiResource.php index cfbcca4a..01624106 100644 --- a/lib/Stripe/lib/ApiResource.php +++ b/lib/Stripe/lib/ApiResource.php @@ -4,7 +4,8 @@ /** * Class ApiResource. - */ + * + * */ abstract class ApiResource extends StripeObject { use ApiOperations\Request; diff --git a/lib/Stripe/lib/ApplicationFee.php b/lib/Stripe/lib/ApplicationFee.php index 5e45ed3d..692fa5c9 100644 --- a/lib/Stripe/lib/ApplicationFee.php +++ b/lib/Stripe/lib/ApplicationFee.php @@ -8,8 +8,8 @@ * @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|\SimplePay\Vendor\Stripe\Account $account ID of the SimplePay\Vendor\Stripe account this fee was taken from. - * @property int $amount Amount earned, in %s. - * @property int $amount_refunded Amount in %s refunded (can be less than the amount attribute on the fee if a partial refund was issued) + * @property int $amount Amount earned, in cents (or local equivalent). + * @property int $amount_refunded Amount in cents (or local equivalent) refunded (can be less than the amount attribute on the fee if a partial refund was issued) * @property string|\SimplePay\Vendor\Stripe\StripeObject $application ID of the Connect application that earned the fee. * @property null|string|\SimplePay\Vendor\Stripe\BalanceTransaction $balance_transaction Balance transaction that describes the impact of this collected application fee on your account balance (not including refunds). * @property string|\SimplePay\Vendor\Stripe\Charge $charge ID of the charge that the application fee was taken from. @@ -18,7 +18,7 @@ * @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|string|\SimplePay\Vendor\Stripe\Charge $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 \SimplePay\Vendor\Stripe\Collection<\SimplePay\Vendor\Stripe\StripeObject> $refunds A list of refunds that have been applied to the fee. + * @property \SimplePay\Vendor\Stripe\Collection<\SimplePay\Vendor\Stripe\ApplicationFeeRefund> $refunds A list of refunds that have been applied to the fee. */ class ApplicationFee extends ApiResource { @@ -31,13 +31,13 @@ class ApplicationFee extends ApiResource const PATH_REFUNDS = '/refunds'; /** - * @param string $id the ID of the application fee on which to retrieve the fee refunds + * @param string $id the ID of the application fee on which to retrieve the application fee refunds * @param null|array $params * @param null|array|string $opts * * @throws \SimplePay\Vendor\Stripe\Exception\ApiErrorException if the request fails * - * @return \SimplePay\Vendor\Stripe\Collection<\SimplePay\Vendor\Stripe\ApplicationFeeRefund> the list of fee refunds + * @return \SimplePay\Vendor\Stripe\Collection<\SimplePay\Vendor\Stripe\ApplicationFeeRefund> the list of application fee refunds */ public static function allRefunds($id, $params = null, $opts = null) { @@ -45,7 +45,7 @@ public static function allRefunds($id, $params = null, $opts = null) } /** - * @param string $id the ID of the application fee on which to create the fee refund + * @param string $id the ID of the application fee on which to create the application fee refund * @param null|array $params * @param null|array|string $opts * @@ -59,8 +59,8 @@ public static function createRefund($id, $params = null, $opts = null) } /** - * @param string $id the ID of the application fee to which the fee refund belongs - * @param string $refundId the ID of the fee refund to retrieve + * @param string $id the ID of the application fee to which the application fee refund belongs + * @param string $refundId the ID of the application fee refund to retrieve * @param null|array $params * @param null|array|string $opts * @@ -74,8 +74,8 @@ public static function retrieveRefund($id, $refundId, $params = null, $opts = nu } /** - * @param string $id the ID of the application fee to which the fee refund belongs - * @param string $refundId the ID of the fee refund to update + * @param string $id the ID of the application fee to which the application fee refund belongs + * @param string $refundId the ID of the application fee refund to update * @param null|array $params * @param null|array|string $opts * diff --git a/lib/Stripe/lib/ApplicationFeeRefund.php b/lib/Stripe/lib/ApplicationFeeRefund.php index 9853c087..c4f97d57 100644 --- a/lib/Stripe/lib/ApplicationFeeRefund.php +++ b/lib/Stripe/lib/ApplicationFeeRefund.php @@ -5,17 +5,15 @@ namespace SimplePay\Vendor\Stripe; /** - * Application Fee Refund objects allow you to refund an application - * fee that has previously been created but not yet refunded. Funds will be - * refunded to the SimplePay\Vendor\Stripe account from which the fee was originally collected. + * Application Fee Refund objects allow you to refund an application fee that + * has previously been created but not yet refunded. Funds will be refunded to + * the SimplePay\Vendor\Stripe account from which the fee was originally collected. * - * Related guide: Refunding - * Application Fees. + * Related guide: Refunding application fees * * @property string $id Unique identifier for the object. * @property string $object String representing the object's type. Objects of the same type share the same value. - * @property int $amount Amount, in %s. + * @property int $amount Amount, in cents (or local equivalent). * @property null|string|\SimplePay\Vendor\Stripe\BalanceTransaction $balance_transaction Balance transaction that describes the impact on your account balance. * @property int $created Time at which the object was created. Measured in seconds since the Unix epoch. * @property string $currency Three-letter ISO currency code, in lowercase. Must be a supported currency. diff --git a/lib/Stripe/lib/Apps/Secret.php b/lib/Stripe/lib/Apps/Secret.php index 4892deb0..2936a09c 100644 --- a/lib/Stripe/lib/Apps/Secret.php +++ b/lib/Stripe/lib/Apps/Secret.php @@ -5,29 +5,20 @@ namespace SimplePay\Vendor\Stripe\Apps; /** - * Secret Store is an API that allows SimplePay\Vendor\Stripe Apps developers to securely persist - * secrets for use by UI Extensions and app backends. + * Secret Store is an API that allows SimplePay\Vendor\Stripe Apps developers to securely persist secrets for use by UI Extensions and app backends. * - * The primary resource in Secret Store is a secret. Other apps can't - * view secrets created by an app. Additionally, secrets are scoped to provide - * further permission control. + * The primary resource in Secret Store is a secret. Other apps can't view secrets created by an app. Additionally, secrets are scoped to provide further permission control. * - * All Dashboard users and the app backend share account scoped - * secrets. Use the account scope for secrets that don't change - * per-user, like a third-party API key. + * All Dashboard users and the app backend share account scoped secrets. Use the account scope for secrets that don't change per-user, like a third-party API key. * - * A user scoped secret is accessible by the app backend and one - * specific Dashboard user. Use the user scope for per-user secrets - * like per-user OAuth tokens, where different users might have different - * permissions. + * A user scoped secret is accessible by the app backend and one specific Dashboard user. Use the user scope for per-user secrets like per-user OAuth tokens, where different users might have different permissions. * - * Related guide: Store - * data between page reloads. + * Related guide: Store data between page reloads * * @property string $id Unique identifier for the object. * @property string $object String representing the object's type. Objects of the same type share the same value. * @property int $created Time at which the object was created. Measured in seconds since the Unix epoch. + * @property null|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 string $name A name for the secret that's unique within the scope. diff --git a/lib/Stripe/lib/Balance.php b/lib/Stripe/lib/Balance.php index e356fbbd..39de27d8 100644 --- a/lib/Stripe/lib/Balance.php +++ b/lib/Stripe/lib/Balance.php @@ -8,24 +8,22 @@ * This is an object representing your SimplePay\Vendor\Stripe balance. You can retrieve it to see * the balance currently on your SimplePay\Vendor\Stripe account. * - * You can also retrieve the balance history, which contains a list of transactions - * that contributed to the balance (charges, payouts, and so forth). + * You can also retrieve the balance history, which contains a list of + * transactions that contributed to the balance + * (charges, payouts, and so forth). * * The available and pending amounts for each currency are broken down further by * payment source types. * - * Related guide: Understanding Connect - * Account Balances. + * Related guide: Understanding Connect account balances * * @property string $object String representing the object's type. Objects of the same type share the same value. - * @property \SimplePay\Vendor\Stripe\StripeObject[] $available Funds that are available to be transferred or paid out, whether automatically by SimplePay\Vendor\Stripe or explicitly via the Transfers API or Payouts API. The available balance for each currency and payment type can be found in the source_types property. - * @property \SimplePay\Vendor\Stripe\StripeObject[] $connect_reserved Funds held due to negative balances on connected Custom accounts. The connect reserve balance for each currency and payment type can be found in the source_types property. - * @property \SimplePay\Vendor\Stripe\StripeObject[] $instant_available Funds that can be paid out using Instant Payouts. - * @property \SimplePay\Vendor\Stripe\StripeObject $issuing + * @property \SimplePay\Vendor\Stripe\StripeObject[] $available Available funds that you can transfer or pay out automatically by SimplePay\Vendor\Stripe or explicitly through the Transfers API or Payouts API. You can find the available balance for each currency and payment type in the source_types property. + * @property null|\SimplePay\Vendor\Stripe\StripeObject[] $connect_reserved Funds held due to negative balances on connected Custom accounts. You can find the connect reserve balance for each currency and payment type in the source_types property. + * @property null|\SimplePay\Vendor\Stripe\StripeObject[] $instant_available Funds that you can pay out using Instant Payouts. + * @property null|\SimplePay\Vendor\Stripe\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 \SimplePay\Vendor\Stripe\StripeObject[] $pending Funds that are not yet available in the balance, due to the 7-day rolling pay cycle. The pending balance for each currency, and for each payment type, can be found in the source_types property. + * @property \SimplePay\Vendor\Stripe\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. */ class Balance extends SingletonApiResource { diff --git a/lib/Stripe/lib/BalanceTransaction.php b/lib/Stripe/lib/BalanceTransaction.php index c8b5d391..d4075818 100644 --- a/lib/Stripe/lib/BalanceTransaction.php +++ b/lib/Stripe/lib/BalanceTransaction.php @@ -5,29 +5,26 @@ namespace SimplePay\Vendor\Stripe; /** - * Balance transactions represent funds moving through your SimplePay\Vendor\Stripe account. They're - * created for every type of transaction that comes into or flows out of your - * SimplePay\Vendor\Stripe account balance. + * Balance transactions represent funds moving through your SimplePay\Vendor\Stripe account. + * SimplePay\Vendor\Stripe creates them for every type of transaction that enters or leaves your SimplePay\Vendor\Stripe account balance. * - * Related guide: Balance - * Transaction Types. + * Related guide: Balance transaction types * * @property string $id Unique identifier for the object. * @property string $object String representing the object's type. Objects of the same type share the same value. - * @property int $amount Gross amount of the transaction, in %s. - * @property int $available_on The date the transaction's net funds will become available in the SimplePay\Vendor\Stripe balance. + * @property int $amount Gross amount of this transaction (in cents (or local equivalent)). A positive value represents funds charged to another party, and a negative value represents funds sent to another party. + * @property int $available_on The date that the transaction's net funds become available in the SimplePay\Vendor\Stripe balance. * @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. Often useful for displaying to users. - * @property null|float $exchange_rate The exchange rate used, if applicable, for this transaction. Specifically, if money was converted from currency A to currency B, then the amount in currency A, times exchange_rate, would be the amount in currency B. For example, suppose you charged a customer 10.00 EUR. Then the PaymentIntent's amount would be 1000 and currency would be eur. Suppose this was converted into 12.34 USD in your SimplePay\Vendor\Stripe account. Then the BalanceTransaction's amount would be 1234, currency would be usd, and exchange_rate would be 1.234. - * @property int $fee Fees (in %s) paid for this transaction. - * @property \SimplePay\Vendor\Stripe\StripeObject[] $fee_details Detailed breakdown of fees (in %s) paid for this transaction. - * @property int $net Net amount of the transaction, in %s. - * @property string $reporting_category Learn more about how reporting categories can help you understand balance transactions from an accounting perspective. - * @property null|string|\SimplePay\Vendor\Stripe\StripeObject $source The SimplePay\Vendor\Stripe object to which this transaction is related. - * @property string $status If the transaction's net funds are available in the SimplePay\Vendor\Stripe balance yet. Either available or pending. - * @property string $type Transaction type: adjustment, advance, advance_funding, anticipation_repayment, application_fee, application_fee_refund, charge, connect_collection_transfer, contribution, issuing_authorization_hold, issuing_authorization_release, issuing_dispute, issuing_transaction, payment, payment_failure_refund, payment_refund, payout, payout_cancel, payout_failure, refund, refund_failure, reserve_transaction, reserved_funds, stripe_fee, stripe_fx_fee, tax_fee, topup, topup_reversal, transfer, transfer_cancel, transfer_failure, or transfer_refund. Learn more about balance transaction types and what they represent. If you are looking to classify transactions for accounting purposes, you might want to consider reporting_category instead. + * @property null|float $exchange_rate If applicable, this transaction uses an exchange rate. If money converts from currency A to currency B, then the amount in currency A, multipled by the exchange_rate, equals the amount in currency B. For example, if you charge a customer 10.00 EUR, the PaymentIntent's amount is 1000 and currency is eur. If this converts to 12.34 USD in your SimplePay\Vendor\Stripe account, the BalanceTransaction's amount is 1234, its currency is usd, and the exchange_rate is 1.234. + * @property int $fee Fees (in cents (or local equivalent)) paid for this transaction. Represented as a positive integer when assessed. + * @property \SimplePay\Vendor\Stripe\StripeObject[] $fee_details Detailed breakdown of fees (in cents (or local equivalent)) paid for this transaction. + * @property int $net Net impact to a SimplePay\Vendor\Stripe balance (in cents (or local equivalent)). A positive value represents incrementing a SimplePay\Vendor\Stripe balance, and a negative value decrementing a SimplePay\Vendor\Stripe balance. You can calculate the net impact of a transaction on a balance by amount - fee + * @property string $reporting_category Learn more about how reporting categories can help you understand balance transactions from an accounting perspective. + * @property null|string|\SimplePay\Vendor\Stripe\ApplicationFee|\SimplePay\Vendor\Stripe\ApplicationFeeRefund|\SimplePay\Vendor\Stripe\Charge|\SimplePay\Vendor\Stripe\CustomerCashBalanceTransaction|\SimplePay\Vendor\Stripe\Dispute|\SimplePay\Vendor\Stripe\Issuing\Authorization|\SimplePay\Vendor\Stripe\Issuing\Dispute|\SimplePay\Vendor\Stripe\Issuing\Transaction|\SimplePay\Vendor\Stripe\Payout|\SimplePay\Vendor\Stripe\Refund|\SimplePay\Vendor\Stripe\StripeObject|\SimplePay\Vendor\Stripe\Topup|\SimplePay\Vendor\Stripe\Transfer|\SimplePay\Vendor\Stripe\TransferReversal $source This transaction relates to the SimplePay\Vendor\Stripe object. + * @property string $status The transaction's net funds status in the SimplePay\Vendor\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, connect_collection_transfer, contribution, issuing_authorization_hold, issuing_authorization_release, issuing_dispute, issuing_transaction, obligation_inbound, obligation_outbound, obligation_reversal_inbound, obligation_reversal_outbound, obligation_payout, obligation_payout_failure, payment, payment_failure_refund, payment_refund, payment_reversal, payment_unreconciled, payout, payout_cancel, payout_failure, refund, refund_failure, reserve_transaction, reserved_funds, stripe_fee, stripe_fx_fee, 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. */ class BalanceTransaction extends ApiResource { @@ -49,16 +46,24 @@ class BalanceTransaction extends ApiResource const TYPE_ISSUING_AUTHORIZATION_RELEASE = 'issuing_authorization_release'; const TYPE_ISSUING_DISPUTE = 'issuing_dispute'; const TYPE_ISSUING_TRANSACTION = 'issuing_transaction'; + const TYPE_OBLIGATION_INBOUND = 'obligation_inbound'; + const TYPE_OBLIGATION_OUTBOUND = 'obligation_outbound'; + const TYPE_OBLIGATION_PAYOUT = 'obligation_payout'; + const TYPE_OBLIGATION_PAYOUT_FAILURE = 'obligation_payout_failure'; + const TYPE_OBLIGATION_REVERSAL_INBOUND = 'obligation_reversal_inbound'; + const TYPE_OBLIGATION_REVERSAL_OUTBOUND = 'obligation_reversal_outbound'; const TYPE_PAYMENT = 'payment'; const TYPE_PAYMENT_FAILURE_REFUND = 'payment_failure_refund'; const TYPE_PAYMENT_REFUND = 'payment_refund'; + const TYPE_PAYMENT_REVERSAL = 'payment_reversal'; + const TYPE_PAYMENT_UNRECONCILED = 'payment_unreconciled'; const TYPE_PAYOUT = 'payout'; const TYPE_PAYOUT_CANCEL = 'payout_cancel'; const TYPE_PAYOUT_FAILURE = 'payout_failure'; const TYPE_REFUND = 'refund'; const TYPE_REFUND_FAILURE = 'refund_failure'; - const TYPE_RESERVE_TRANSACTION = 'reserve_transaction'; const TYPE_RESERVED_FUNDS = 'reserved_funds'; + const TYPE_RESERVE_TRANSACTION = 'reserve_transaction'; const TYPE_STRIPE_FEE = 'stripe_fee'; const TYPE_STRIPE_FX_FEE = 'stripe_fx_fee'; const TYPE_TAX_FEE = 'tax_fee'; diff --git a/lib/Stripe/lib/BankAccount.php b/lib/Stripe/lib/BankAccount.php index 581de746..cc03937c 100644 --- a/lib/Stripe/lib/BankAccount.php +++ b/lib/Stripe/lib/BankAccount.php @@ -7,16 +7,11 @@ /** * These bank accounts are payment methods on Customer objects. * - * On the other hand External Accounts are - * transfer destinations on Account objects for Custom accounts. They - * can be bank accounts or debit cards as well, and are documented in the links - * above. + * On the other hand External Accounts are transfer + * destinations on Account objects for Custom accounts. + * They can be bank accounts or debit cards as well, and are documented in the links above. * - * Related guide: Bank Debits and - * Transfers. + * Related guide: Bank debits and transfers * * @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. @@ -31,10 +26,12 @@ * @property null|string|\SimplePay\Vendor\Stripe\Customer $customer The ID of the customer that the bank account is associated with. * @property null|bool $default_for_currency Whether this bank account is the default external account for its currency. * @property null|string $fingerprint Uniquely identifies this particular bank account. You can use this attribute to check whether two bank accounts are the same. + * @property null|\SimplePay\Vendor\Stripe\StripeObject $future_requirements Information about the upcoming new requirements for the bank account, including what information needs to be collected, and by when. * @property string $last4 The last four digits of the bank account number. * @property null|\SimplePay\Vendor\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|\SimplePay\Vendor\Stripe\StripeObject $requirements Information about the requirements for the bank account, including what information needs to be collected. * @property null|string $routing_number The routing transit number for the bank account. - * @property string $status

For bank accounts, possible values are new, validated, verified, verification_failed, or errored. A bank account that hasn't had any activity or validation performed is new. If SimplePay\Vendor\Stripe can determine that the bank account exists, its status will be validated. Note that there often isn’t enough information to know (e.g., for smaller credit unions), and the validation is not always run. If customer bank account verification has succeeded, the bank account status will be verified. If the verification failed for any reason, such as microdeposit failure, the status will be verification_failed. If a transfer sent to this bank account fails, we'll set the status to errored and will not continue to send transfers until the bank details are updated.

For external accounts, possible values are new and errored. Validations aren't run against external accounts because they're only used for payouts. This means the other statuses don't apply. If a transfer fails, the status is set to errored and transfers are stopped until account details are updated.

+ * @property string $status

For bank accounts, possible values are new, validated, verified, verification_failed, or errored. A bank account that hasn't had any activity or validation performed is new. If SimplePay\Vendor\Stripe can determine that the bank account exists, its status will be validated. Note that there often isn’t enough information to know (e.g., for smaller credit unions), and the validation is not always run. If customer bank account verification has succeeded, the bank account status will be verified. If the verification failed for any reason, such as microdeposit failure, the status will be verification_failed. If a payout sent to this bank account fails, we'll set the status to errored and will not continue to send scheduled payouts until the bank details are updated.

For external accounts, possible values are new, errored and verification_failed. If a payouts fails, the status is set to errored and scheduled payouts are stopped until account details are updated. In India, if we can't verify the owner of the bank account, we'll set the status to verification_failed. Other validations aren't run against external accounts because they're only used for payouts. This means the other statuses don't apply.

*/ class BankAccount extends ApiResource { diff --git a/lib/Stripe/lib/BaseStripeClient.php b/lib/Stripe/lib/BaseStripeClient.php index 5ef77ab0..40455b3e 100644 --- a/lib/Stripe/lib/BaseStripeClient.php +++ b/lib/Stripe/lib/BaseStripeClient.php @@ -13,6 +13,17 @@ class BaseStripeClient implements StripeClientInterface, StripeStreamingClientIn /** @var string default base URL for Stripe's Files API */ const DEFAULT_FILES_BASE = 'https://files.stripe.com'; + /** @var array */ + const DEFAULT_CONFIG = [ + 'api_key' => null, + 'client_id' => null, + 'stripe_account' => null, + 'stripe_version' => \SimplePay\Vendor\Stripe\Util\ApiVersion::CURRENT, + 'api_base' => self::DEFAULT_API_BASE, + 'connect_base' => self::DEFAULT_CONNECT_BASE, + 'files_base' => self::DEFAULT_FILES_BASE, + ]; + /** @var array */ private $config; @@ -55,7 +66,7 @@ public function __construct($config = []) throw new \SimplePay\Vendor\Stripe\Exception\InvalidArgumentException('$config must be a string or an array'); } - $config = \array_merge($this->getDefaultConfig(), $config); + $config = \array_merge(self::DEFAULT_CONFIG, $config); $this->validateConfig($config); $this->config = $config; @@ -119,7 +130,7 @@ public function getFilesBase() /** * Sends a request to Stripe's API. * - * @param string $method the HTTP method + * @param 'delete'|'get'|'post' $method the HTTP method * @param string $path the path of the request * @param array $params the parameters of the request * @param array|\SimplePay\Vendor\Stripe\Util\RequestOptions $opts the special modifiers of the request @@ -143,7 +154,7 @@ public function request($method, $path, $params, $opts) * Sends a request to Stripe's API, passing chunks of the streamed response * into a user-provided $readBodyChunkCallable callback. * - * @param string $method the HTTP method + * @param 'delete'|'get'|'post' $method the HTTP method * @param string $path the path of the request * @param callable $readBodyChunkCallable a function that will be called * @param array $params the parameters of the request @@ -161,7 +172,7 @@ public function requestStream($method, $path, $readBodyChunkCallable, $params, $ /** * Sends a request to Stripe's API. * - * @param string $method the HTTP method + * @param 'delete'|'get'|'post' $method the HTTP method * @param string $path the path of the request * @param array $params the parameters of the request * @param array|\SimplePay\Vendor\Stripe\Util\RequestOptions $opts the special modifiers of the request @@ -185,7 +196,7 @@ public function requestCollection($method, $path, $params, $opts) /** * Sends a request to Stripe's API. * - * @param string $method the HTTP method + * @param 'delete'|'get'|'post' $method the HTTP method * @param string $path the path of the request * @param array $params the parameters of the request * @param array|\SimplePay\Vendor\Stripe\Util\RequestOptions $opts the special modifiers of the request @@ -228,24 +239,6 @@ private function apiKeyForRequest($opts) return $apiKey; } - /** - * TODO: replace this with a private constant when we drop support for PHP < 5. - * - * @return array - */ - private function getDefaultConfig() - { - return [ - 'api_key' => null, - 'client_id' => null, - 'stripe_account' => null, - 'stripe_version' => null, - 'api_base' => self::DEFAULT_API_BASE, - 'connect_base' => self::DEFAULT_CONNECT_BASE, - 'files_base' => self::DEFAULT_FILES_BASE, - ]; - } - /** * @param array $config * @@ -301,7 +294,7 @@ private function validateConfig($config) } // check absence of extra keys - $extraConfigKeys = \array_diff(\array_keys($config), \array_keys($this->getDefaultConfig())); + $extraConfigKeys = \array_diff(\array_keys($config), \array_keys(self::DEFAULT_CONFIG)); if (!empty($extraConfigKeys)) { // Wrap in single quote to more easily catch trailing spaces errors $invalidKeys = "'" . \implode("', '", $extraConfigKeys) . "'"; diff --git a/lib/Stripe/lib/BillingPortal/Configuration.php b/lib/Stripe/lib/BillingPortal/Configuration.php index 7be1327a..6460ffcc 100644 --- a/lib/Stripe/lib/BillingPortal/Configuration.php +++ b/lib/Stripe/lib/BillingPortal/Configuration.php @@ -5,8 +5,7 @@ namespace SimplePay\Vendor\Stripe\BillingPortal; /** - * A portal configuration describes the functionality and behavior of a portal - * session. + * A portal configuration describes the functionality and behavior of a portal session. * * @property string $id Unique identifier for the object. * @property string $object String representing the object's type. Objects of the same type share the same value. diff --git a/lib/Stripe/lib/BillingPortal/Session.php b/lib/Stripe/lib/BillingPortal/Session.php index bb089a76..47826f78 100644 --- a/lib/Stripe/lib/BillingPortal/Session.php +++ b/lib/Stripe/lib/BillingPortal/Session.php @@ -5,32 +5,30 @@ namespace SimplePay\Vendor\Stripe\BillingPortal; /** - * The Billing customer portal is a Stripe-hosted UI for subscription and billing - * management. + * The Billing customer portal is a Stripe-hosted UI for subscription and + * billing management. * - * A portal configuration describes the functionality and features that you want to - * provide to your customers through the portal. + * A portal configuration describes the functionality and features that you + * want to provide to your customers through the portal. * - * A portal session describes the instantiation of the customer portal for a - * particular customer. By visiting the session's URL, the customer can manage - * their subscriptions and billing details. For security reasons, sessions are - * short-lived and will expire if the customer does not visit the URL. Create - * sessions on-demand when customers intend to manage their subscriptions and - * billing details. + * A portal session describes the instantiation of the customer portal for + * a particular customer. By visiting the session's URL, the customer + * can manage their subscriptions and billing details. For security reasons, + * sessions are short-lived and will expire if the customer does not visit the URL. + * Create sessions on-demand when customers intend to manage their subscriptions + * and billing details. * - * Learn more in the integration - * guide. + * Learn more in the integration guide. * * @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|\SimplePay\Vendor\Stripe\BillingPortal\Configuration $configuration The configuration used by this session, describing the features available. * @property int $created Time at which the object was created. Measured in seconds since the Unix epoch. * @property string $customer The ID of the customer for this session. - * @property null|\SimplePay\Vendor\Stripe\StripeObject $flow Information about a specific flow for the customer to go through. + * @property null|\SimplePay\Vendor\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 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 $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. * @property string $url The short-lived URL of the session that gives customers access to the customer portal. */ diff --git a/lib/Stripe/lib/Capability.php b/lib/Stripe/lib/Capability.php index e95c2c8c..6cc32058 100644 --- a/lib/Stripe/lib/Capability.php +++ b/lib/Stripe/lib/Capability.php @@ -7,17 +7,15 @@ /** * This is an object representing a capability for a SimplePay\Vendor\Stripe account. * - * Related guide: Account - * capabilities. + * Related guide: Account capabilities * * @property string $id The identifier for the capability. * @property string $object String representing the object's type. Objects of the same type share the same value. * @property string|\SimplePay\Vendor\Stripe\Account $account The account for which the capability enables functionality. - * @property \SimplePay\Vendor\Stripe\StripeObject $future_requirements + * @property null|\SimplePay\Vendor\Stripe\StripeObject $future_requirements * @property bool $requested Whether the capability has been requested. * @property null|int $requested_at Time at which the capability was requested. Measured in seconds since the Unix epoch. - * @property \SimplePay\Vendor\Stripe\StripeObject $requirements + * @property null|\SimplePay\Vendor\Stripe\StripeObject $requirements * @property string $status The status of the capability. Can be active, inactive, pending, or unrequested. */ class Capability extends ApiResource diff --git a/lib/Stripe/lib/Capital/FinancingOffer.php b/lib/Stripe/lib/Capital/FinancingOffer.php deleted file mode 100644 index 4824eb25..00000000 --- a/lib/Stripe/lib/Capital/FinancingOffer.php +++ /dev/null @@ -1,70 +0,0 @@ -true if the object exists in live mode or the value false if the object exists in test mode. - * @property \SimplePay\Vendor\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 \SimplePay\Vendor\Stripe\StripeObject $offered_terms This is an object representing the terms of an offer of financing from SimplePay\Vendor\Stripe Capital to a Connected account. This resource represents both the terms offered to the Connected account. - * @property string $product_type Financing product identifier. - * @property string $replacement The ID of the financing offer that replaced this offer. - * @property string $replacement_for The ID of the financing offer that this offer is a replacement for. - * @property string $status The current status of the offer. - * @property string $type See financing_type. - */ -class FinancingOffer extends \SimplePay\Vendor\Stripe\ApiResource -{ - const OBJECT_NAME = 'capital.financing_offer'; - - use \SimplePay\Vendor\Stripe\ApiOperations\All; - use \SimplePay\Vendor\Stripe\ApiOperations\Retrieve; - - const FINANCING_TYPE_CASH_ADVANCE = 'cash_advance'; - const FINANCING_TYPE_FLEX_LOAN = 'flex_loan'; - - const PRODUCT_TYPE_REFILL = 'refill'; - const PRODUCT_TYPE_STANDARD = 'standard'; - - const STATUS_ACCEPTED = 'accepted'; - const STATUS_CANCELED = 'canceled'; - const STATUS_COMPLETED = 'completed'; - const STATUS_DELIVERED = 'delivered'; - const STATUS_EXPIRED = 'expired'; - const STATUS_FULLY_REPAID = 'fully_repaid'; - const STATUS_PAID_OUT = 'paid_out'; - const STATUS_REJECTED = 'rejected'; - const STATUS_REPLACED = 'replaced'; - const STATUS_UNDELIVERED = 'undelivered'; - - const TYPE_CASH_ADVANCE = 'cash_advance'; - const TYPE_FLEX_LOAN = 'flex_loan'; - - /** - * @param null|array $params - * @param null|array|string $opts - * - * @throws \SimplePay\Vendor\Stripe\Exception\ApiErrorException if the request fails - * - * @return \SimplePay\Vendor\Stripe\Capital\FinancingOffer the marked financing offer - */ - public function markDelivered($params = null, $opts = null) - { - $url = $this->instanceUrl() . '/mark_delivered'; - list($response, $opts) = $this->_request('post', $url, $params, $opts); - $this->refreshFrom($response, $opts); - - return $this; - } -} diff --git a/lib/Stripe/lib/Capital/FinancingSummary.php b/lib/Stripe/lib/Capital/FinancingSummary.php deleted file mode 100644 index 4d2819b8..00000000 --- a/lib/Stripe/lib/Capital/FinancingSummary.php +++ /dev/null @@ -1,25 +0,0 @@ -/v1/capital/financing_summary will only return details for paid_out financing. - */ -class FinancingSummary extends \SimplePay\Vendor\Stripe\SingletonApiResource -{ - const OBJECT_NAME = 'capital.financing_summary'; - - use \SimplePay\Vendor\Stripe\ApiOperations\SingletonRetrieve; - - const STATUS_ACCEPTED = 'accepted'; - const STATUS_DELIVERED = 'delivered'; - const STATUS_NONE = 'none'; -} diff --git a/lib/Stripe/lib/Capital/FinancingTransaction.php b/lib/Stripe/lib/Capital/FinancingTransaction.php deleted file mode 100644 index 631f1e99..00000000 --- a/lib/Stripe/lib/Capital/FinancingTransaction.php +++ /dev/null @@ -1,32 +0,0 @@ -true if the object exists in live mode or the value false if the object exists in test mode. - * @property string $type The type of the financing transaction. - * @property null|string $user_facing_description A human-friendly description of the financing transaction. - */ -class FinancingTransaction extends \SimplePay\Vendor\Stripe\ApiResource -{ - const OBJECT_NAME = 'capital.financing_transaction'; - - use \SimplePay\Vendor\Stripe\ApiOperations\All; - use \SimplePay\Vendor\Stripe\ApiOperations\Retrieve; - - const TYPE_PAYMENT = 'payment'; - const TYPE_PAYOUT = 'payout'; - const TYPE_REVERSAL = 'reversal'; -} diff --git a/lib/Stripe/lib/Card.php b/lib/Stripe/lib/Card.php index 11bdacd6..115c6526 100644 --- a/lib/Stripe/lib/Card.php +++ b/lib/Stripe/lib/Card.php @@ -9,8 +9,7 @@ * 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. + * Related guide: Card payments with Sources * * @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. @@ -24,7 +23,7 @@ * @property null|string $address_zip ZIP or postal code. * @property null|string $address_zip_check If address_zip was provided, results of the check: pass, fail, unavailable, or unchecked. * @property null|string[] $available_payout_methods A set of available payout methods for this card. Only values from this set should be passed as the method when creating a payout. - * @property string $brand Card brand. Can be American Express, Diners Club, Discover, JCB, MasterCard, UnionPay, Visa, or Unknown. + * @property string $brand Card brand. Can be American Express, Diners Club, Discover, Eftpos Australia, JCB, MasterCard, UnionPay, Visa, or Unknown. * @property null|string $country Two-letter ISO code representing the country of the card. You could use this attribute to get a sense of the international breakdown of cards you've collected. * @property null|string $currency Three-letter ISO code for currency. Only applicable on accounts (not customers or recipients). The card can be used as a transfer destination for funds in this currency. * @property null|string|\SimplePay\Vendor\Stripe\Customer $customer The customer that this card belongs to. This attribute will not be in the card object if the card belongs to an account or recipient instead. @@ -33,12 +32,12 @@ * @property null|string $dynamic_last4 (For tokenized numbers only.) The last four digits of the device account number. * @property int $exp_month Two-digit number representing the card's expiration month. * @property int $exp_year Four-digit number representing the card's expiration year. - * @property null|string $fingerprint

Uniquely identifies this particular card number. You can use this attribute to check whether two customers who’ve signed up with you are using the same card number, for example. For payment methods that tokenize card information (Apple Pay, Google Pay), the tokenized number might be provided instead of the underlying card number.

Starting May 1, 2021, card fingerprint in India for Connect will change to allow two fingerprints for the same card --- one for India and one for the rest of the world.

+ * @property null|string $fingerprint

Uniquely identifies this particular card number. You can use this attribute to check whether two customers who’ve signed up with you are using the same card number, for example. For payment methods that tokenize card information (Apple Pay, Google Pay), the tokenized number might be provided instead of the underlying card number.

As of May 1, 2021, card fingerprint in India for Connect changed to allow two fingerprints for the same card---one for India and one for the rest of the world.

* @property string $funding Card funding type. Can be credit, debit, prepaid, or unknown. * @property string $last4 The last four digits of the card. * @property null|\SimplePay\Vendor\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 Cardholder name. - * @property null|string $status For external accounts, possible values are new and errored. If a transfer fails, the status is set to errored and transfers are stopped until account details are updated. + * @property null|string $status For external accounts that are cards, possible values are new and errored. If a payout fails, the status is set to errored and scheduled payouts are stopped until account details are updated. * @property null|string $tokenization_method If the card number is tokenized, this is the method that was used. Can be android_pay (includes Google Pay), apple_pay, masterpass, visa_checkout, or null. */ class Card extends ApiResource diff --git a/lib/Stripe/lib/CashBalance.php b/lib/Stripe/lib/CashBalance.php index f67538cc..c4638fbf 100644 --- a/lib/Stripe/lib/CashBalance.php +++ b/lib/Stripe/lib/CashBalance.php @@ -5,9 +5,7 @@ namespace SimplePay\Vendor\Stripe; /** - * A customer's Cash balance represents real funds. Customers can add - * funds to their cash balance by sending a bank transfer. These funds can be used - * for payment and can eventually be paid out to your bank account. + * A customer's Cash balance represents real funds. Customers can add funds to their cash balance by sending a bank transfer. These funds can be used for payment and can eventually be paid out to your bank account. * * @property string $object String representing the object's type. Objects of the same type share the same value. * @property null|\SimplePay\Vendor\Stripe\StripeObject $available A hash of all cash balances available to this customer. You cannot delete a customer with any cash balances, even if the balance is 0. Amounts are represented in the smallest currency unit. diff --git a/lib/Stripe/lib/Charge.php b/lib/Stripe/lib/Charge.php index e1f3e72b..9cdee36a 100644 --- a/lib/Stripe/lib/Charge.php +++ b/lib/Stripe/lib/Charge.php @@ -5,24 +5,20 @@ namespace SimplePay\Vendor\Stripe; /** - * To charge a credit or a debit card, you create a Charge object. You - * can retrieve and refund individual charges as well as list all charges. Charges - * are identified by a unique, random ID. - * - * Related guide: Accept a - * payment with the Charges API. + * The Charge object represents a single attempt to move money into your SimplePay\Vendor\Stripe account. + * PaymentIntent confirmation is the most common way to create Charges, but transferring + * money to a different SimplePay\Vendor\Stripe account through Connect also creates Charges. + * Some legacy payment flows create Charges directly, which is not recommended for new integrations. * * @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 \SimplePay\Vendor\Stripe\StripeObject $alternate_statement_descriptors * @property int $amount Amount intended to be collected by this payment. A positive integer representing how much to charge in the smallest currency unit (e.g., 100 cents to charge $1.00 or 100 to charge ¥100, a zero-decimal currency). The minimum amount is $0.50 US or equivalent in charge currency. The amount value supports up to eight digits (e.g., a value of 99999999 for a USD charge of $999,999.99). - * @property int $amount_captured Amount in %s captured (can be less than the amount attribute on the charge if a partial capture was made). - * @property int $amount_refunded Amount in %s refunded (can be less than the amount attribute on the charge if a partial refund was issued). + * @property int $amount_captured Amount in cents (or local equivalent) captured (can be less than the amount attribute on the charge if a partial capture was made). + * @property int $amount_refunded Amount in cents (or local equivalent) refunded (can be less than the amount attribute on the charge if a partial refund was issued). * @property null|string|\SimplePay\Vendor\Stripe\StripeObject $application ID of the Connect application that created the charge. * @property null|string|\SimplePay\Vendor\Stripe\ApplicationFee $application_fee The application fee (if any) for the charge. See the Connect documentation for details. * @property null|int $application_fee_amount The amount of the application fee (if any) requested for the charge. See the Connect documentation for details. - * @property string $authorization_code Authorization code on the charge. + * @property null|string $authorization_code Authorization code on the charge. * @property null|string|\SimplePay\Vendor\Stripe\BalanceTransaction $balance_transaction ID of the balance transaction that describes the impact of this charge on your account balance (not including refunds or disputes). * @property \SimplePay\Vendor\Stripe\StripeObject $billing_details * @property null|string $calculated_statement_descriptor The full statement descriptor that is passed to card networks, and that is displayed on your customers' credit card and bank statements. Allows you to see what the statement descriptor looks like after the static and dynamic portions are combined. @@ -31,24 +27,22 @@ * @property string $currency Three-letter ISO currency code, in lowercase. Must be a supported currency. * @property null|string|\SimplePay\Vendor\Stripe\Customer $customer ID of the customer this charge is for if one exists. * @property null|string $description An arbitrary string attached to the object. Often useful for displaying to users. - * @property null|string|\SimplePay\Vendor\Stripe\Account $destination ID of an existing, connected SimplePay\Vendor\Stripe account to transfer funds to if transfer_data was specified in the charge request. - * @property null|string|\SimplePay\Vendor\Stripe\Dispute $dispute Details about the dispute if the charge has been disputed. * @property bool $disputed Whether the charge has been disputed. * @property null|string|\SimplePay\Vendor\Stripe\BalanceTransaction $failure_balance_transaction ID of the balance transaction that describes the reversal of the balance on your account due to payment failure. * @property null|string $failure_code Error code explaining reason for charge failure if available (see the errors section for a list of codes). * @property null|string $failure_message Message to user further explaining reason for charge failure if available. * @property null|\SimplePay\Vendor\Stripe\StripeObject $fraud_details Information on fraud assessments for the charge. * @property null|string|\SimplePay\Vendor\Stripe\Invoice $invoice ID of the invoice this charge is for if one exists. - * @property \SimplePay\Vendor\Stripe\StripeObject $level3 + * @property null|\SimplePay\Vendor\Stripe\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 \SimplePay\Vendor\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|\SimplePay\Vendor\Stripe\Account $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|string|\SimplePay\Vendor\Stripe\Account $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|\SimplePay\Vendor\Stripe\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|string|\SimplePay\Vendor\Stripe\PaymentIntent $payment_intent ID of the PaymentIntent associated with this charge, if one exists. * @property null|string $payment_method ID of the payment method used in this charge. * @property null|\SimplePay\Vendor\Stripe\StripeObject $payment_method_details Details about the payment method at the time of the transaction. - * @property \SimplePay\Vendor\Stripe\StripeObject $radar_options Options to configure Radar. See Radar Session for more information. + * @property null|\SimplePay\Vendor\Stripe\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. * @property null|string $receipt_number This is the transaction number that appears on email receipts sent for this charge. This attribute will be null until a receipt has been sent. * @property null|string $receipt_url This is the URL to view the receipt for this charge. The receipt is kept up-to-date to the latest state of the charge, including any refunds. If the charge is for an Invoice, the receipt will be stylized as an Invoice receipt. @@ -61,9 +55,9 @@ * @property null|string $statement_descriptor For card charges, use statement_descriptor_suffix instead. Otherwise, you can use this value as the complete description of a charge on your customers’ statements. Must contain at least one letter, maximum 22 characters. * @property null|string $statement_descriptor_suffix Provides information about the charge that customers see on their statements. Concatenated with the prefix (shortened descriptor) or statement descriptor that’s set on the account to form the complete statement descriptor. Maximum 22 characters for the concatenated descriptor. * @property string $status The status of the payment is either succeeded, pending, or failed. - * @property string|\SimplePay\Vendor\Stripe\Transfer $transfer ID of the transfer to the destination account (only applicable if the charge was created using the destination parameter). + * @property null|string|\SimplePay\Vendor\Stripe\Transfer $transfer ID of the transfer to the destination account (only applicable if the charge was created using the destination parameter). * @property null|\SimplePay\Vendor\Stripe\StripeObject $transfer_data An optional dictionary including the account to automatically transfer to as part of a destination charge. See the Connect documentation for details. - * @property null|string $transfer_group A string that identifies this transaction as part of a group. See the Connect documentation for details. + * @property null|string $transfer_group A string that identifies this transaction as part of a group. See the Connect documentation for details. */ class Charge extends ApiResource { @@ -155,7 +149,7 @@ public function capture($params = null, $opts = null) * * @throws \SimplePay\Vendor\Stripe\Exception\ApiErrorException if the request fails * - * @return \SimplePay\Vendor\Stripe\SearchResult the charge search results + * @return \SimplePay\Vendor\Stripe\SearchResult<\SimplePay\Vendor\Stripe\Charge> the charge search results */ public static function search($params = null, $opts = null) { diff --git a/lib/Stripe/lib/Checkout/Session.php b/lib/Stripe/lib/Checkout/Session.php index d9babffb..8b66c4c8 100644 --- a/lib/Stripe/lib/Checkout/Session.php +++ b/lib/Stripe/lib/Checkout/Session.php @@ -5,25 +5,22 @@ namespace SimplePay\Vendor\Stripe\Checkout; /** - * A Checkout Session represents your customer's session as they pay for one-time - * purchases or subscriptions through Checkout or Payment Links. We - * recommend creating a new Session each time your customer attempts to pay. + * A Checkout Session represents your customer's session as they pay for + * one-time purchases or subscriptions through Checkout + * or Payment Links. We recommend creating a + * new Session each time your customer attempts to pay. * - * Once payment is successful, the Checkout Session will contain a reference to the - * Customer, and either the - * successful PaymentIntent or an - * active Subscription. + * Once payment is successful, the Checkout Session will contain a reference + * to the Customer, and either the successful + * PaymentIntent or an active + * Subscription. * - * You can create a Checkout Session on your server and pass its ID to the client + * You can create a Checkout Session on your server and redirect to its URL * to begin Checkout. * - * Related guide: Checkout - * Quickstart. + * Related guide: Checkout quickstart * - * @property string $id Unique identifier for the object. Used to pass to redirectToCheckout in Stripe.js. + * @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|\SimplePay\Vendor\Stripe\StripeObject $after_expiration When set, provides configuration for actions to take if this Checkout Session expires. * @property null|bool $allow_promotion_codes Enables user redeemable promotion codes. @@ -33,19 +30,22 @@ * @property null|string $billing_address_collection Describes whether Checkout should collect the customer's billing address. * @property null|string $cancel_url If set, Checkout displays a back button and customers will be directed to this URL if they decide to cancel payment and return to your website. * @property null|string $client_reference_id A unique string to reference the Checkout Session. This can be a customer ID, a cart ID, or similar, and can be used to reconcile the Session with your internal systems. + * @property null|string $client_secret Client secret to be used when initializing Stripe.js embedded checkout. * @property null|\SimplePay\Vendor\Stripe\StripeObject $consent Results of consent_collection for this session. * @property null|\SimplePay\Vendor\Stripe\StripeObject $consent_collection When set, provides configuration for the Checkout Session to gather active consent from customers. * @property int $created Time at which the object was created. Measured in seconds since the Unix epoch. * @property null|string $currency Three-letter ISO currency code, in lowercase. Must be a supported currency. + * @property null|\SimplePay\Vendor\Stripe\StripeObject $currency_conversion Currency conversion details for automatic currency conversion sessions + * @property \SimplePay\Vendor\Stripe\StripeObject[] $custom_fields Collect additional information from your customer using custom fields. Up to 2 fields are supported. * @property \SimplePay\Vendor\Stripe\StripeObject $custom_text - * @property null|string|\SimplePay\Vendor\Stripe\Customer $customer The ID of the customer for this Session. For Checkout Sessions in payment or subscription mode, Checkout will create a new customer object based on information provided during the payment flow unless an existing customer was provided when the Session was created. + * @property null|string|\SimplePay\Vendor\Stripe\Customer $customer The ID of the customer for this Session. For Checkout Sessions in subscription mode or Checkout Sessions with customer_creation set as always in payment mode, Checkout will create a new customer object based on information provided during the payment flow unless an existing customer was provided when the Session was created. * @property null|string $customer_creation Configure whether a Checkout Session creates a Customer when the Checkout Session completes. * @property null|\SimplePay\Vendor\Stripe\StripeObject $customer_details The customer details including the customer's tax exempt status and the customer's tax IDs. Only the customer's email is present on Sessions in setup mode. * @property null|string $customer_email If provided, this value will be used when the Customer object is created. If not provided, customers will be asked to enter their email address. Use this parameter to prefill customer data if you already have an email on file. To access information about the customer once the payment flow is complete, use the customer attribute. * @property int $expires_at The timestamp at which the Checkout Session will expire. * @property null|string|\SimplePay\Vendor\Stripe\Invoice $invoice ID of the invoice created by the Checkout Session, if it exists. * @property null|\SimplePay\Vendor\Stripe\StripeObject $invoice_creation Details on the state of invoice creation for the Checkout Session. - * @property \SimplePay\Vendor\Stripe\Collection<\SimplePay\Vendor\Stripe\LineItem> $line_items The line items purchased by the customer. + * @property null|\SimplePay\Vendor\Stripe\Collection<\SimplePay\Vendor\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 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|\SimplePay\Vendor\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. @@ -53,11 +53,14 @@ * @property null|string|\SimplePay\Vendor\Stripe\PaymentIntent $payment_intent The ID of the PaymentIntent for Checkout Sessions in payment mode. * @property null|string|\SimplePay\Vendor\Stripe\PaymentLink $payment_link The ID of the Payment Link that created this Session. * @property null|string $payment_method_collection Configure whether a Checkout Session should collect a payment method. + * @property null|\SimplePay\Vendor\Stripe\StripeObject $payment_method_configuration_details Information about the payment method configuration used for this Checkout session if using dynamic payment methods. * @property null|\SimplePay\Vendor\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 \SimplePay\Vendor\Stripe\StripeObject $phone_number_collection + * @property null|\SimplePay\Vendor\Stripe\StripeObject $phone_number_collection * @property null|string $recovered_from The ID of the original expired Checkout Session that triggered the recovery flow. + * @property null|string $redirect_on_completion Applies to Checkout Sessions with ui_mode: embedded. By default, SimplePay\Vendor\Stripe will always redirect to your return_url after a successful confirmation. If you set redirect_on_completion: 'if_required', then we will only redirect if your user chooses a redirect-based payment method. + * @property null|string $return_url Applies to Checkout Sessions with ui_mode: embedded. 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|\SimplePay\Vendor\Stripe\SetupIntent $setup_intent The ID of the SetupIntent for Checkout Sessions in setup mode. * @property null|\SimplePay\Vendor\Stripe\StripeObject $shipping_address_collection When set, provides configuration for Checkout to collect a shipping address from a customer. * @property null|\SimplePay\Vendor\Stripe\StripeObject $shipping_cost The details of the customer cost of shipping, including the customer chosen ShippingRate. @@ -66,9 +69,10 @@ * @property null|string $status The status of the Checkout Session, one of open, complete, or expired. * @property null|string $submit_type Describes the type of transaction being performed by Checkout in order to customize relevant text on the page, such as the submit button. submit_type can only be specified on Checkout Sessions in payment mode, but not Checkout Sessions in subscription or setup mode. * @property null|string|\SimplePay\Vendor\Stripe\Subscription $subscription The ID of the subscription for Checkout Sessions in subscription mode. - * @property string $success_url The URL the customer will be directed to after the payment or subscription creation is successful. - * @property \SimplePay\Vendor\Stripe\StripeObject $tax_id_collection + * @property null|string $success_url The URL the customer will be directed to after the payment or subscription creation is successful. + * @property null|\SimplePay\Vendor\Stripe\StripeObject $tax_id_collection * @property null|\SimplePay\Vendor\Stripe\StripeObject $total_details Tax and discount details for the computed total amount. + * @property null|string $ui_mode The UI mode of the Session. Can be hosted (default) or embedded. * @property null|string $url The URL to the Checkout Session. 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. */ class Session extends \SimplePay\Vendor\Stripe\ApiResource @@ -96,6 +100,10 @@ class Session extends \SimplePay\Vendor\Stripe\ApiResource const PAYMENT_STATUS_PAID = 'paid'; const PAYMENT_STATUS_UNPAID = 'unpaid'; + const REDIRECT_ON_COMPLETION_ALWAYS = 'always'; + const REDIRECT_ON_COMPLETION_IF_REQUIRED = 'if_required'; + const REDIRECT_ON_COMPLETION_NEVER = 'never'; + const STATUS_COMPLETE = 'complete'; const STATUS_EXPIRED = 'expired'; const STATUS_OPEN = 'open'; @@ -105,6 +113,9 @@ class Session extends \SimplePay\Vendor\Stripe\ApiResource const SUBMIT_TYPE_DONATE = 'donate'; const SUBMIT_TYPE_PAY = 'pay'; + const UI_MODE_EMBEDDED = 'embedded'; + const UI_MODE_HOSTED = 'hosted'; + /** * @param null|array $params * @param null|array|string $opts @@ -129,7 +140,7 @@ public function expire($params = null, $opts = null) * * @throws \SimplePay\Vendor\Stripe\Exception\ApiErrorException if the request fails * - * @return \SimplePay\Vendor\Stripe\Collection<\SimplePay\Vendor\Stripe\LineItem> list of LineItems + * @return \SimplePay\Vendor\Stripe\Collection<\SimplePay\Vendor\Stripe\LineItem> list of line items */ public static function allLineItems($id, $params = null, $opts = null) { diff --git a/lib/Stripe/lib/CountrySpec.php b/lib/Stripe/lib/CountrySpec.php index 4fcb631b..9fc562d6 100644 --- a/lib/Stripe/lib/CountrySpec.php +++ b/lib/Stripe/lib/CountrySpec.php @@ -9,8 +9,8 @@ * created. These requirements can differ depending on the account's country. The * Country Specs API makes these rules available to your integration. * - * You can also view the information from this API call as an online guide. + * You can also view the information from this API call as an online + * guide. * * @property string $id Unique identifier for the object. Represented as the ISO country code for this country. * @property string $object String representing the object's type. Objects of the same type share the same value. diff --git a/lib/Stripe/lib/Coupon.php b/lib/Stripe/lib/Coupon.php index ec49b923..b64e62de 100644 --- a/lib/Stripe/lib/Coupon.php +++ b/lib/Stripe/lib/Coupon.php @@ -6,29 +6,23 @@ /** * 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. + * 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. * * @property string $id Unique identifier for the object. * @property string $object String representing the object's type. Objects of the same type share the same value. * @property null|int $amount_off Amount (in the currency specified) that will be taken off the subtotal of any invoices for this customer. - * @property \SimplePay\Vendor\Stripe\StripeObject $applies_to + * @property null|\SimplePay\Vendor\Stripe\StripeObject $applies_to * @property int $created Time at which the object was created. Measured in seconds since the Unix epoch. * @property null|string $currency If amount_off has been set, the three-letter ISO code for the currency of the amount to take off. - * @property \SimplePay\Vendor\Stripe\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 null|\SimplePay\Vendor\Stripe\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, and 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 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|\SimplePay\Vendor\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 Name of the coupon displayed to customers on for instance invoices or receipts. - * @property null|float $percent_off Percent that will be taken off the subtotal of any invoices for this customer for the duration of the coupon. For example, a coupon with percent_off of 50 will make a %s100 invoice %s50 instead. + * @property null|float $percent_off Percent that will be taken off the subtotal of any invoices for this customer for the duration of the coupon. For example, a coupon with percent_off of 50 will make a $ (or local equivalent)100 invoice $ (or local equivalent)50 instead. * @property null|int $redeem_by Date after which the coupon can no longer be redeemed. * @property int $times_redeemed Number of times this coupon has been applied to a customer. * @property bool $valid Taking account of the above properties, whether this coupon can still be applied to a customer. @@ -42,4 +36,8 @@ class Coupon extends ApiResource use ApiOperations\Delete; use ApiOperations\Retrieve; use ApiOperations\Update; + + const DURATION_FOREVER = 'forever'; + const DURATION_ONCE = 'once'; + const DURATION_REPEATING = 'repeating'; } diff --git a/lib/Stripe/lib/CreditNote.php b/lib/Stripe/lib/CreditNote.php index 54005968..146bbc5e 100644 --- a/lib/Stripe/lib/CreditNote.php +++ b/lib/Stripe/lib/CreditNote.php @@ -5,22 +5,21 @@ namespace SimplePay\Vendor\Stripe; /** - * Issue a credit note to adjust an invoice's amount after the invoice is - * finalized. + * Issue a credit note to adjust an invoice's amount after the invoice is finalized. * - * Related guide: Credit Notes. + * Related guide: Credit notes * * @property string $id Unique identifier for the object. * @property string $object String representing the object's type. Objects of the same type share the same value. - * @property int $amount The integer amount in %s representing the total amount of the credit note, including tax. + * @property int $amount The integer amount in cents (or local equivalent) representing the total amount of the credit note, including tax. * @property int $amount_shipping This is the sum of all the shipping amounts. * @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|\SimplePay\Vendor\Stripe\Customer $customer ID of the customer. * @property null|string|\SimplePay\Vendor\Stripe\CustomerBalanceTransaction $customer_balance_transaction Customer balance transaction related to this credit note. - * @property int $discount_amount The integer amount in %s representing the total amount of discount that was credited. + * @property int $discount_amount The integer amount in cents (or local equivalent) representing the total amount of discount that was credited. * @property \SimplePay\Vendor\Stripe\StripeObject[] $discount_amounts The aggregate amounts calculated per discount for all line items. + * @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 string|\SimplePay\Vendor\Stripe\Invoice $invoice ID of the invoice. * @property \SimplePay\Vendor\Stripe\Collection<\SimplePay\Vendor\Stripe\CreditNoteLineItem> $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. @@ -33,11 +32,11 @@ * @property null|string|\SimplePay\Vendor\Stripe\Refund $refund Refund related to this credit note. * @property null|\SimplePay\Vendor\Stripe\StripeObject $shipping_cost The details of the cost of shipping, including the ShippingRate applied to the invoice. * @property string $status Status of this credit note, one of issued or void. Learn more about voiding credit notes. - * @property int $subtotal The integer amount in %s representing the amount of the credit note, excluding exclusive tax and invoice level discounts. - * @property null|int $subtotal_excluding_tax The integer amount in %s representing the amount of the credit note, excluding all tax and invoice level discounts. + * @property int $subtotal The integer amount in cents (or local equivalent) representing the amount of the credit note, excluding exclusive tax and invoice level discounts. + * @property null|int $subtotal_excluding_tax The integer amount in cents (or local equivalent) representing the amount of the credit note, excluding all tax and invoice level discounts. * @property \SimplePay\Vendor\Stripe\StripeObject[] $tax_amounts The aggregate amounts calculated per tax rate for all line items. - * @property int $total The integer amount in %s representing the total amount of the credit note, including tax and all discount. - * @property null|int $total_excluding_tax The integer amount in %s representing the total amount of the credit note, excluding tax, but including discounts. + * @property int $total The integer amount in cents (or local equivalent) representing the total amount of the credit note, including tax and all discount. + * @property null|int $total_excluding_tax The integer amount in cents (or local equivalent) representing the total amount of the credit note, excluding tax, but including discounts. * @property string $type Type of this credit note, one of pre_payment or post_payment. A pre_payment credit note means it was issued when the invoice was open. A post_payment credit note means it was issued when the invoice was paid. * @property null|int $voided_at The time that the credit note was voided. */ @@ -86,7 +85,7 @@ public static function preview($params = null, $opts = null) * * @throws \SimplePay\Vendor\Stripe\Exception\ApiErrorException if the request fails * - * @return \SimplePay\Vendor\Stripe\Collection<\SimplePay\Vendor\Stripe\CreditNoteLineItem> list of CreditNoteLineItems + * @return \SimplePay\Vendor\Stripe\Collection<\SimplePay\Vendor\Stripe\CreditNoteLineItem> list of credit note line items */ public static function previewLines($params = null, $opts = null) { diff --git a/lib/Stripe/lib/CreditNoteLineItem.php b/lib/Stripe/lib/CreditNoteLineItem.php index 15723bd5..576550aa 100644 --- a/lib/Stripe/lib/CreditNoteLineItem.php +++ b/lib/Stripe/lib/CreditNoteLineItem.php @@ -5,14 +5,16 @@ namespace SimplePay\Vendor\Stripe; /** + * The credit note line item object. + * * @property string $id Unique identifier for the object. * @property string $object String representing the object's type. Objects of the same type share the same value. - * @property int $amount The integer amount in %s representing the gross amount being credited for this line item, excluding (exclusive) tax and discounts. - * @property null|int $amount_excluding_tax The integer amount in %s representing the amount being credited for this line item, excluding all tax and discounts. + * @property int $amount The integer amount in cents (or local equivalent) representing the gross amount being credited for this line item, excluding (exclusive) tax and discounts. + * @property null|int $amount_excluding_tax The integer amount in cents (or local equivalent) representing the amount being credited for this line item, excluding all tax and discounts. * @property null|string $description Description of the item being credited. - * @property int $discount_amount The integer amount in %s representing the discount being credited for this line item. + * @property int $discount_amount The integer amount in cents (or local equivalent) representing the discount being credited for this line item. * @property \SimplePay\Vendor\Stripe\StripeObject[] $discount_amounts The amount of discount calculated per discount for this line item - * @property string $invoice_line_item ID of the invoice line item being credited + * @property 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 null|int $quantity The number of units of product being credited. * @property \SimplePay\Vendor\Stripe\StripeObject[] $tax_amounts The amount of tax calculated per tax rate for this line item @@ -20,7 +22,7 @@ * @property string $type The type of the credit note line item, one of invoice_line_item or custom_line_item. When the type is invoice_line_item there is an additional invoice_line_item property on the resource the value of which is the id of the credited line item on the invoice. * @property null|int $unit_amount The cost of each unit of product being credited. * @property null|string $unit_amount_decimal Same as unit_amount, but contains a decimal value with at most 12 decimal places. - * @property null|string $unit_amount_excluding_tax The amount in %s representing the unit amount being credited for this line item, excluding all tax and discounts. + * @property null|string $unit_amount_excluding_tax The amount in cents (or local equivalent) representing the unit amount being credited for this line item, excluding all tax and discounts. */ class CreditNoteLineItem extends ApiResource { diff --git a/lib/Stripe/lib/Customer.php b/lib/Stripe/lib/Customer.php index fd6a4222..605ce760 100644 --- a/lib/Stripe/lib/Customer.php +++ b/lib/Stripe/lib/Customer.php @@ -5,41 +5,38 @@ namespace SimplePay\Vendor\Stripe; /** - * This object represents a customer of your business. It lets you create recurring - * charges and track payments that belong to the same customer. + * This object represents a customer of your business. Use it to create recurring charges and track payments that belong to the same customer. * - * Related guide: Save a card during - * payment. + * Related guide: Save a card during payment * * @property string $id Unique identifier for the object. * @property string $object String representing the object's type. Objects of the same type share the same value. * @property null|\SimplePay\Vendor\Stripe\StripeObject $address The customer's address. - * @property int $balance Current balance, if any, being stored on the customer. If negative, the customer has credit to apply to their next invoice. If positive, the customer has an amount owed that will be added to their next invoice. The balance does not refer to any unpaid invoices; it solely takes into account amounts that have yet to be successfully applied to any invoice. This balance is only taken into account as invoices are finalized. - * @property null|\SimplePay\Vendor\Stripe\CashBalance $cash_balance The current funds being held by SimplePay\Vendor\Stripe on behalf of the customer. These funds can be applied towards payment intents with source "cash_balance". The settings[reconciliation_mode] field describes whether these funds are applied to such payment intents manually or automatically. + * @property null|int $balance The current balance, if any, that's stored on the customer. If negative, the customer has credit to apply to their next invoice. If positive, the customer has an amount owed that's added to their next invoice. The balance only considers amounts that SimplePay\Vendor\Stripe hasn't successfully applied to any invoice. It doesn't reflect unpaid invoices. This balance is only taken into account after invoices finalize. + * @property null|\SimplePay\Vendor\Stripe\CashBalance $cash_balance The current funds being held by SimplePay\Vendor\Stripe on behalf of the customer. You can apply these funds towards payment intents when the source is "cash_balance". The settings[reconciliation_mode] field describes if these funds apply to these payment intents manually or automatically. * @property int $created Time at which the object was created. Measured in seconds since the Unix epoch. * @property null|string $currency Three-letter ISO code for the currency the customer can be charged in for recurring billing purposes. - * @property null|string|\SimplePay\Vendor\Stripe\Account|\SimplePay\Vendor\Stripe\BankAccount|\SimplePay\Vendor\Stripe\Card|\SimplePay\Vendor\Stripe\Source $default_source

ID of the default payment source for the customer.

If you are using payment methods created via the PaymentMethods API, see the invoice_settings.default_payment_method field instead.

- * @property null|bool $delinquent

When the customer's latest invoice is billed by charging automatically, delinquent is true if the invoice's latest charge failed. When the customer's latest invoice is billed by sending an invoice, delinquent is true if the invoice isn't paid by its due date.

If an invoice is marked uncollectible by dunning, delinquent doesn't get reset to false.

+ * @property null|string|\SimplePay\Vendor\Stripe\Account|\SimplePay\Vendor\Stripe\BankAccount|\SimplePay\Vendor\Stripe\Card|\SimplePay\Vendor\Stripe\Source $default_source

ID of the default payment source for the customer.

If you use payment methods created through the PaymentMethods API, see the invoice_settings.default_payment_method field instead.

+ * @property null|bool $delinquent

Tracks the most recent state change on any invoice belonging to the customer. Paying an invoice or marking it uncollectible via the API will set this field to false. An automatic payment failure or passing the invoice.due_date will set this field to true.

If an invoice becomes uncollectible by dunning, delinquent doesn't reset to false.

If you care whether the customer has paid their most recent subscription invoice, use subscription.status instead. Paying or marking uncollectible any customer invoice regardless of whether it is the latest invoice for a subscription will always set this field to false.

* @property null|string $description An arbitrary string attached to the object. Often useful for displaying to users. * @property null|\SimplePay\Vendor\Stripe\Discount $discount Describes the current discount active on the customer, if there is one. * @property null|string $email The customer's email address. - * @property \SimplePay\Vendor\Stripe\StripeObject $invoice_credit_balance The current multi-currency balances, if any, being stored on the customer. If positive in a currency, the customer has a credit to apply to their next invoice denominated in that currency. If negative, the customer has an amount owed that will be added to their next invoice denominated in that currency. These balances do not refer to any unpaid invoices. They solely track amounts that have yet to be successfully applied to any invoice. A balance in a particular currency is only applied to any invoice as an invoice in that currency is finalized. + * @property null|\SimplePay\Vendor\Stripe\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 SimplePay\Vendor\Stripe hasn't successfully applied to any invoice. SimplePay\Vendor\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 \SimplePay\Vendor\Stripe\StripeObject $invoice_settings + * @property null|\SimplePay\Vendor\Stripe\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 \SimplePay\Vendor\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|\SimplePay\Vendor\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 customer's full name or business name. - * @property int $next_invoice_sequence The suffix of the customer's next invoice number, e.g., 0001. + * @property null|int $next_invoice_sequence The suffix of the customer's next invoice number (for example, 0001). * @property null|string $phone The customer's phone number. * @property null|string[] $preferred_locales The customer's preferred locales (languages), ordered by preference. * @property null|\SimplePay\Vendor\Stripe\StripeObject $shipping Mailing and shipping address for the customer. Appears on invoices emailed to this customer. - * @property \SimplePay\Vendor\Stripe\Collection<\SimplePay\Vendor\Stripe\Account|\SimplePay\Vendor\Stripe\BankAccount|\SimplePay\Vendor\Stripe\Card|\SimplePay\Vendor\Stripe\Source> $sources The customer's payment sources, if any. - * @property \SimplePay\Vendor\Stripe\Collection<\SimplePay\Vendor\Stripe\Subscription> $subscriptions The customer's current subscriptions, if any. - * @property \SimplePay\Vendor\Stripe\StripeObject $tax - * @property null|string $tax_exempt Describes the customer's tax exemption status. One of none, exempt, or reverse. When set to reverse, invoice and receipt PDFs include the text "Reverse charge". - * @property \SimplePay\Vendor\Stripe\Collection<\SimplePay\Vendor\Stripe\TaxId> $tax_ids The customer's tax IDs. - * @property null|string|\SimplePay\Vendor\Stripe\TestHelpers\TestClock $test_clock ID of the test clock this customer belongs to. + * @property null|\SimplePay\Vendor\Stripe\Collection<\SimplePay\Vendor\Stripe\Account|\SimplePay\Vendor\Stripe\BankAccount|\SimplePay\Vendor\Stripe\Card|\SimplePay\Vendor\Stripe\Source> $sources The customer's payment sources, if any. + * @property null|\SimplePay\Vendor\Stripe\Collection<\SimplePay\Vendor\Stripe\Subscription> $subscriptions The customer's current subscriptions, if any. + * @property null|\SimplePay\Vendor\Stripe\StripeObject $tax + * @property null|string $tax_exempt Describes the customer's tax exemption status, which is none, exempt, or reverse. When set to reverse, invoice and receipt PDFs include the following text: "Reverse charge". + * @property null|\SimplePay\Vendor\Stripe\Collection<\SimplePay\Vendor\Stripe\TaxId> $tax_ids The customer's tax IDs. + * @property null|string|\SimplePay\Vendor\Stripe\TestHelpers\TestClock $test_clock ID of the test clock that this customer belongs to. */ class Customer extends ApiResource { @@ -91,7 +88,7 @@ public function deleteDiscount($params = null, $opts = null) * * @throws \SimplePay\Vendor\Stripe\Exception\ApiErrorException if the request fails * - * @return \SimplePay\Vendor\Stripe\Collection<\SimplePay\Vendor\Stripe\PaymentMethod> list of PaymentMethods + * @return \SimplePay\Vendor\Stripe\Collection<\SimplePay\Vendor\Stripe\PaymentMethod> list of payment methods */ public static function allPaymentMethods($id, $params = null, $opts = null) { @@ -110,7 +107,7 @@ public static function allPaymentMethods($id, $params = null, $opts = null) * * @throws \SimplePay\Vendor\Stripe\Exception\ApiErrorException if the request fails * - * @return \SimplePay\Vendor\Stripe\Customer the retrieved customer + * @return \SimplePay\Vendor\Stripe\PaymentMethod the retrieved payment method */ public function retrievePaymentMethod($payment_method, $params = null, $opts = null) { @@ -128,7 +125,7 @@ public function retrievePaymentMethod($payment_method, $params = null, $opts = n * * @throws \SimplePay\Vendor\Stripe\Exception\ApiErrorException if the request fails * - * @return \SimplePay\Vendor\Stripe\SearchResult the customer search results + * @return \SimplePay\Vendor\Stripe\SearchResult<\SimplePay\Vendor\Stripe\Customer> the customer search results */ public static function search($params = null, $opts = null) { diff --git a/lib/Stripe/lib/CustomerBalanceTransaction.php b/lib/Stripe/lib/CustomerBalanceTransaction.php index a6a3b740..47ba6c56 100644 --- a/lib/Stripe/lib/CustomerBalanceTransaction.php +++ b/lib/Stripe/lib/CustomerBalanceTransaction.php @@ -5,17 +5,12 @@ namespace SimplePay\Vendor\Stripe; /** - * Each customer has a balance - * value, which denotes a debit or credit that's automatically applied to their - * next invoice upon finalization. You may modify the value directly by using the - * update customer API, - * or by creating a Customer Balance Transaction, which increments or decrements - * the customer's balance by the specified amount. + * Each customer has a Balance value, + * which denotes a debit or credit that's automatically applied to their next invoice upon finalization. + * You may modify the value directly by using the update customer API, + * or by creating a Customer Balance Transaction, which increments or decrements the customer's balance by the specified amount. * - * Related guide: Customer Balance to - * learn more. + * Related guide: Customer balance * * @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. diff --git a/lib/Stripe/lib/CustomerCashBalanceTransaction.php b/lib/Stripe/lib/CustomerCashBalanceTransaction.php index 398bb311..6b4095c3 100644 --- a/lib/Stripe/lib/CustomerCashBalanceTransaction.php +++ b/lib/Stripe/lib/CustomerCashBalanceTransaction.php @@ -5,25 +5,25 @@ namespace SimplePay\Vendor\Stripe; /** - * Customers with certain payments enabled have a cash balance, representing funds - * that were paid by the customer to a merchant, but have not yet been allocated to - * a payment. Cash Balance Transactions represent when funds are moved into or out - * of this balance. This includes funding by the customer, allocation to payments, - * and refunds to the customer. + * Customers with certain payments enabled have a cash balance, representing funds that were paid + * by the customer to a merchant, but have not yet been allocated to a payment. Cash Balance Transactions + * represent when funds are moved into or out of this balance. This includes funding by the customer, allocation + * to payments, and refunds to the customer. * * @property string $id Unique identifier for the object. * @property string $object String representing the object's type. Objects of the same type share the same value. - * @property \SimplePay\Vendor\Stripe\StripeObject $applied_to_payment + * @property null|\SimplePay\Vendor\Stripe\StripeObject $adjusted_for_overdraft + * @property null|\SimplePay\Vendor\Stripe\StripeObject $applied_to_payment * @property int $created Time at which the object was created. Measured in seconds since the Unix epoch. * @property string $currency Three-letter ISO currency code, in lowercase. Must be a supported currency. * @property string|\SimplePay\Vendor\Stripe\Customer $customer The customer whose available cash balance changed as a result of this transaction. * @property int $ending_balance The total available cash balance for the specified currency after this transaction was applied. Represented in the smallest currency unit. - * @property \SimplePay\Vendor\Stripe\StripeObject $funded + * @property null|\SimplePay\Vendor\Stripe\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 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 \SimplePay\Vendor\Stripe\StripeObject $refunded_from_payment - * @property string $type The type of the cash balance transaction. One of applied_to_payment, unapplied_from_payment, refunded_from_payment, funded, return_initiated, or return_canceled. New types may be added in future. See Customer Balance to learn more about these types. - * @property \SimplePay\Vendor\Stripe\StripeObject $unapplied_from_payment + * @property null|\SimplePay\Vendor\Stripe\StripeObject $refunded_from_payment + * @property string $type The type of the cash balance transaction. New types may be added in future. See Customer Balance to learn more about these types. + * @property null|\SimplePay\Vendor\Stripe\StripeObject $unapplied_from_payment */ class CustomerCashBalanceTransaction extends ApiResource { @@ -32,11 +32,13 @@ class CustomerCashBalanceTransaction extends ApiResource use ApiOperations\All; use ApiOperations\Retrieve; + const TYPE_ADJUSTED_FOR_OVERDRAFT = 'adjusted_for_overdraft'; const TYPE_APPLIED_TO_PAYMENT = 'applied_to_payment'; const TYPE_FUNDED = 'funded'; const TYPE_FUNDING_REVERSED = 'funding_reversed'; const TYPE_REFUNDED_FROM_PAYMENT = 'refunded_from_payment'; const TYPE_RETURN_CANCELED = 'return_canceled'; const TYPE_RETURN_INITIATED = 'return_initiated'; + const TYPE_TRANSFERRED_TO_BALANCE = 'transferred_to_balance'; const TYPE_UNAPPLIED_FROM_PAYMENT = 'unapplied_from_payment'; } diff --git a/lib/Stripe/lib/Discount.php b/lib/Stripe/lib/Discount.php index 84b0cd30..3bc5de7c 100644 --- a/lib/Stripe/lib/Discount.php +++ b/lib/Stripe/lib/Discount.php @@ -1,23 +1,28 @@ coupon or promotion code. + * It contains information about when the discount began, when it will end, and what it is applied to. + * + * 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 $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 \SimplePay\Vendor\Stripe\Coupon $coupon Hash describing the coupon applied to create this discount. - * @property string|\SimplePay\Vendor\Stripe\Customer $customer The ID of the customer associated with this discount. - * @property null|int $end If the coupon has a duration of repeating, the date that this discount will end. If the coupon has a duration of once or forever, this attribute will be null. - * @property string $id The ID of the discount object. - * @property null|string $invoice The invoice that the discount’s coupon was applied to, if it was applied directly to a particular invoice. - * @property null|string $invoice_item The invoice item id (or invoice line item id for invoice line items of type=‘subscription’) that the discount’s coupon was applied to, if it was applied directly to a particular invoice item or invoice line item. - * @property string $object String representing the object’s type. Objects of the same type share the same value. - * @property null|string $promotion_code The promotion code applied to create this discount. + * @property \SimplePay\Vendor\Stripe\Coupon $coupon A coupon contains information about a percent-off or amount-off discount you might want to apply to a customer. Coupons may be applied to subscriptions, invoices, checkout sessions, quotes, and more. Coupons do not work with conventional one-off charges or payment intents. + * @property null|string|\SimplePay\Vendor\Stripe\Customer $customer The ID of the customer associated with this discount. + * @property null|int $end If the coupon has a duration of repeating, the date that this discount will end. If the coupon has a duration of once or forever, this attribute will be null. + * @property null|string $invoice The invoice that the discount's coupon was applied to, if it was applied directly to a particular invoice. + * @property null|string $invoice_item The invoice item id (or invoice line item id for invoice line items of type='subscription') that the discount's coupon was applied to, if it was applied directly to a particular invoice item or invoice line item. + * @property null|string|\SimplePay\Vendor\Stripe\PromotionCode $promotion_code The promotion code applied to create this discount. * @property int $start Date that the coupon was applied. * @property null|string $subscription The subscription that this coupon is applied to, if it is applied to a particular subscription. */ -class Discount extends StripeObject +class Discount extends ApiResource { const OBJECT_NAME = 'discount'; } diff --git a/lib/Stripe/lib/Dispute.php b/lib/Stripe/lib/Dispute.php index df354b5e..36cd781c 100644 --- a/lib/Stripe/lib/Dispute.php +++ b/lib/Stripe/lib/Dispute.php @@ -6,30 +6,28 @@ /** * A dispute occurs when a customer questions your charge with their card issuer. - * When this happens, you're given the opportunity to respond to the dispute with - * evidence that shows that the charge is legitimate. You can find more information - * about the dispute process in our Disputes and Fraud - * documentation. + * When this happens, you have the opportunity to respond to the dispute with + * evidence that shows that the charge is legitimate. * - * Related guide: Disputes and - * Fraud. + * Related guide: Disputes and fraud * * @property string $id Unique identifier for the object. * @property string $object String representing the object's type. Objects of the same type share the same value. - * @property int $amount Disputed amount. Usually the amount of the charge, but can differ (usually because of currency fluctuation or because only part of the order is disputed). + * @property int $amount Disputed amount. Usually the amount of the charge, but it can differ (usually because of currency fluctuation or because only part of the order is disputed). * @property \SimplePay\Vendor\Stripe\BalanceTransaction[] $balance_transactions List of zero, one, or two balance transactions that show funds withdrawn and reinstated to your SimplePay\Vendor\Stripe account as a result of this dispute. - * @property string|\SimplePay\Vendor\Stripe\Charge $charge ID of the charge that was disputed. + * @property string|\SimplePay\Vendor\Stripe\Charge $charge ID of the charge that's disputed. * @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 \SimplePay\Vendor\Stripe\StripeObject $evidence * @property \SimplePay\Vendor\Stripe\StripeObject $evidence_details - * @property bool $is_charge_refundable If true, it is still possible to refund the disputed payment. Once the payment has been fully refunded, no further funds will be withdrawn from your SimplePay\Vendor\Stripe account as a result of this dispute. + * @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 SimplePay\Vendor\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 \SimplePay\Vendor\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 $network_reason_code Network-dependent reason code for the dispute. - * @property null|string|\SimplePay\Vendor\Stripe\PaymentIntent $payment_intent ID of the PaymentIntent that was disputed. - * @property string $reason Reason given by cardholder for dispute. Possible values are bank_cannot_process, check_returned, credit_not_processed, customer_initiated, debit_not_authorized, duplicate, fraudulent, general, incorrect_account_details, insufficient_funds, product_not_received, product_unacceptable, subscription_canceled, or unrecognized. Read more about dispute reasons. - * @property string $status Current status of dispute. Possible values are warning_needs_response, warning_under_review, warning_closed, needs_response, under_review, charge_refunded, won, or lost. + * @property null|string|\SimplePay\Vendor\Stripe\PaymentIntent $payment_intent ID of the PaymentIntent that's disputed. + * @property null|\SimplePay\Vendor\Stripe\StripeObject $payment_method_details + * @property string $reason Reason given by cardholder for dispute. Possible values are bank_cannot_process, check_returned, credit_not_processed, customer_initiated, debit_not_authorized, duplicate, fraudulent, general, incorrect_account_details, insufficient_funds, product_not_received, product_unacceptable, subscription_canceled, or unrecognized. Learn more about dispute reasons. + * @property string $status Current status of dispute. Possible values are warning_needs_response, warning_under_review, warning_closed, needs_response, under_review, won, or lost. */ class Dispute extends ApiResource { @@ -54,7 +52,6 @@ class Dispute extends ApiResource const REASON_SUBSCRIPTION_CANCELED = 'subscription_canceled'; const REASON_UNRECOGNIZED = 'unrecognized'; - const STATUS_CHARGE_REFUNDED = 'charge_refunded'; const STATUS_LOST = 'lost'; const STATUS_NEEDS_RESPONSE = 'needs_response'; const STATUS_UNDER_REVIEW = 'under_review'; diff --git a/lib/Stripe/lib/EphemeralKey.php b/lib/Stripe/lib/EphemeralKey.php index 18ed9b9b..1caf75df 100644 --- a/lib/Stripe/lib/EphemeralKey.php +++ b/lib/Stripe/lib/EphemeralKey.php @@ -10,7 +10,7 @@ * @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 string $secret The key's secret. You can use this value to make authorized requests to the SimplePay\Vendor\Stripe API. + * @property null|string $secret The key's secret. You can use this value to make authorized requests to the SimplePay\Vendor\Stripe API. */ class EphemeralKey extends ApiResource { diff --git a/lib/Stripe/lib/ErrorObject.php b/lib/Stripe/lib/ErrorObject.php index b883233d..b2c9e7d2 100644 --- a/lib/Stripe/lib/ErrorObject.php +++ b/lib/Stripe/lib/ErrorObject.php @@ -42,6 +42,8 @@ class ErrorObject extends StripeObject * * @see https://stripe.com/docs/error-codes */ + // 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'; const CODE_ACCOUNT_INFORMATION_MISMATCH = 'account_information_mismatch'; @@ -52,16 +54,21 @@ class ErrorObject extends StripeObject const CODE_AMOUNT_TOO_LARGE = 'amount_too_large'; const CODE_AMOUNT_TOO_SMALL = 'amount_too_small'; const CODE_API_KEY_EXPIRED = 'api_key_expired'; + const CODE_APPLICATION_FEES_NOT_ALLOWED = 'application_fees_not_allowed'; const CODE_AUTHENTICATION_REQUIRED = 'authentication_required'; const CODE_BALANCE_INSUFFICIENT = 'balance_insufficient'; + const CODE_BALANCE_INVALID_PARAMETER = 'balance_invalid_parameter'; const CODE_BANK_ACCOUNT_BAD_ROUTING_NUMBERS = 'bank_account_bad_routing_numbers'; const CODE_BANK_ACCOUNT_DECLINED = 'bank_account_declined'; const CODE_BANK_ACCOUNT_EXISTS = 'bank_account_exists'; + const CODE_BANK_ACCOUNT_RESTRICTED = 'bank_account_restricted'; const CODE_BANK_ACCOUNT_UNUSABLE = 'bank_account_unusable'; const CODE_BANK_ACCOUNT_UNVERIFIED = 'bank_account_unverified'; const CODE_BANK_ACCOUNT_VERIFICATION_FAILED = 'bank_account_verification_failed'; const CODE_BILLING_INVALID_MANDATE = 'billing_invalid_mandate'; const CODE_BITCOIN_UPGRADE_REQUIRED = 'bitcoin_upgrade_required'; + const CODE_CAPTURE_CHARGE_AUTHORIZATION_EXPIRED = 'capture_charge_authorization_expired'; + const CODE_CAPTURE_UNAUTHORIZED_PAYMENT = 'capture_unauthorized_payment'; const CODE_CARD_DECLINE_RATE_LIMIT_EXCEEDED = 'card_decline_rate_limit_exceeded'; const CODE_CARD_DECLINED = 'card_declined'; const CODE_CARDHOLDER_PHONE_NUMBER_REQUIRED = 'cardholder_phone_number_required'; @@ -71,6 +78,7 @@ class ErrorObject extends StripeObject const CODE_CHARGE_EXCEEDS_SOURCE_LIMIT = 'charge_exceeds_source_limit'; const CODE_CHARGE_EXPIRED_FOR_CAPTURE = 'charge_expired_for_capture'; const CODE_CHARGE_INVALID_PARAMETER = 'charge_invalid_parameter'; + const CODE_CHARGE_NOT_REFUNDABLE = 'charge_not_refundable'; const CODE_CLEARING_CODE_UNSUPPORTED = 'clearing_code_unsupported'; const CODE_COUNTRY_CODE_INVALID = 'country_code_invalid'; const CODE_COUNTRY_UNSUPPORTED = 'country_unsupported'; @@ -85,6 +93,8 @@ class ErrorObject extends StripeObject const CODE_INCORRECT_CVC = 'incorrect_cvc'; const CODE_INCORRECT_NUMBER = 'incorrect_number'; const CODE_INCORRECT_ZIP = 'incorrect_zip'; + const CODE_INSTANT_PAYOUTS_CONFIG_DISABLED = 'instant_payouts_config_disabled'; + const CODE_INSTANT_PAYOUTS_CURRENCY_DISABLED = 'instant_payouts_currency_disabled'; const CODE_INSTANT_PAYOUTS_LIMIT_EXCEEDED = 'instant_payouts_limit_exceeded'; const CODE_INSTANT_PAYOUTS_UNSUPPORTED = 'instant_payouts_unsupported'; const CODE_INSUFFICIENT_FUNDS = 'insufficient_funds'; @@ -98,6 +108,7 @@ class ErrorObject extends StripeObject const CODE_INVALID_EXPIRY_YEAR = 'invalid_expiry_year'; const CODE_INVALID_NUMBER = 'invalid_number'; const CODE_INVALID_SOURCE_USAGE = 'invalid_source_usage'; + const CODE_INVALID_TAX_LOCATION = 'invalid_tax_location'; const CODE_INVOICE_NO_CUSTOMER_LINE_ITEMS = 'invoice_no_customer_line_items'; const CODE_INVOICE_NO_PAYMENT_METHOD_TYPES = 'invoice_no_payment_method_types'; const CODE_INVOICE_NO_SUBSCRIPTION_LINE_ITEMS = 'invoice_no_subscription_line_items'; @@ -111,6 +122,7 @@ class ErrorObject extends StripeObject const CODE_NO_ACCOUNT = 'no_account'; const CODE_NOT_ALLOWED_ON_STANDARD_ACCOUNT = 'not_allowed_on_standard_account'; const CODE_OUT_OF_INVENTORY = 'out_of_inventory'; + const CODE_OWNERSHIP_DECLARATION_NOT_ALLOWED = 'ownership_declaration_not_allowed'; const CODE_PARAMETER_INVALID_EMPTY = 'parameter_invalid_empty'; const CODE_PARAMETER_INVALID_INTEGER = 'parameter_invalid_integer'; const CODE_PARAMETER_INVALID_STRING_BLANK = 'parameter_invalid_string_blank'; @@ -130,7 +142,9 @@ class ErrorObject extends StripeObject const CODE_PAYMENT_METHOD_BANK_ACCOUNT_ALREADY_VERIFIED = 'payment_method_bank_account_already_verified'; const CODE_PAYMENT_METHOD_BANK_ACCOUNT_BLOCKED = 'payment_method_bank_account_blocked'; const CODE_PAYMENT_METHOD_BILLING_DETAILS_ADDRESS_MISSING = 'payment_method_billing_details_address_missing'; + const CODE_PAYMENT_METHOD_CONFIGURATION_FAILURES = 'payment_method_configuration_failures'; const CODE_PAYMENT_METHOD_CURRENCY_MISMATCH = 'payment_method_currency_mismatch'; + const CODE_PAYMENT_METHOD_CUSTOMER_DECLINE = 'payment_method_customer_decline'; 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'; @@ -139,17 +153,21 @@ class ErrorObject extends StripeObject const CODE_PAYMENT_METHOD_MICRODEPOSIT_VERIFICATION_ATTEMPTS_EXCEEDED = 'payment_method_microdeposit_verification_attempts_exceeded'; const CODE_PAYMENT_METHOD_MICRODEPOSIT_VERIFICATION_DESCRIPTOR_CODE_MISMATCH = 'payment_method_microdeposit_verification_descriptor_code_mismatch'; const CODE_PAYMENT_METHOD_MICRODEPOSIT_VERIFICATION_TIMEOUT = 'payment_method_microdeposit_verification_timeout'; + const CODE_PAYMENT_METHOD_NOT_AVAILABLE = 'payment_method_not_available'; const CODE_PAYMENT_METHOD_PROVIDER_DECLINE = 'payment_method_provider_decline'; const CODE_PAYMENT_METHOD_PROVIDER_TIMEOUT = 'payment_method_provider_timeout'; const CODE_PAYMENT_METHOD_UNACTIVATED = 'payment_method_unactivated'; const CODE_PAYMENT_METHOD_UNEXPECTED_STATE = 'payment_method_unexpected_state'; const CODE_PAYMENT_METHOD_UNSUPPORTED_TYPE = 'payment_method_unsupported_type'; + const CODE_PAYOUT_RECONCILIATION_NOT_READY = 'payout_reconciliation_not_ready'; + const CODE_PAYOUTS_LIMIT_EXCEEDED = 'payouts_limit_exceeded'; const CODE_PAYOUTS_NOT_ALLOWED = 'payouts_not_allowed'; const CODE_PLATFORM_ACCOUNT_REQUIRED = 'platform_account_required'; const CODE_PLATFORM_API_KEY_EXPIRED = 'platform_api_key_expired'; const CODE_POSTAL_CODE_INVALID = 'postal_code_invalid'; const CODE_PROCESSING_ERROR = 'processing_error'; const CODE_PRODUCT_INACTIVE = 'product_inactive'; + const CODE_PROGRESSIVE_ONBOARDING_LIMIT_EXCEEDED = 'progressive_onboarding_limit_exceeded'; const CODE_RATE_LIMIT = 'rate_limit'; const CODE_REFER_TO_CUSTOMER = 'refer_to_customer'; const CODE_REFUND_DISPUTED_PAYMENT = 'refund_disputed_payment'; @@ -162,21 +180,30 @@ class ErrorObject extends StripeObject const CODE_SETUP_ATTEMPT_FAILED = 'setup_attempt_failed'; const CODE_SETUP_INTENT_AUTHENTICATION_FAILURE = 'setup_intent_authentication_failure'; const CODE_SETUP_INTENT_INVALID_PARAMETER = 'setup_intent_invalid_parameter'; + const CODE_SETUP_INTENT_MANDATE_INVALID = 'setup_intent_mandate_invalid'; const CODE_SETUP_INTENT_SETUP_ATTEMPT_EXPIRED = 'setup_intent_setup_attempt_expired'; const CODE_SETUP_INTENT_UNEXPECTED_STATE = 'setup_intent_unexpected_state'; const CODE_SHIPPING_CALCULATION_FAILED = 'shipping_calculation_failed'; const CODE_SKU_INACTIVE = 'sku_inactive'; const CODE_STATE_UNSUPPORTED = 'state_unsupported'; + const CODE_STATUS_TRANSITION_INVALID = 'status_transition_invalid'; + const CODE_STRIPE_TAX_INACTIVE = 'stripe_tax_inactive'; const CODE_TAX_ID_INVALID = 'tax_id_invalid'; const CODE_TAXES_CALCULATION_FAILED = 'taxes_calculation_failed'; const CODE_TERMINAL_LOCATION_COUNTRY_UNSUPPORTED = 'terminal_location_country_unsupported'; + const CODE_TERMINAL_READER_BUSY = 'terminal_reader_busy'; + const CODE_TERMINAL_READER_HARDWARE_FAULT = 'terminal_reader_hardware_fault'; + const CODE_TERMINAL_READER_OFFLINE = 'terminal_reader_offline'; + const CODE_TERMINAL_READER_TIMEOUT = 'terminal_reader_timeout'; const CODE_TESTMODE_CHARGES_ONLY = 'testmode_charges_only'; const CODE_TLS_VERSION_UNSUPPORTED = 'tls_version_unsupported'; const CODE_TOKEN_ALREADY_USED = 'token_already_used'; + const CODE_TOKEN_CARD_NETWORK_INVALID = 'token_card_network_invalid'; const CODE_TOKEN_IN_USE = 'token_in_use'; const CODE_TRANSFER_SOURCE_BALANCE_PARAMETERS_MISMATCH = 'transfer_source_balance_parameters_mismatch'; const CODE_TRANSFERS_NOT_ALLOWED = 'transfers_not_allowed'; const CODE_URL_INVALID = 'url_invalid'; + // The end of the section generated from our OpenAPI spec /** * Refreshes this object using the provided values. diff --git a/lib/Stripe/lib/Event.php b/lib/Stripe/lib/Event.php index 683273bc..bdf6df56 100644 --- a/lib/Stripe/lib/Event.php +++ b/lib/Stripe/lib/Event.php @@ -6,52 +6,49 @@ /** * Events are our way of letting you know when something interesting happens in - * your account. When an interesting event occurs, we create a new - * Event object. For example, when a charge succeeds, we create a - * charge.succeeded event; and when an invoice payment attempt fails, - * we create an invoice.payment_failed event. Note that many API - * requests may cause multiple events to be created. For example, if you create a - * new subscription for a customer, you will receive both a - * customer.subscription.created event and a + * your account. When an interesting event occurs, we create a new Event + * object. For example, when a charge succeeds, we create a charge.succeeded + * event, and when an invoice payment attempt fails, we create an + * invoice.payment_failed event. Certain API requests might create multiple + * events. For example, if you create a new subscription for a + * customer, you receive both a customer.subscription.created event and a * charge.succeeded event. * - * Events occur when the state of another API resource changes. The state of that - * resource at the time of the change is embedded in the event's data field. For - * example, a charge.succeeded event will contain a charge, and an - * invoice.payment_failed event will contain an invoice. + * Events occur when the state of another API resource changes. The event's data + * field embeds the resource's state at the time of the change. For + * example, a charge.succeeded event contains a charge, and an + * invoice.payment_failed event contains an invoice. * - * As with other API resources, you can use endpoints to retrieve an individual event or a list of events from the API. - * We also have a separate webhooks system for sending the - * Event objects directly to an endpoint on your server. Webhooks are - * managed in your account - * settings, and our Using - * Webhooks guide will help you get set up. + * As with other API resources, you can use endpoints to retrieve an + * individual event or a list of events + * from the API. We also have a separate + * webhooks system for sending the + * Event objects directly to an endpoint on your server. You can manage + * webhooks in your + * account settings. Learn how + * to [listen for events] + * (/docs/webhooks) so that your integration can automatically trigger reactions. * - * When using Connect, you can also - * receive notifications of events that occur in connected accounts. For these - * events, there will be an additional account attribute in the - * received Event object. + * When using Connect, you can also receive event notifications + * that occur in connected accounts. For these events, there's an + * additional account attribute in the received Event object. * - * NOTE: Right now, access to events through the Retrieve Event API is - * guaranteed only for 30 days. + * We only guarantee access to events through the Retrieve Event API + * for 30 days. * * This class includes constants for the possible string representations of * event types. See https://stripe.com/docs/api#event_types for more details. * * @property string $id Unique identifier for the object. * @property string $object String representing the object's type. Objects of the same type share the same value. - * @property string $account The connected account that originated the event. - * @property null|string $api_version The SimplePay\Vendor\Stripe API version used to render data. Note: This property is populated only for events on or after October 31, 2014. + * @property null|string $account The connected account that originates the event. + * @property null|string $api_version The SimplePay\Vendor\Stripe API version used to render data. This property is populated only for events on or after October 31, 2014. * @property int $created Time at which the object was created. Measured in seconds since the Unix epoch. * @property \SimplePay\Vendor\Stripe\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 int $pending_webhooks Number of webhooks that have yet to be successfully delivered (i.e., to return a 20x response) to the URLs you've specified. - * @property null|\SimplePay\Vendor\Stripe\StripeObject $request Information on the API request that instigated the event. - * @property string $type Description of the event (e.g., invoice.created or charge.refunded). + * @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|\SimplePay\Vendor\Stripe\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). */ class Event extends ApiResource { @@ -67,14 +64,13 @@ class Event extends ApiResource const ACCOUNT_EXTERNAL_ACCOUNT_UPDATED = 'account.external_account.updated'; const ACCOUNT_UPDATED = 'account.updated'; const APPLICATION_FEE_CREATED = 'application_fee.created'; - const APPLICATION_FEE_REFUND_UPDATED = 'application_fee.refund.updated'; const APPLICATION_FEE_REFUNDED = 'application_fee.refunded'; + const APPLICATION_FEE_REFUND_UPDATED = 'application_fee.refund.updated'; const BALANCE_AVAILABLE = 'balance.available'; const BILLING_PORTAL_CONFIGURATION_CREATED = 'billing_portal.configuration.created'; const BILLING_PORTAL_CONFIGURATION_UPDATED = 'billing_portal.configuration.updated'; const BILLING_PORTAL_SESSION_CREATED = 'billing_portal.session.created'; const CAPABILITY_UPDATED = 'capability.updated'; - const CAPITAL_FINANCING_TRANSACTION_CREATED = 'capital.financing_transaction.created'; const CASH_BALANCE_FUNDS_AVAILABLE = 'cash_balance.funds_available'; const CHARGE_CAPTURED = 'charge.captured'; const CHARGE_DISPUTE_CLOSED = 'charge.dispute.closed'; @@ -85,8 +81,8 @@ class Event extends ApiResource const CHARGE_EXPIRED = 'charge.expired'; const CHARGE_FAILED = 'charge.failed'; const CHARGE_PENDING = 'charge.pending'; - const CHARGE_REFUND_UPDATED = 'charge.refund.updated'; const CHARGE_REFUNDED = 'charge.refunded'; + const CHARGE_REFUND_UPDATED = 'charge.refund.updated'; const CHARGE_SUCCEEDED = 'charge.succeeded'; const CHARGE_UPDATED = 'charge.updated'; const CHECKOUT_SESSION_ASYNC_PAYMENT_FAILED = 'checkout.session.async_payment_failed'; @@ -99,6 +95,7 @@ class Event extends ApiResource const CREDIT_NOTE_CREATED = 'credit_note.created'; const CREDIT_NOTE_UPDATED = 'credit_note.updated'; const CREDIT_NOTE_VOIDED = 'credit_note.voided'; + const CUSTOMER_CASH_BALANCE_TRANSACTION_CREATED = 'customer_cash_balance_transaction.created'; const CUSTOMER_CREATED = 'customer.created'; const CUSTOMER_DELETED = 'customer.deleted'; const CUSTOMER_DISCOUNT_CREATED = 'customer.discount.created'; @@ -120,23 +117,21 @@ class Event extends ApiResource const CUSTOMER_TAX_ID_DELETED = 'customer.tax_id.deleted'; const CUSTOMER_TAX_ID_UPDATED = 'customer.tax_id.updated'; const CUSTOMER_UPDATED = 'customer.updated'; - const CUSTOMER_CASH_BALANCE_TRANSACTION_CREATED = 'customer_cash_balance_transaction.created'; const FILE_CREATED = 'file.created'; const FINANCIAL_CONNECTIONS_ACCOUNT_CREATED = 'financial_connections.account.created'; const FINANCIAL_CONNECTIONS_ACCOUNT_DEACTIVATED = 'financial_connections.account.deactivated'; const FINANCIAL_CONNECTIONS_ACCOUNT_DISCONNECTED = 'financial_connections.account.disconnected'; const FINANCIAL_CONNECTIONS_ACCOUNT_REACTIVATED = 'financial_connections.account.reactivated'; const FINANCIAL_CONNECTIONS_ACCOUNT_REFRESHED_BALANCE = 'financial_connections.account.refreshed_balance'; - const FINANCIAL_CONNECTIONS_ACCOUNT_REFRESHED_INFERRED_BALANCES = 'financial_connections.account.refreshed_inferred_balances'; - const FINANCIAL_CONNECTIONS_ACCOUNT_REFRESHED_OWNERSHIP = 'financial_connections.account.refreshed_ownership'; - const FINANCIAL_CONNECTIONS_ACCOUNT_REFRESHED_TRANSACTIONS = 'financial_connections.account.refreshed_transactions'; - const FINANCIAL_CONNECTIONS_SESSION_UPDATED = 'financial_connections.session.updated'; const IDENTITY_VERIFICATION_SESSION_CANCELED = 'identity.verification_session.canceled'; const IDENTITY_VERIFICATION_SESSION_CREATED = 'identity.verification_session.created'; const IDENTITY_VERIFICATION_SESSION_PROCESSING = 'identity.verification_session.processing'; const IDENTITY_VERIFICATION_SESSION_REDACTED = 'identity.verification_session.redacted'; const IDENTITY_VERIFICATION_SESSION_REQUIRES_INPUT = 'identity.verification_session.requires_input'; const IDENTITY_VERIFICATION_SESSION_VERIFIED = 'identity.verification_session.verified'; + const INVOICEITEM_CREATED = 'invoiceitem.created'; + const INVOICEITEM_DELETED = 'invoiceitem.deleted'; + const INVOICEITEM_UPDATED = 'invoiceitem.updated'; const INVOICE_CREATED = 'invoice.created'; const INVOICE_DELETED = 'invoice.deleted'; const INVOICE_FINALIZATION_FAILED = 'invoice.finalization_failed'; @@ -150,21 +145,20 @@ class Event extends ApiResource const INVOICE_UPCOMING = 'invoice.upcoming'; const INVOICE_UPDATED = 'invoice.updated'; const INVOICE_VOIDED = 'invoice.voided'; - const INVOICEITEM_CREATED = 'invoiceitem.created'; - const INVOICEITEM_DELETED = 'invoiceitem.deleted'; - const INVOICEITEM_UPDATED = 'invoiceitem.updated'; const ISSUING_AUTHORIZATION_CREATED = 'issuing_authorization.created'; const ISSUING_AUTHORIZATION_REQUEST = 'issuing_authorization.request'; const ISSUING_AUTHORIZATION_UPDATED = 'issuing_authorization.updated'; - const ISSUING_CARD_CREATED = 'issuing_card.created'; - const ISSUING_CARD_UPDATED = 'issuing_card.updated'; const ISSUING_CARDHOLDER_CREATED = 'issuing_cardholder.created'; const ISSUING_CARDHOLDER_UPDATED = 'issuing_cardholder.updated'; + const ISSUING_CARD_CREATED = 'issuing_card.created'; + const ISSUING_CARD_UPDATED = 'issuing_card.updated'; const ISSUING_DISPUTE_CLOSED = 'issuing_dispute.closed'; const ISSUING_DISPUTE_CREATED = 'issuing_dispute.created'; const ISSUING_DISPUTE_FUNDS_REINSTATED = 'issuing_dispute.funds_reinstated'; const ISSUING_DISPUTE_SUBMITTED = 'issuing_dispute.submitted'; const ISSUING_DISPUTE_UPDATED = 'issuing_dispute.updated'; + const ISSUING_TOKEN_CREATED = 'issuing_token.created'; + const ISSUING_TOKEN_UPDATED = 'issuing_token.updated'; const ISSUING_TRANSACTION_CREATED = 'issuing_transaction.created'; const ISSUING_TRANSACTION_UPDATED = 'issuing_transaction.updated'; const MANDATE_UPDATED = 'mandate.updated'; @@ -187,6 +181,7 @@ class Event extends ApiResource const PAYOUT_CREATED = 'payout.created'; const PAYOUT_FAILED = 'payout.failed'; const PAYOUT_PAID = 'payout.paid'; + const PAYOUT_RECONCILIATION_COMPLETED = 'payout.reconciliation_completed'; const PAYOUT_UPDATED = 'payout.updated'; const PERSON_CREATED = 'person.created'; const PERSON_DELETED = 'person.deleted'; @@ -203,13 +198,9 @@ class Event extends ApiResource const PROMOTION_CODE_CREATED = 'promotion_code.created'; const PROMOTION_CODE_UPDATED = 'promotion_code.updated'; const QUOTE_ACCEPTED = 'quote.accepted'; - const QUOTE_ACCEPTING = 'quote.accepting'; const QUOTE_CANCELED = 'quote.canceled'; const QUOTE_CREATED = 'quote.created'; - const QUOTE_DRAFT = 'quote.draft'; const QUOTE_FINALIZED = 'quote.finalized'; - const QUOTE_REESTIMATED = 'quote.reestimated'; - const QUOTE_STALE = 'quote.stale'; const RADAR_EARLY_FRAUD_WARNING_CREATED = 'radar.early_fraud_warning.created'; const RADAR_EARLY_FRAUD_WARNING_UPDATED = 'radar.early_fraud_warning.updated'; const RECIPIENT_CREATED = 'recipient.created'; @@ -247,6 +238,7 @@ class Event extends ApiResource const SUBSCRIPTION_SCHEDULE_UPDATED = 'subscription_schedule.updated'; const TAX_RATE_CREATED = 'tax_rate.created'; const TAX_RATE_UPDATED = 'tax_rate.updated'; + const TAX_SETTINGS_UPDATED = 'tax.settings.updated'; const TERMINAL_READER_ACTION_FAILED = 'terminal.reader.action_failed'; const TERMINAL_READER_ACTION_SUCCEEDED = 'terminal.reader.action_succeeded'; const TEST_HELPERS_TEST_CLOCK_ADVANCING = 'test_helpers.test_clock.advancing'; @@ -290,4 +282,230 @@ class Event extends ApiResource const TREASURY_RECEIVED_CREDIT_FAILED = 'treasury.received_credit.failed'; const TREASURY_RECEIVED_CREDIT_SUCCEEDED = 'treasury.received_credit.succeeded'; const TREASURY_RECEIVED_DEBIT_CREATED = 'treasury.received_debit.created'; + + const TYPE_ACCOUNT_APPLICATION_AUTHORIZED = 'account.application.authorized'; + const TYPE_ACCOUNT_APPLICATION_DEAUTHORIZED = 'account.application.deauthorized'; + const TYPE_ACCOUNT_EXTERNAL_ACCOUNT_CREATED = 'account.external_account.created'; + const TYPE_ACCOUNT_EXTERNAL_ACCOUNT_DELETED = 'account.external_account.deleted'; + const TYPE_ACCOUNT_EXTERNAL_ACCOUNT_UPDATED = 'account.external_account.updated'; + const TYPE_ACCOUNT_UPDATED = 'account.updated'; + const TYPE_APPLICATION_FEE_CREATED = 'application_fee.created'; + const TYPE_APPLICATION_FEE_REFUNDED = 'application_fee.refunded'; + const TYPE_APPLICATION_FEE_REFUND_UPDATED = 'application_fee.refund.updated'; + const TYPE_BALANCE_AVAILABLE = 'balance.available'; + const TYPE_BILLING_PORTAL_CONFIGURATION_CREATED = 'billing_portal.configuration.created'; + const TYPE_BILLING_PORTAL_CONFIGURATION_UPDATED = 'billing_portal.configuration.updated'; + const TYPE_BILLING_PORTAL_SESSION_CREATED = 'billing_portal.session.created'; + const TYPE_CAPABILITY_UPDATED = 'capability.updated'; + const TYPE_CASH_BALANCE_FUNDS_AVAILABLE = 'cash_balance.funds_available'; + const TYPE_CHARGE_CAPTURED = 'charge.captured'; + const TYPE_CHARGE_DISPUTE_CLOSED = 'charge.dispute.closed'; + const TYPE_CHARGE_DISPUTE_CREATED = 'charge.dispute.created'; + const TYPE_CHARGE_DISPUTE_FUNDS_REINSTATED = 'charge.dispute.funds_reinstated'; + const TYPE_CHARGE_DISPUTE_FUNDS_WITHDRAWN = 'charge.dispute.funds_withdrawn'; + const TYPE_CHARGE_DISPUTE_UPDATED = 'charge.dispute.updated'; + const TYPE_CHARGE_EXPIRED = 'charge.expired'; + const TYPE_CHARGE_FAILED = 'charge.failed'; + const TYPE_CHARGE_PENDING = 'charge.pending'; + const TYPE_CHARGE_REFUNDED = 'charge.refunded'; + const TYPE_CHARGE_REFUND_UPDATED = 'charge.refund.updated'; + const TYPE_CHARGE_SUCCEEDED = 'charge.succeeded'; + const TYPE_CHARGE_UPDATED = 'charge.updated'; + const TYPE_CHECKOUT_SESSION_ASYNC_PAYMENT_FAILED = 'checkout.session.async_payment_failed'; + const TYPE_CHECKOUT_SESSION_ASYNC_PAYMENT_SUCCEEDED = 'checkout.session.async_payment_succeeded'; + const TYPE_CHECKOUT_SESSION_COMPLETED = 'checkout.session.completed'; + const TYPE_CHECKOUT_SESSION_EXPIRED = 'checkout.session.expired'; + const TYPE_COUPON_CREATED = 'coupon.created'; + const TYPE_COUPON_DELETED = 'coupon.deleted'; + const TYPE_COUPON_UPDATED = 'coupon.updated'; + const TYPE_CREDIT_NOTE_CREATED = 'credit_note.created'; + const TYPE_CREDIT_NOTE_UPDATED = 'credit_note.updated'; + const TYPE_CREDIT_NOTE_VOIDED = 'credit_note.voided'; + const TYPE_CUSTOMER_CASH_BALANCE_TRANSACTION_CREATED = 'customer_cash_balance_transaction.created'; + const TYPE_CUSTOMER_CREATED = 'customer.created'; + const TYPE_CUSTOMER_DELETED = 'customer.deleted'; + const TYPE_CUSTOMER_DISCOUNT_CREATED = 'customer.discount.created'; + const TYPE_CUSTOMER_DISCOUNT_DELETED = 'customer.discount.deleted'; + const TYPE_CUSTOMER_DISCOUNT_UPDATED = 'customer.discount.updated'; + const TYPE_CUSTOMER_SOURCE_CREATED = 'customer.source.created'; + const TYPE_CUSTOMER_SOURCE_DELETED = 'customer.source.deleted'; + const TYPE_CUSTOMER_SOURCE_EXPIRING = 'customer.source.expiring'; + const TYPE_CUSTOMER_SOURCE_UPDATED = 'customer.source.updated'; + const TYPE_CUSTOMER_SUBSCRIPTION_CREATED = 'customer.subscription.created'; + const TYPE_CUSTOMER_SUBSCRIPTION_DELETED = 'customer.subscription.deleted'; + const TYPE_CUSTOMER_SUBSCRIPTION_PAUSED = 'customer.subscription.paused'; + const TYPE_CUSTOMER_SUBSCRIPTION_PENDING_UPDATE_APPLIED = 'customer.subscription.pending_update_applied'; + const TYPE_CUSTOMER_SUBSCRIPTION_PENDING_UPDATE_EXPIRED = 'customer.subscription.pending_update_expired'; + const TYPE_CUSTOMER_SUBSCRIPTION_RESUMED = 'customer.subscription.resumed'; + const TYPE_CUSTOMER_SUBSCRIPTION_TRIAL_WILL_END = 'customer.subscription.trial_will_end'; + const TYPE_CUSTOMER_SUBSCRIPTION_UPDATED = 'customer.subscription.updated'; + const TYPE_CUSTOMER_TAX_ID_CREATED = 'customer.tax_id.created'; + const TYPE_CUSTOMER_TAX_ID_DELETED = 'customer.tax_id.deleted'; + const TYPE_CUSTOMER_TAX_ID_UPDATED = 'customer.tax_id.updated'; + const TYPE_CUSTOMER_UPDATED = 'customer.updated'; + const TYPE_FILE_CREATED = 'file.created'; + const TYPE_FINANCIAL_CONNECTIONS_ACCOUNT_CREATED = 'financial_connections.account.created'; + const TYPE_FINANCIAL_CONNECTIONS_ACCOUNT_DEACTIVATED = 'financial_connections.account.deactivated'; + const TYPE_FINANCIAL_CONNECTIONS_ACCOUNT_DISCONNECTED = 'financial_connections.account.disconnected'; + const TYPE_FINANCIAL_CONNECTIONS_ACCOUNT_REACTIVATED = 'financial_connections.account.reactivated'; + const TYPE_FINANCIAL_CONNECTIONS_ACCOUNT_REFRESHED_BALANCE = 'financial_connections.account.refreshed_balance'; + const TYPE_IDENTITY_VERIFICATION_SESSION_CANCELED = 'identity.verification_session.canceled'; + const TYPE_IDENTITY_VERIFICATION_SESSION_CREATED = 'identity.verification_session.created'; + const TYPE_IDENTITY_VERIFICATION_SESSION_PROCESSING = 'identity.verification_session.processing'; + const TYPE_IDENTITY_VERIFICATION_SESSION_REDACTED = 'identity.verification_session.redacted'; + const TYPE_IDENTITY_VERIFICATION_SESSION_REQUIRES_INPUT = 'identity.verification_session.requires_input'; + const TYPE_IDENTITY_VERIFICATION_SESSION_VERIFIED = 'identity.verification_session.verified'; + const TYPE_INVOICEITEM_CREATED = 'invoiceitem.created'; + const TYPE_INVOICEITEM_DELETED = 'invoiceitem.deleted'; + const TYPE_INVOICEITEM_UPDATED = 'invoiceitem.updated'; + const TYPE_INVOICE_CREATED = 'invoice.created'; + const TYPE_INVOICE_DELETED = 'invoice.deleted'; + const TYPE_INVOICE_FINALIZATION_FAILED = 'invoice.finalization_failed'; + const TYPE_INVOICE_FINALIZED = 'invoice.finalized'; + const TYPE_INVOICE_MARKED_UNCOLLECTIBLE = 'invoice.marked_uncollectible'; + const TYPE_INVOICE_PAID = 'invoice.paid'; + const TYPE_INVOICE_PAYMENT_ACTION_REQUIRED = 'invoice.payment_action_required'; + const TYPE_INVOICE_PAYMENT_FAILED = 'invoice.payment_failed'; + const TYPE_INVOICE_PAYMENT_SUCCEEDED = 'invoice.payment_succeeded'; + const TYPE_INVOICE_SENT = 'invoice.sent'; + const TYPE_INVOICE_UPCOMING = 'invoice.upcoming'; + const TYPE_INVOICE_UPDATED = 'invoice.updated'; + const TYPE_INVOICE_VOIDED = 'invoice.voided'; + const TYPE_ISSUING_AUTHORIZATION_CREATED = 'issuing_authorization.created'; + const TYPE_ISSUING_AUTHORIZATION_REQUEST = 'issuing_authorization.request'; + const TYPE_ISSUING_AUTHORIZATION_UPDATED = 'issuing_authorization.updated'; + const TYPE_ISSUING_CARDHOLDER_CREATED = 'issuing_cardholder.created'; + const TYPE_ISSUING_CARDHOLDER_UPDATED = 'issuing_cardholder.updated'; + const TYPE_ISSUING_CARD_CREATED = 'issuing_card.created'; + const TYPE_ISSUING_CARD_UPDATED = 'issuing_card.updated'; + const TYPE_ISSUING_DISPUTE_CLOSED = 'issuing_dispute.closed'; + const TYPE_ISSUING_DISPUTE_CREATED = 'issuing_dispute.created'; + const TYPE_ISSUING_DISPUTE_FUNDS_REINSTATED = 'issuing_dispute.funds_reinstated'; + const TYPE_ISSUING_DISPUTE_SUBMITTED = 'issuing_dispute.submitted'; + const TYPE_ISSUING_DISPUTE_UPDATED = 'issuing_dispute.updated'; + const TYPE_ISSUING_TOKEN_CREATED = 'issuing_token.created'; + const TYPE_ISSUING_TOKEN_UPDATED = 'issuing_token.updated'; + const TYPE_ISSUING_TRANSACTION_CREATED = 'issuing_transaction.created'; + const TYPE_ISSUING_TRANSACTION_UPDATED = 'issuing_transaction.updated'; + const TYPE_MANDATE_UPDATED = 'mandate.updated'; + const TYPE_ORDER_CREATED = 'order.created'; + const TYPE_PAYMENT_INTENT_AMOUNT_CAPTURABLE_UPDATED = 'payment_intent.amount_capturable_updated'; + const TYPE_PAYMENT_INTENT_CANCELED = 'payment_intent.canceled'; + const TYPE_PAYMENT_INTENT_CREATED = 'payment_intent.created'; + const TYPE_PAYMENT_INTENT_PARTIALLY_FUNDED = 'payment_intent.partially_funded'; + const TYPE_PAYMENT_INTENT_PAYMENT_FAILED = 'payment_intent.payment_failed'; + const TYPE_PAYMENT_INTENT_PROCESSING = 'payment_intent.processing'; + const TYPE_PAYMENT_INTENT_REQUIRES_ACTION = 'payment_intent.requires_action'; + const TYPE_PAYMENT_INTENT_SUCCEEDED = 'payment_intent.succeeded'; + const TYPE_PAYMENT_LINK_CREATED = 'payment_link.created'; + const TYPE_PAYMENT_LINK_UPDATED = 'payment_link.updated'; + const TYPE_PAYMENT_METHOD_ATTACHED = 'payment_method.attached'; + const TYPE_PAYMENT_METHOD_AUTOMATICALLY_UPDATED = 'payment_method.automatically_updated'; + const TYPE_PAYMENT_METHOD_DETACHED = 'payment_method.detached'; + const TYPE_PAYMENT_METHOD_UPDATED = 'payment_method.updated'; + const TYPE_PAYOUT_CANCELED = 'payout.canceled'; + const TYPE_PAYOUT_CREATED = 'payout.created'; + const TYPE_PAYOUT_FAILED = 'payout.failed'; + const TYPE_PAYOUT_PAID = 'payout.paid'; + const TYPE_PAYOUT_RECONCILIATION_COMPLETED = 'payout.reconciliation_completed'; + const TYPE_PAYOUT_UPDATED = 'payout.updated'; + const TYPE_PERSON_CREATED = 'person.created'; + const TYPE_PERSON_DELETED = 'person.deleted'; + const TYPE_PERSON_UPDATED = 'person.updated'; + const TYPE_PLAN_CREATED = 'plan.created'; + const TYPE_PLAN_DELETED = 'plan.deleted'; + const TYPE_PLAN_UPDATED = 'plan.updated'; + const TYPE_PRICE_CREATED = 'price.created'; + const TYPE_PRICE_DELETED = 'price.deleted'; + const TYPE_PRICE_UPDATED = 'price.updated'; + const TYPE_PRODUCT_CREATED = 'product.created'; + const TYPE_PRODUCT_DELETED = 'product.deleted'; + const TYPE_PRODUCT_UPDATED = 'product.updated'; + const TYPE_PROMOTION_CODE_CREATED = 'promotion_code.created'; + const TYPE_PROMOTION_CODE_UPDATED = 'promotion_code.updated'; + const TYPE_QUOTE_ACCEPTED = 'quote.accepted'; + const TYPE_QUOTE_CANCELED = 'quote.canceled'; + const TYPE_QUOTE_CREATED = 'quote.created'; + const TYPE_QUOTE_FINALIZED = 'quote.finalized'; + const TYPE_RADAR_EARLY_FRAUD_WARNING_CREATED = 'radar.early_fraud_warning.created'; + const TYPE_RADAR_EARLY_FRAUD_WARNING_UPDATED = 'radar.early_fraud_warning.updated'; + const TYPE_RECIPIENT_CREATED = 'recipient.created'; + const TYPE_RECIPIENT_DELETED = 'recipient.deleted'; + const TYPE_RECIPIENT_UPDATED = 'recipient.updated'; + const TYPE_REFUND_CREATED = 'refund.created'; + const TYPE_REFUND_UPDATED = 'refund.updated'; + const TYPE_REPORTING_REPORT_RUN_FAILED = 'reporting.report_run.failed'; + const TYPE_REPORTING_REPORT_RUN_SUCCEEDED = 'reporting.report_run.succeeded'; + const TYPE_REPORTING_REPORT_TYPE_UPDATED = 'reporting.report_type.updated'; + const TYPE_REVIEW_CLOSED = 'review.closed'; + const TYPE_REVIEW_OPENED = 'review.opened'; + const TYPE_SETUP_INTENT_CANCELED = 'setup_intent.canceled'; + const TYPE_SETUP_INTENT_CREATED = 'setup_intent.created'; + const TYPE_SETUP_INTENT_REQUIRES_ACTION = 'setup_intent.requires_action'; + const TYPE_SETUP_INTENT_SETUP_FAILED = 'setup_intent.setup_failed'; + const TYPE_SETUP_INTENT_SUCCEEDED = 'setup_intent.succeeded'; + const TYPE_SIGMA_SCHEDULED_QUERY_RUN_CREATED = 'sigma.scheduled_query_run.created'; + const TYPE_SKU_CREATED = 'sku.created'; + const TYPE_SKU_DELETED = 'sku.deleted'; + const TYPE_SKU_UPDATED = 'sku.updated'; + const TYPE_SOURCE_CANCELED = 'source.canceled'; + const TYPE_SOURCE_CHARGEABLE = 'source.chargeable'; + const TYPE_SOURCE_FAILED = 'source.failed'; + const TYPE_SOURCE_MANDATE_NOTIFICATION = 'source.mandate_notification'; + const TYPE_SOURCE_REFUND_ATTRIBUTES_REQUIRED = 'source.refund_attributes_required'; + const TYPE_SOURCE_TRANSACTION_CREATED = 'source.transaction.created'; + const TYPE_SOURCE_TRANSACTION_UPDATED = 'source.transaction.updated'; + const TYPE_SUBSCRIPTION_SCHEDULE_ABORTED = 'subscription_schedule.aborted'; + const TYPE_SUBSCRIPTION_SCHEDULE_CANCELED = 'subscription_schedule.canceled'; + const TYPE_SUBSCRIPTION_SCHEDULE_COMPLETED = 'subscription_schedule.completed'; + const TYPE_SUBSCRIPTION_SCHEDULE_CREATED = 'subscription_schedule.created'; + const TYPE_SUBSCRIPTION_SCHEDULE_EXPIRING = 'subscription_schedule.expiring'; + const TYPE_SUBSCRIPTION_SCHEDULE_RELEASED = 'subscription_schedule.released'; + const TYPE_SUBSCRIPTION_SCHEDULE_UPDATED = 'subscription_schedule.updated'; + const TYPE_TAX_RATE_CREATED = 'tax_rate.created'; + const TYPE_TAX_RATE_UPDATED = 'tax_rate.updated'; + const TYPE_TAX_SETTINGS_UPDATED = 'tax.settings.updated'; + const TYPE_TERMINAL_READER_ACTION_FAILED = 'terminal.reader.action_failed'; + const TYPE_TERMINAL_READER_ACTION_SUCCEEDED = 'terminal.reader.action_succeeded'; + const TYPE_TEST_HELPERS_TEST_CLOCK_ADVANCING = 'test_helpers.test_clock.advancing'; + const TYPE_TEST_HELPERS_TEST_CLOCK_CREATED = 'test_helpers.test_clock.created'; + const TYPE_TEST_HELPERS_TEST_CLOCK_DELETED = 'test_helpers.test_clock.deleted'; + const TYPE_TEST_HELPERS_TEST_CLOCK_INTERNAL_FAILURE = 'test_helpers.test_clock.internal_failure'; + const TYPE_TEST_HELPERS_TEST_CLOCK_READY = 'test_helpers.test_clock.ready'; + const TYPE_TOPUP_CANCELED = 'topup.canceled'; + const TYPE_TOPUP_CREATED = 'topup.created'; + const TYPE_TOPUP_FAILED = 'topup.failed'; + const TYPE_TOPUP_REVERSED = 'topup.reversed'; + const TYPE_TOPUP_SUCCEEDED = 'topup.succeeded'; + const TYPE_TRANSFER_CREATED = 'transfer.created'; + const TYPE_TRANSFER_REVERSED = 'transfer.reversed'; + const TYPE_TRANSFER_UPDATED = 'transfer.updated'; + const TYPE_TREASURY_CREDIT_REVERSAL_CREATED = 'treasury.credit_reversal.created'; + const TYPE_TREASURY_CREDIT_REVERSAL_POSTED = 'treasury.credit_reversal.posted'; + const TYPE_TREASURY_DEBIT_REVERSAL_COMPLETED = 'treasury.debit_reversal.completed'; + const TYPE_TREASURY_DEBIT_REVERSAL_CREATED = 'treasury.debit_reversal.created'; + const TYPE_TREASURY_DEBIT_REVERSAL_INITIAL_CREDIT_GRANTED = 'treasury.debit_reversal.initial_credit_granted'; + const TYPE_TREASURY_FINANCIAL_ACCOUNT_CLOSED = 'treasury.financial_account.closed'; + const TYPE_TREASURY_FINANCIAL_ACCOUNT_CREATED = 'treasury.financial_account.created'; + const TYPE_TREASURY_FINANCIAL_ACCOUNT_FEATURES_STATUS_UPDATED = 'treasury.financial_account.features_status_updated'; + const TYPE_TREASURY_INBOUND_TRANSFER_CANCELED = 'treasury.inbound_transfer.canceled'; + const TYPE_TREASURY_INBOUND_TRANSFER_CREATED = 'treasury.inbound_transfer.created'; + const TYPE_TREASURY_INBOUND_TRANSFER_FAILED = 'treasury.inbound_transfer.failed'; + const TYPE_TREASURY_INBOUND_TRANSFER_SUCCEEDED = 'treasury.inbound_transfer.succeeded'; + const TYPE_TREASURY_OUTBOUND_PAYMENT_CANCELED = 'treasury.outbound_payment.canceled'; + const TYPE_TREASURY_OUTBOUND_PAYMENT_CREATED = 'treasury.outbound_payment.created'; + const TYPE_TREASURY_OUTBOUND_PAYMENT_EXPECTED_ARRIVAL_DATE_UPDATED = 'treasury.outbound_payment.expected_arrival_date_updated'; + const TYPE_TREASURY_OUTBOUND_PAYMENT_FAILED = 'treasury.outbound_payment.failed'; + const TYPE_TREASURY_OUTBOUND_PAYMENT_POSTED = 'treasury.outbound_payment.posted'; + const TYPE_TREASURY_OUTBOUND_PAYMENT_RETURNED = 'treasury.outbound_payment.returned'; + const TYPE_TREASURY_OUTBOUND_TRANSFER_CANCELED = 'treasury.outbound_transfer.canceled'; + const TYPE_TREASURY_OUTBOUND_TRANSFER_CREATED = 'treasury.outbound_transfer.created'; + const TYPE_TREASURY_OUTBOUND_TRANSFER_EXPECTED_ARRIVAL_DATE_UPDATED = 'treasury.outbound_transfer.expected_arrival_date_updated'; + const TYPE_TREASURY_OUTBOUND_TRANSFER_FAILED = 'treasury.outbound_transfer.failed'; + const TYPE_TREASURY_OUTBOUND_TRANSFER_POSTED = 'treasury.outbound_transfer.posted'; + const TYPE_TREASURY_OUTBOUND_TRANSFER_RETURNED = 'treasury.outbound_transfer.returned'; + const TYPE_TREASURY_RECEIVED_CREDIT_CREATED = 'treasury.received_credit.created'; + const TYPE_TREASURY_RECEIVED_CREDIT_FAILED = 'treasury.received_credit.failed'; + const TYPE_TREASURY_RECEIVED_CREDIT_SUCCEEDED = 'treasury.received_credit.succeeded'; + const TYPE_TREASURY_RECEIVED_DEBIT_CREATED = 'treasury.received_debit.created'; } diff --git a/lib/Stripe/lib/Exception/ApiErrorException.php b/lib/Stripe/lib/Exception/ApiErrorException.php index 2acc13f7..81572bc8 100644 --- a/lib/Stripe/lib/Exception/ApiErrorException.php +++ b/lib/Stripe/lib/Exception/ApiErrorException.php @@ -202,10 +202,11 @@ public function setStripeCode($stripeCode) */ public function __toString() { + $parentStr = parent::__toString(); $statusStr = (null === $this->getHttpStatus()) ? '' : "(Status {$this->getHttpStatus()}) "; $idStr = (null === $this->getRequestId()) ? '' : "(Request {$this->getRequestId()}) "; - return "{$statusStr}{$idStr}{$this->getMessage()}"; + return "Error sending request to Stripe: {$statusStr}{$idStr}{$this->getMessage()}\n{$parentStr}"; } protected function constructErrorObject() diff --git a/lib/Stripe/lib/ExchangeRate.php b/lib/Stripe/lib/ExchangeRate.php index 0a304c0e..c2665cf5 100644 --- a/lib/Stripe/lib/ExchangeRate.php +++ b/lib/Stripe/lib/ExchangeRate.php @@ -5,17 +5,32 @@ namespace SimplePay\Vendor\Stripe; /** - * Exchange Rate objects allow you to determine the rates that SimplePay\Vendor\Stripe - * is currently using to convert from one currency to another. Since this number is - * variable throughout the day, there are various reasons why you might want to - * know the current rate (for example, to dynamically price an item for a user with - * a default payment in a foreign currency). - * - * If you want a guarantee that the charge is made with a certain exchange rate you - * expect is current, you can pass in exchange_rate to charges - * endpoints. If the value is no longer up to date, the charge won't go through. - * Please refer to our Exchange - * Rates API guide for more details. + * ExchangeRate objects allow you to determine the rates that SimplePay\Vendor\Stripe is currently + * using to convert from one currency to another. Since this number is variable + * throughout the day, there are various reasons why you might want to know the current + * rate (for example, to dynamically price an item for a user with a default + * payment in a foreign currency). + * + * Please refer to our Exchange Rates API guide for more details. + * + * [Note: this integration path is supported but no longer recommended] Additionally, + * you can guarantee that a charge is made with an exchange rate that you expect is + * current. To do so, you must pass in the exchange_rate to charges endpoints. If the + * value is no longer up to date, the charge won't go through. Please refer to our + * Using with charges guide for more details. + * + * ----- + * + * + * + * This Exchange Rates API is a Beta Service and is subject to Stripe's terms of service. You may use the API solely for the purpose of transacting on Stripe. For example, the API may be queried in order to: + * + * - localize prices for processing payments on Stripe + * - reconcile SimplePay\Vendor\Stripe transactions + * - determine how much money to send to a connected account + * - determine app fees to charge a connected account + * + * Using this Exchange Rates API beta for any purpose other than to transact on SimplePay\Vendor\Stripe is strictly prohibited and constitutes a violation of Stripe's terms of service. * * @property string $id Unique identifier for the object. Represented as the three-letter ISO currency code in lowercase. * @property string $object String representing the object's type. Objects of the same type share the same value. diff --git a/lib/Stripe/lib/File.php b/lib/Stripe/lib/File.php index 74002ade..8eeaf665 100644 --- a/lib/Stripe/lib/File.php +++ b/lib/Stripe/lib/File.php @@ -5,27 +5,25 @@ namespace SimplePay\Vendor\Stripe; /** - * This is an object representing a file hosted on Stripe's servers. The file may - * have been uploaded by yourself using the create file request (for - * example, when uploading dispute evidence) or it may have been created by SimplePay\Vendor\Stripe - * (for example, the results of a Sigma scheduled + * This object represents files hosted on Stripe's servers. You can upload + * files with the create file request + * (for example, when uploading dispute evidence). SimplePay\Vendor\Stripe also + * creates files independetly (for example, the results of a Sigma scheduled * query). * - * Related guide: File Upload - * Guide. + * Related guide: File upload guide * * @property string $id Unique identifier for the object. * @property string $object String representing the object's type. Objects of the same type share the same value. * @property int $created Time at which the object was created. Measured in seconds since the Unix epoch. - * @property null|int $expires_at The time at which the file expires and is no longer available in epoch seconds. - * @property null|string $filename A filename for the file, suitable for saving to a filesystem. + * @property null|int $expires_at The file expires and isn't available at this time in epoch seconds. + * @property null|string $filename The suitable name for saving the file to a filesystem. * @property null|\SimplePay\Vendor\Stripe\Collection<\SimplePay\Vendor\Stripe\FileLink> $links A list of file links that point at this file. * @property string $purpose The purpose of the uploaded file. - * @property int $size The size in bytes of the file object. - * @property null|string $title A user friendly title for the document. - * @property null|string $type The type of the file returned (e.g., csv, pdf, jpg, or png). - * @property null|string $url The URL from which the file can be downloaded using your live secret API key. + * @property int $size The size of the file object in bytes. + * @property null|string $title A suitable title for the document. + * @property null|string $type The returned file type (for example, csv, pdf, jpg, or png). + * @property null|string $url Use your live secret API key to download the file from this URL. */ class File extends ApiResource { diff --git a/lib/Stripe/lib/FileLink.php b/lib/Stripe/lib/FileLink.php index ecc20e2a..7d24e6dc 100644 --- a/lib/Stripe/lib/FileLink.php +++ b/lib/Stripe/lib/FileLink.php @@ -5,15 +5,15 @@ namespace SimplePay\Vendor\Stripe; /** - * To share the contents of a File object with non-SimplePay\Vendor\Stripe users, you - * can create a FileLink. FileLinks contain a URL that - * can be used to retrieve the contents of the file without authentication. + * To share the contents of a File object with non-SimplePay\Vendor\Stripe users, you can + * create a FileLink. FileLinks contain a URL that you can use to + * retrieve the contents of the file without authentication. * * @property string $id Unique identifier for the object. * @property string $object String representing the object's type. Objects of the same type share the same value. * @property int $created Time at which the object was created. Measured in seconds since the Unix epoch. - * @property bool $expired Whether this link is already expired. - * @property null|int $expires_at Time at which the link expires. + * @property bool $expired Returns if the link is already expired. + * @property null|int $expires_at Time that the link expires. * @property string|\SimplePay\Vendor\Stripe\File $file The file object this link points 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 \SimplePay\Vendor\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. diff --git a/lib/Stripe/lib/FinancialConnections/Account.php b/lib/Stripe/lib/FinancialConnections/Account.php index 311029e6..8ffb2e56 100644 --- a/lib/Stripe/lib/FinancialConnections/Account.php +++ b/lib/Stripe/lib/FinancialConnections/Account.php @@ -5,8 +5,7 @@ namespace SimplePay\Vendor\Stripe\FinancialConnections; /** - * A Financial Connections Account represents an account that exists outside of - * Stripe, to which you have been granted some degree of access. + * A Financial Connections Account represents an account that exists outside of Stripe, to which you have been granted some degree of access. * * @property string $id Unique identifier for the object. * @property string $object String representing the object's type. Objects of the same type share the same value. @@ -16,7 +15,6 @@ * @property string $category The type of the account. Account category is further divided in subcategory. * @property int $created Time at which the object was created. Measured in seconds since the Unix epoch. * @property null|string $display_name A human-readable name that has been assigned to this account, either by the account holder or by the institution. - * @property null|\SimplePay\Vendor\Stripe\StripeObject $inferred_balances_refresh The state of the most recent attempt to refresh the account's inferred balance history. * @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. @@ -25,16 +23,13 @@ * @property null|string[] $permissions The list of permissions granted by this account. * @property string $status The status of the link to the account. * @property string $subcategory

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. - * @property null|\SimplePay\Vendor\Stripe\StripeObject $transaction_refresh The state of the most recent attempt to refresh the account transactions. */ class Account extends \SimplePay\Vendor\Stripe\ApiResource { const OBJECT_NAME = 'financial_connections.account'; use \SimplePay\Vendor\Stripe\ApiOperations\All; - use \SimplePay\Vendor\Stripe\ApiOperations\NestedResource; use \SimplePay\Vendor\Stripe\ApiOperations\Retrieve; const CATEGORY_CASH = 'cash'; @@ -77,7 +72,7 @@ public function disconnect($params = null, $opts = null) * * @throws \SimplePay\Vendor\Stripe\Exception\ApiErrorException if the request fails * - * @return \SimplePay\Vendor\Stripe\Collection<\SimplePay\Vendor\Stripe\FinancialConnections\AccountOwner> list of BankConnectionsResourceOwners + * @return \SimplePay\Vendor\Stripe\Collection<\SimplePay\Vendor\Stripe\FinancialConnections\AccountOwner> list of account owners */ public static function allOwners($id, $params = null, $opts = null) { @@ -105,20 +100,4 @@ public function refreshAccount($params = null, $opts = null) return $this; } - - const PATH_INFERRED_BALANCES = '/inferred_balances'; - - /** - * @param string $id the ID of the account on which to retrieve the financial connections account inferred balances - * @param null|array $params - * @param null|array|string $opts - * - * @throws \SimplePay\Vendor\Stripe\Exception\ApiErrorException if the request fails - * - * @return \SimplePay\Vendor\Stripe\Collection<\SimplePay\Vendor\Stripe\FinancialConnections\FinancialConnectionsAccountInferredBalance> the list of financial connections account inferred balances - */ - public static function allInferredBalances($id, $params = null, $opts = null) - { - return self::_allNestedResources($id, static::PATH_INFERRED_BALANCES, $params, $opts); - } } diff --git a/lib/Stripe/lib/FinancialConnections/AccountOwner.php b/lib/Stripe/lib/FinancialConnections/AccountOwner.php index 6a7e368e..db6d0aa7 100644 --- a/lib/Stripe/lib/FinancialConnections/AccountOwner.php +++ b/lib/Stripe/lib/FinancialConnections/AccountOwner.php @@ -5,6 +5,8 @@ namespace SimplePay\Vendor\Stripe\FinancialConnections; /** + * Describes an owner of an account. + * * @property string $id Unique identifier for the object. * @property string $object String representing the object's type. Objects of the same type share the same value. * @property null|string $email The email address of the owner. diff --git a/lib/Stripe/lib/FinancialConnections/InferredBalance.php b/lib/Stripe/lib/FinancialConnections/InferredBalance.php deleted file mode 100644 index 7fa470e3..00000000 --- a/lib/Stripe/lib/FinancialConnections/InferredBalance.php +++ /dev/null @@ -1,22 +0,0 @@ -The balances owed to (or by) the account holder.

Each key is a three-letter ISO currency code, in lowercase.

Each value is a integer amount. A positive amount indicates money owed to the account holder. A negative amount indicates money owed by the account holder.

- */ -class InferredBalance extends \SimplePay\Vendor\Stripe\ApiResource -{ - const OBJECT_NAME = 'financial_connections.account_inferred_balance'; - - use \SimplePay\Vendor\Stripe\ApiOperations\All; -} diff --git a/lib/Stripe/lib/FinancialConnections/Session.php b/lib/Stripe/lib/FinancialConnections/Session.php index e8d899c5..25f4c605 100644 --- a/lib/Stripe/lib/FinancialConnections/Session.php +++ b/lib/Stripe/lib/FinancialConnections/Session.php @@ -5,22 +5,18 @@ namespace SimplePay\Vendor\Stripe\FinancialConnections; /** - * A Financial Connections Session is the secure way to programmatically launch the - * client-side Stripe.js modal that lets your users link their accounts. + * A Financial Connections Session is the secure way to programmatically launch the client-side Stripe.js modal that lets your users link their accounts. * * @property string $id Unique identifier for the object. * @property string $object String representing the object's type. Objects of the same type share the same value. * @property null|\SimplePay\Vendor\Stripe\StripeObject $account_holder The account holder for whom accounts are collected in this session. * @property \SimplePay\Vendor\Stripe\Collection<\SimplePay\Vendor\Stripe\FinancialConnections\Account> $accounts The accounts that were collected as part of this Session. * @property string $client_secret A value that will be passed to the client to launch the authentication flow. - * @property \SimplePay\Vendor\Stripe\StripeObject $filters + * @property null|\SimplePay\Vendor\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 \SimplePay\Vendor\Stripe\StripeObject $manual_entry * @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 string $return_url For webview integrations only. Upon completing OAuth login in the native browser, the user will be redirected to this URL to return to your app. - * @property string $status The current state of the session. - * @property \SimplePay\Vendor\Stripe\StripeObject $status_details + * @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. */ class Session extends \SimplePay\Vendor\Stripe\ApiResource { @@ -28,9 +24,4 @@ class Session extends \SimplePay\Vendor\Stripe\ApiResource use \SimplePay\Vendor\Stripe\ApiOperations\Create; use \SimplePay\Vendor\Stripe\ApiOperations\Retrieve; - - const STATUS_CANCELLED = 'cancelled'; - const STATUS_FAILED = 'failed'; - const STATUS_PENDING = 'pending'; - const STATUS_SUCCEEDED = 'succeeded'; } diff --git a/lib/Stripe/lib/FinancialConnections/Transaction.php b/lib/Stripe/lib/FinancialConnections/Transaction.php deleted file mode 100644 index ff042d5e..00000000 --- a/lib/Stripe/lib/FinancialConnections/Transaction.php +++ /dev/null @@ -1,33 +0,0 @@ -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 string $status The status of the transaction. - * @property \SimplePay\Vendor\Stripe\StripeObject $status_transitions - * @property int $transacted_at Time at which the transaction was transacted. Measured in seconds since the Unix epoch. - * @property string $transaction_refresh The transaction_refresh object that last updated or created this transaction. - * @property int $updated Time at which the object was last updated. Measured in seconds since the Unix epoch. - */ -class Transaction extends \SimplePay\Vendor\Stripe\ApiResource -{ - const OBJECT_NAME = 'financial_connections.transaction'; - - use \SimplePay\Vendor\Stripe\ApiOperations\All; - - const STATUS_PENDING = 'pending'; - const STATUS_POSTED = 'posted'; - const STATUS_VOID = 'void'; -} diff --git a/lib/Stripe/lib/FundingInstructions.php b/lib/Stripe/lib/FundingInstructions.php index 4007354c..a3136ccf 100644 --- a/lib/Stripe/lib/FundingInstructions.php +++ b/lib/Stripe/lib/FundingInstructions.php @@ -5,14 +5,11 @@ namespace SimplePay\Vendor\Stripe; /** - * Each customer has a balance - * that is automatically applied to future invoices and payments using the - * customer_balance payment method. Customers can fund this balance by - * initiating a bank transfer to any account in the - * financial_addresses field. Related guide: Customer - * Balance - Funding Instructions to learn more. + * Each customer has a balance that is + * automatically applied to future invoices and payments using the customer_balance payment method. + * Customers can fund this balance by initiating a bank transfer to any account in the + * financial_addresses field. + * Related guide: Customer balance funding instructions. * * @property string $object String representing the object's type. Objects of the same type share the same value. * @property \SimplePay\Vendor\Stripe\StripeObject $bank_transfer diff --git a/lib/Stripe/lib/GiftCards/Card.php b/lib/Stripe/lib/GiftCards/Card.php deleted file mode 100644 index 51c2722f..00000000 --- a/lib/Stripe/lib/GiftCards/Card.php +++ /dev/null @@ -1,49 +0,0 @@ -ISO currency code, in lowercase. Must be a supported currency. - * @property null|\SimplePay\Vendor\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 \SimplePay\Vendor\Stripe\Collection<\SimplePay\Vendor\Stripe\GiftCards\Transaction> $transactions Transactions on this gift card. - */ -class Card extends \SimplePay\Vendor\Stripe\ApiResource -{ - const OBJECT_NAME = 'gift_cards.card'; - - use \SimplePay\Vendor\Stripe\ApiOperations\All; - use \SimplePay\Vendor\Stripe\ApiOperations\Create; - use \SimplePay\Vendor\Stripe\ApiOperations\Retrieve; - use \SimplePay\Vendor\Stripe\ApiOperations\Update; - - /** - * @param null|array $params - * @param null|array|string $opts - * - * @throws \SimplePay\Vendor\Stripe\Exception\ApiErrorException if the request fails - * - * @return \SimplePay\Vendor\Stripe\GiftCards\Card the validated card - */ - public static function validate($params = null, $opts = null) - { - $url = static::classUrl() . '/validate'; - list($response, $opts) = static::_staticRequest('post', $url, $params, $opts); - $obj = \SimplePay\Vendor\Stripe\Util\Util::convertToStripeObject($response->json, $opts); - $obj->setLastResponse($response); - - return $obj; - } -} diff --git a/lib/Stripe/lib/GiftCards/Transaction.php b/lib/Stripe/lib/GiftCards/Transaction.php deleted file mode 100644 index 670d5c8c..00000000 --- a/lib/Stripe/lib/GiftCards/Transaction.php +++ /dev/null @@ -1,77 +0,0 @@ -confirmed, - * held or canceled. A confirmed transaction - * is one that has added/deducted funds. A held transaction has - * created a temporary hold on funds, which can then be cancelled or confirmed. A - * held transaction can be confirmed into a confirmed - * transaction, or canceled into a canceled transaction. A - * canceled transaction has no effect on a gift card's balance. - * - * @property string $id Unique identifier for the object. - * @property string $object String representing the object's type. Objects of the same type share the same value. - * @property null|int $amount The amount of this transaction. A positive value indicates that funds were added to the gift card. A negative value indicates that funds were removed from the gift card. - * @property null|int $confirmed_at Time at which the transaction was confirmed. Measured in seconds since the Unix epoch. - * @property null|int $created Time at which the object was created. Measured in seconds since the Unix epoch. - * @property null|\SimplePay\Vendor\Stripe\StripeObject $created_by The related SimplePay\Vendor\Stripe objects that created this gift card transaction. - * @property null|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|string $gift_card The gift card that this transaction occurred on - * @property null|\SimplePay\Vendor\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 $status Status of this transaction, one of held, confirmed, or canceled. - * @property null|string $transfer_group A string that identifies this transaction as part of a group. See the Connect documentation for details. - */ -class Transaction extends \SimplePay\Vendor\Stripe\ApiResource -{ - const OBJECT_NAME = 'gift_cards.transaction'; - - use \SimplePay\Vendor\Stripe\ApiOperations\All; - use \SimplePay\Vendor\Stripe\ApiOperations\Create; - use \SimplePay\Vendor\Stripe\ApiOperations\Retrieve; - use \SimplePay\Vendor\Stripe\ApiOperations\Update; - - const STATUS_CANCELED = 'canceled'; - const STATUS_CONFIRMED = 'confirmed'; - const STATUS_HELD = 'held'; - const STATUS_INVALID = 'invalid'; - - /** - * @param null|array $params - * @param null|array|string $opts - * - * @throws \SimplePay\Vendor\Stripe\Exception\ApiErrorException if the request fails - * - * @return \SimplePay\Vendor\Stripe\GiftCards\Transaction the canceled transaction - */ - public function cancel($params = null, $opts = null) - { - $url = $this->instanceUrl() . '/cancel'; - list($response, $opts) = $this->_request('post', $url, $params, $opts); - $this->refreshFrom($response, $opts); - - return $this; - } - - /** - * @param null|array $params - * @param null|array|string $opts - * - * @throws \SimplePay\Vendor\Stripe\Exception\ApiErrorException if the request fails - * - * @return \SimplePay\Vendor\Stripe\GiftCards\Transaction the confirmed transaction - */ - public function confirm($params = null, $opts = null) - { - $url = $this->instanceUrl() . '/confirm'; - list($response, $opts) = $this->_request('post', $url, $params, $opts); - $this->refreshFrom($response, $opts); - - return $this; - } -} diff --git a/lib/Stripe/lib/HttpClient/ClientInterface.php b/lib/Stripe/lib/HttpClient/ClientInterface.php index 5f097d56..f5c4dd97 100644 --- a/lib/Stripe/lib/HttpClient/ClientInterface.php +++ b/lib/Stripe/lib/HttpClient/ClientInterface.php @@ -5,7 +5,7 @@ interface ClientInterface { /** - * @param string $method The HTTP method being used + * @param 'delete'|'get'|'post' $method The HTTP method being used * @param string $absUrl The URL being requested, including domain and protocol * @param array $headers Headers to be used in the request (full strings, not KV pairs) * @param array $params KV pairs for parameters. Can be nested for arrays and hashes diff --git a/lib/Stripe/lib/HttpClient/StreamingClientInterface.php b/lib/Stripe/lib/HttpClient/StreamingClientInterface.php index f8a91ed7..3e01d539 100644 --- a/lib/Stripe/lib/HttpClient/StreamingClientInterface.php +++ b/lib/Stripe/lib/HttpClient/StreamingClientInterface.php @@ -5,7 +5,7 @@ interface StreamingClientInterface { /** - * @param string $method The HTTP method being used + * @param 'delete'|'get'|'post' $method The HTTP method being used * @param string $absUrl The URL being requested, including domain and protocol * @param array $headers Headers to be used in the request (full strings, not KV pairs) * @param array $params KV pairs for parameters. Can be nested for arrays and hashes diff --git a/lib/Stripe/lib/Identity/VerificationReport.php b/lib/Stripe/lib/Identity/VerificationReport.php index e8f71c2a..9c55b8f4 100644 --- a/lib/Stripe/lib/Identity/VerificationReport.php +++ b/lib/Stripe/lib/Identity/VerificationReport.php @@ -5,32 +5,27 @@ namespace SimplePay\Vendor\Stripe\Identity; /** - * A VerificationReport is the result of an attempt to collect and verify data from - * a user. The collection of verification checks performed is determined from the - * type and options parameters used. You can find the - * result of each verification check performed in the appropriate sub-resource: - * document, id_number, selfie. + * A VerificationReport is the result of an attempt to collect and verify data from a user. + * The collection of verification checks performed is determined from the type and options + * parameters used. You can find the result of each verification check performed in the + * appropriate sub-resource: document, id_number, selfie. * - * Each VerificationReport contains a copy of any data collected by the user as - * well as reference IDs which can be used to access collected images through the - * FileUpload API. To configure and - * create VerificationReports, use the VerificationSession - * API. + * Each VerificationReport contains a copy of any data collected by the user as well as + * reference IDs which can be used to access collected images through the FileUpload + * API. To configure and create VerificationReports, use the + * VerificationSession API. * - * Related guides: Accessing - * verification results. + * Related guides: Accessing verification results. * * @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 \SimplePay\Vendor\Stripe\StripeObject $document Result from a document check - * @property \SimplePay\Vendor\Stripe\StripeObject $id_number Result from an id_number check + * @property null|\SimplePay\Vendor\Stripe\StripeObject $document Result from a document check + * @property null|\SimplePay\Vendor\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 \SimplePay\Vendor\Stripe\StripeObject $options - * @property \SimplePay\Vendor\Stripe\StripeObject $selfie Result from a selfie check - * @property string $type Type of report. + * @property null|\SimplePay\Vendor\Stripe\StripeObject $options + * @property null|\SimplePay\Vendor\Stripe\StripeObject $selfie Result from a selfie check + * @property null|string $type Type of report. * @property null|string $verification_session ID of the VerificationSession that created this report. */ class VerificationReport extends \SimplePay\Vendor\Stripe\ApiResource diff --git a/lib/Stripe/lib/Identity/VerificationSession.php b/lib/Stripe/lib/Identity/VerificationSession.php index 587c5733..9b74abf1 100644 --- a/lib/Stripe/lib/Identity/VerificationSession.php +++ b/lib/Stripe/lib/Identity/VerificationSession.php @@ -5,20 +5,17 @@ namespace SimplePay\Vendor\Stripe\Identity; /** - * A VerificationSession guides you through the process of collecting and verifying - * the identities of your users. It contains details about the type of - * verification, such as what verification check to perform. - * Only create one VerificationSession for each verification in your system. + * A VerificationSession guides you through the process of collecting and verifying the identities + * of your users. It contains details about the type of verification, such as what verification + * check to perform. Only create one VerificationSession for + * each verification in your system. * - * A VerificationSession transitions through multiple statuses throughout its - * lifetime as it progresses through the verification flow. The VerificationSession - * contains the user's verified data after verification checks are complete. + * A VerificationSession transitions through multiple + * statuses throughout its lifetime as it progresses through + * the verification flow. The VerificationSession contains the user's verified data after + * verification checks are complete. * - * Related guide: The Verification - * Sessions API + * Related guide: The Verification Sessions API * * @property string $id Unique identifier for the object. * @property string $object String representing the object's type. Objects of the same type share the same value. @@ -28,10 +25,10 @@ * @property null|string|\SimplePay\Vendor\Stripe\Identity\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 \SimplePay\Vendor\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 \SimplePay\Vendor\Stripe\StripeObject $options + * @property null|\SimplePay\Vendor\Stripe\StripeObject $options A set of options for the session’s verification checks. * @property null|\SimplePay\Vendor\Stripe\StripeObject $redaction Redaction status of this VerificationSession. If the VerificationSession is not redacted, this field will be null. * @property string $status Status of this VerificationSession. Learn more about the lifecycle of sessions. - * @property string $type The type of verification check to be performed. + * @property null|string $type The type of verification check to be performed. * @property null|string $url The short-lived URL that you use to redirect a user to SimplePay\Vendor\Stripe to submit their identity information. This URL expires after 48 hours and can only be used once. Don’t store it, log it, send it in emails or expose it to anyone other than the user. Refer to our docs on verifying identity documents to learn how to redirect users to Stripe. * @property null|\SimplePay\Vendor\Stripe\StripeObject $verified_outputs The user’s verified data. */ diff --git a/lib/Stripe/lib/Invoice.php b/lib/Stripe/lib/Invoice.php index 7c1dcabc..3e4f91fd 100644 --- a/lib/Stripe/lib/Invoice.php +++ b/lib/Stripe/lib/Invoice.php @@ -5,59 +5,55 @@ namespace SimplePay\Vendor\Stripe; /** - * Invoices are statements of amounts owed by a customer, and are either generated - * one-off, or generated periodically from a subscription. + * Invoices are statements of amounts owed by a customer, and are either + * generated one-off, or generated periodically from a subscription. * - * They contain invoice - * items, and proration adjustments that may be caused by subscription - * upgrades/downgrades (if necessary). + * They contain invoice items, and proration adjustments + * that may be caused by subscription upgrades/downgrades (if necessary). * - * If your invoice is configured to be billed through automatic charges, SimplePay\Vendor\Stripe - * automatically finalizes your invoice and attempts payment. Note that finalizing - * the invoice, when - * automatic, does not happen immediately as the invoice is created. SimplePay\Vendor\Stripe - * waits until one hour after the last webhook was successfully sent (or the last + * If your invoice is configured to be billed through automatic charges, + * SimplePay\Vendor\Stripe automatically finalizes your invoice and attempts payment. Note + * that finalizing the invoice, + * when automatic, does + * not happen immediately as the invoice is created. SimplePay\Vendor\Stripe waits + * until one hour after the last webhook was successfully sent (or the last * webhook timed out after failing). If you (and the platforms you may have - * connected to) have no webhooks configured, SimplePay\Vendor\Stripe waits one hour after creation - * to finalize the invoice. + * connected to) have no webhooks configured, SimplePay\Vendor\Stripe waits one hour after + * creation to finalize the invoice. * - * If your invoice is configured to be billed by sending an email, then based on - * your email - * settings, SimplePay\Vendor\Stripe will email the invoice to your customer and await payment. - * These emails can contain a link to a hosted page to pay the invoice. + * If your invoice is configured to be billed by sending an email, then based on your + * email settings, + * SimplePay\Vendor\Stripe will email the invoice to your customer and await payment. These + * emails can contain a link to a hosted page to pay the invoice. * - * SimplePay\Vendor\Stripe applies any customer credit on the account before determining the amount - * due for the invoice (i.e., the amount that will be actually charged). If the - * amount due for the invoice is less than Stripe's minimum allowed - * charge per currency, the invoice is automatically marked paid, and we add - * the amount due to the customer's credit balance which is applied to the next - * invoice. + * SimplePay\Vendor\Stripe applies any customer credit on the account before determining the + * amount due for the invoice (i.e., the amount that will be actually + * charged). If the amount due for the invoice is less than Stripe's minimum allowed charge + * per currency, the + * invoice is automatically marked paid, and we add the amount due to the + * customer's credit balance which is applied to the next invoice. * - * More details on the customer's credit balance are here. + * More details on the customer's credit balance are + * here. * - * Related guide: Send - * Invoices to Customers. + * Related guide: Send invoices to customers * - * @property string $id Unique identifier for the object. This property is always present unless the invoice is an upcoming invoice. See Retrieve an upcoming invoice for more details. + * @property null|string $id Unique identifier for the object. This property is always present unless the invoice is an upcoming invoice. See Retrieve an upcoming invoice for more details. * @property string $object String representing the object's type. Objects of the same type share the same value. * @property null|string $account_country The country of the business associated with this invoice, most often the business creating the invoice. * @property null|string $account_name The public name of the business associated with this invoice, most often the business creating the invoice. * @property null|(string|\SimplePay\Vendor\Stripe\TaxId)[] $account_tax_ids The account tax IDs associated with the invoice. Only editable when the invoice is a draft. * @property int $amount_due Final amount due at this time for this invoice. If the invoice's total is smaller than the minimum charge amount, for example, or if there is account credit that can be applied to the invoice, the 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_paid The amount, in %s, that was paid. - * @property int $amount_remaining The difference between amount_due and amount_paid, in %s. + * @property int $amount_paid The amount, in cents (or local equivalent), that was paid. + * @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|string|\SimplePay\Vendor\Stripe\StripeObject $application ID of the Connect Application that created the invoice. - * @property null|int $application_fee_amount The fee in %s that will be applied to the invoice and transferred to the application owner's SimplePay\Vendor\Stripe account when the invoice is paid. - * @property null|\SimplePay\Vendor\Stripe\StripeObject $applies_to + * @property null|int $application_fee_amount The fee in cents (or local equivalent) that will be applied to the invoice and transferred to the application owner's SimplePay\Vendor\Stripe account when the invoice is paid. * @property int $attempt_count Number of payment attempts made for this invoice, from the perspective of the payment retry schedule. Any payment attempt counts as the first attempt, and subsequently only automatic retries increment the attempt count. In other words, manual payment attempts after the first attempt do not affect the retry schedule. * @property bool $attempted Whether an attempt has been made to pay the invoice. An invoice is not attempted until 1 hour after the invoice.created webhook, for example, so you might not want to display that invoice as unpaid to your users. - * @property bool $auto_advance Controls whether SimplePay\Vendor\Stripe will perform automatic collection of the invoice. When false, the invoice's state will not automatically advance without an explicit action. + * @property null|bool $auto_advance Controls whether SimplePay\Vendor\Stripe performs automatic collection of the invoice. If false, the invoice's state doesn't automatically advance without an explicit action. * @property \SimplePay\Vendor\Stripe\StripeObject $automatic_tax - * @property null|string $billing_reason Indicates the reason why the invoice was created. subscription_cycle indicates an invoice created by a subscription advancing into a new period. subscription_create indicates an invoice created due to creating a subscription. subscription_update indicates an invoice created due to updating a subscription. subscription is set for all old invoices to indicate either a change to a subscription or a period advancement. manual is set for all invoices unrelated to a subscription (for example: created via the invoice editor). The upcoming value is reserved for simulated invoices per the upcoming invoice endpoint. subscription_threshold indicates an invoice created due to a billing threshold being reached. + * @property null|string $billing_reason

Indicates the reason why the invoice was created.

* manual: Unrelated to a subscription, for example, created via the invoice editor. * subscription: No longer in use. Applies to subscriptions from before May 2018 where no distinction was made between updates, cycles, and thresholds. * subscription_create: A new subscription was created. * subscription_cycle: A subscription advanced into a new period. * subscription_threshold: A subscription reached a billing threshold. * subscription_update: A subscription was updated. * upcoming: Reserved for simulated invoices, per the upcoming invoice endpoint.

* @property null|string|\SimplePay\Vendor\Stripe\Charge $charge ID of the latest charge generated for this invoice, if any. * @property string $collection_method Either charge_automatically, or send_invoice. When charging automatically, SimplePay\Vendor\Stripe will attempt to pay this invoice using the default source attached to the customer. When sending an invoice, SimplePay\Vendor\Stripe will email this invoice to the customer with payment instructions. * @property int $created Time at which the object was created. Measured in seconds since the Unix epoch. @@ -78,6 +74,7 @@ * @property null|\SimplePay\Vendor\Stripe\Discount $discount Describes the current discount applied to this invoice, if there is one. Not populated if there are multiple discounts. * @property null|(string|\SimplePay\Vendor\Stripe\Discount)[] $discounts The discounts applied to the invoice. Line item discounts are applied before invoice discounts. Use expand[]=discounts to expand each discount. * @property null|int $due_date The date on which payment for this invoice is due. This value will be null for invoices where collection_method=charge_automatically. + * @property null|int $effective_at The date when this invoice is in effect. Same as finalized_at unless overwritten. When defined, this value replaces the system-generated 'Date of issue' printed on the invoice PDF and receipt. * @property null|int $ending_balance Ending customer balance after the invoice is finalized. Invoices are finalized approximately an hour after successful webhook delivery or when payment collection is attempted for the invoice. If the invoice has not been finalized yet, this will be null. * @property null|string $footer Footer displayed on the invoice. * @property null|\SimplePay\Vendor\Stripe\StripeObject $from_invoice Details of the invoice that was cloned. See the revision documentation for more details. @@ -85,7 +82,7 @@ * @property null|string $invoice_pdf The link to download the PDF for the invoice. If the invoice has not been finalized yet, this will be null. * @property null|\SimplePay\Vendor\Stripe\StripeObject $last_finalization_error The error encountered during the previous attempt to finalize the invoice. This field is cleared when the invoice is successfully finalized. * @property null|string|\SimplePay\Vendor\Stripe\Invoice $latest_revision The ID of the most recent non-draft revision of this invoice - * @property \SimplePay\Vendor\Stripe\Collection<\SimplePay\Vendor\Stripe\InvoiceLineItem> $lines The individual line items that make up the invoice. lines is sorted as follows: invoice items in reverse chronological order, followed by the subscription, if any. + * @property \SimplePay\Vendor\Stripe\Collection<\SimplePay\Vendor\Stripe\InvoiceLineItem> $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 null|\SimplePay\Vendor\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|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. @@ -101,7 +98,8 @@ * @property int $pre_payment_credit_notes_amount Total amount of all pre-payment credit notes issued for this invoice. * @property null|string|\SimplePay\Vendor\Stripe\Quote $quote The quote this invoice was generated from. * @property null|string $receipt_number This is the transaction number that appears on email receipts sent for this invoice. - * @property null|\SimplePay\Vendor\Stripe\StripeObject $rendering_options Options for invoice PDF rendering. + * @property null|\SimplePay\Vendor\Stripe\StripeObject $rendering The rendering-related settings that control how the invoice is displayed on customer-facing surfaces such as PDF and Hosted Invoice Page. + * @property null|\SimplePay\Vendor\Stripe\StripeObject $rendering_options This is a legacy field that will be removed soon. For details about rendering_options, refer to rendering instead. Options for invoice PDF rendering. * @property null|\SimplePay\Vendor\Stripe\StripeObject $shipping_cost The details of the cost of shipping, including the ShippingRate applied on the invoice. * @property null|\SimplePay\Vendor\Stripe\StripeObject $shipping_details Shipping details for the invoice. The Invoice PDF will use the shipping_details value if it is set, otherwise the PDF will render the shipping address from the customer. * @property int $starting_balance Starting customer balance before the invoice is finalized. If the invoice has not been finalized yet, this will be the current customer balance. For revision invoices, this also includes any customer balance that was applied to the original invoice. @@ -109,15 +107,16 @@ * @property null|string $status The status of the invoice, one of draft, open, paid, uncollectible, or void. Learn more * @property \SimplePay\Vendor\Stripe\StripeObject $status_transitions * @property null|string|\SimplePay\Vendor\Stripe\Subscription $subscription The subscription that this invoice was prepared for, if any. - * @property int $subscription_proration_date Only set for upcoming invoices that preview prorations. The time used to calculate prorations. + * @property null|\SimplePay\Vendor\Stripe\StripeObject $subscription_details Details about the subscription that created this invoice. + * @property null|int $subscription_proration_date Only set for upcoming invoices that preview prorations. The time used to calculate prorations. * @property int $subtotal Total of all subscriptions, invoice items, and prorations on the invoice before any invoice level discount or exclusive tax is applied. Item discounts are already incorporated - * @property null|int $subtotal_excluding_tax The integer amount in %s representing the subtotal of the invoice before any invoice level discount or tax is applied. Item discounts are already incorporated + * @property null|int $subtotal_excluding_tax The integer amount in cents (or local equivalent) representing the subtotal of the invoice before any invoice level discount or tax is applied. Item discounts are already incorporated * @property null|int $tax The amount of tax on this invoice. This is the sum of all the tax amounts on this invoice. * @property null|string|\SimplePay\Vendor\Stripe\TestHelpers\TestClock $test_clock ID of the test clock this invoice belongs to. - * @property \SimplePay\Vendor\Stripe\StripeObject $threshold_reason + * @property null|\SimplePay\Vendor\Stripe\StripeObject $threshold_reason * @property int $total Total after discounts and taxes. * @property null|\SimplePay\Vendor\Stripe\StripeObject[] $total_discount_amounts The aggregate amounts calculated per discount across all line items. - * @property null|int $total_excluding_tax The integer amount in %s representing the total amount of the invoice including all discounts but excluding all tax. + * @property null|int $total_excluding_tax The integer amount in cents (or local equivalent) representing the total amount of the invoice including all discounts but excluding all tax. * @property \SimplePay\Vendor\Stripe\StripeObject[] $total_tax_amounts The aggregate amounts calculated per tax rate for all line items. * @property null|\SimplePay\Vendor\Stripe\StripeObject $transfer_data The account (if any) the payment will be attributed to for tax reporting, and where funds from the payment will be transferred to for the invoice. * @property null|int $webhooks_delivered_at Invoices are automatically paid or sent 1 hour after webhooks are delivered, or until all webhook delivery attempts have been exhausted. This field tracks the time when webhooks for this invoice were successfully delivered. If the invoice had no webhooks to deliver, this will be set while the invoice is being created. @@ -134,9 +133,6 @@ class Invoice extends ApiResource use ApiOperations\Search; use ApiOperations\Update; - const BILLING_CHARGE_AUTOMATICALLY = 'charge_automatically'; - const BILLING_SEND_INVOICE = 'send_invoice'; - const BILLING_REASON_AUTOMATIC_PENDING_INVOICE_ITEM_INVOICE = 'automatic_pending_invoice_item_invoice'; const BILLING_REASON_MANUAL = 'manual'; const BILLING_REASON_QUOTE_ACCEPT = 'quote_accept'; @@ -150,13 +146,19 @@ class Invoice extends ApiResource const COLLECTION_METHOD_CHARGE_AUTOMATICALLY = 'charge_automatically'; const COLLECTION_METHOD_SEND_INVOICE = 'send_invoice'; - const STATUS_DELETED = 'deleted'; + const CUSTOMER_TAX_EXEMPT_EXEMPT = 'exempt'; + const CUSTOMER_TAX_EXEMPT_NONE = 'none'; + const CUSTOMER_TAX_EXEMPT_REVERSE = 'reverse'; + const STATUS_DRAFT = 'draft'; const STATUS_OPEN = 'open'; const STATUS_PAID = 'paid'; const STATUS_UNCOLLECTIBLE = 'uncollectible'; const STATUS_VOID = 'void'; + const BILLING_CHARGE_AUTOMATICALLY = 'charge_automatically'; + const BILLING_SEND_INVOICE = 'send_invoice'; + /** * @param null|array $params * @param null|array|string $opts @@ -249,7 +251,7 @@ public static function upcoming($params = null, $opts = null) * * @throws \SimplePay\Vendor\Stripe\Exception\ApiErrorException if the request fails * - * @return \SimplePay\Vendor\Stripe\Collection<\SimplePay\Vendor\Stripe\InvoiceLineItem> list of InvoiceLineItems + * @return \SimplePay\Vendor\Stripe\Collection<\SimplePay\Vendor\Stripe\InvoiceLineItem> list of invoice line items */ public static function upcomingLines($params = null, $opts = null) { @@ -284,7 +286,7 @@ public function voidInvoice($params = null, $opts = null) * * @throws \SimplePay\Vendor\Stripe\Exception\ApiErrorException if the request fails * - * @return \SimplePay\Vendor\Stripe\SearchResult the invoice search results + * @return \SimplePay\Vendor\Stripe\SearchResult<\SimplePay\Vendor\Stripe\Invoice> the invoice search results */ public static function search($params = null, $opts = null) { @@ -296,13 +298,13 @@ public static function search($params = null, $opts = null) const PATH_LINES = '/lines'; /** - * @param string $id the ID of the invoice on which to retrieve the line items + * @param string $id the ID of the invoice on which to retrieve the invoice line items * @param null|array $params * @param null|array|string $opts * * @throws \SimplePay\Vendor\Stripe\Exception\ApiErrorException if the request fails * - * @return \SimplePay\Vendor\Stripe\Collection<\SimplePay\Vendor\Stripe\LineItem> the list of line items + * @return \SimplePay\Vendor\Stripe\Collection<\SimplePay\Vendor\Stripe\InvoiceLineItem> the list of invoice line items */ public static function allLines($id, $params = null, $opts = null) { diff --git a/lib/Stripe/lib/InvoiceItem.php b/lib/Stripe/lib/InvoiceItem.php index ac59ae7b..66b3d5c8 100644 --- a/lib/Stripe/lib/InvoiceItem.php +++ b/lib/Stripe/lib/InvoiceItem.php @@ -5,14 +5,17 @@ namespace SimplePay\Vendor\Stripe; /** - * Sometimes you want to add a charge or credit to a customer, but actually charge - * or credit the customer's card only at the end of a regular billing cycle. This - * is useful for combining several charges (to minimize per-transaction fees), or - * for having SimplePay\Vendor\Stripe tabulate your usage-based billing totals. + * Invoice Items represent the component lines of an invoice. An invoice item is added to an + * invoice by creating or updating it with an invoice field, at which point it will be included as + * an invoice line item within + * invoice.lines. * - * Related guide: Subscription - * Invoices. + * Invoice Items can be created before you are ready to actually send the invoice. This can be particularly useful when combined + * with a subscription. Sometimes you want to add a charge or credit to a customer, but actually charge + * or credit the customer’s card only at the end of a regular billing cycle. This is useful for combining several charges + * (to minimize per-transaction fees), or for having SimplePay\Vendor\Stripe tabulate your usage-based billing totals. + * + * Related guides: Integrate with the Invoicing API, Subscription Invoices. * * @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. @@ -32,7 +35,7 @@ * @property bool $proration Whether the invoice item was created automatically as a proration adjustment when the customer switched plans. * @property int $quantity Quantity of units for the invoice item. If the invoice item is a proration, the quantity of the subscription that the proration was computed for. * @property null|string|\SimplePay\Vendor\Stripe\Subscription $subscription The subscription that this invoice item has been created for, if any. - * @property string $subscription_item The subscription item that this invoice item has been created for, if any. + * @property null|string $subscription_item The subscription item that this invoice item has been created for, if any. * @property null|\SimplePay\Vendor\Stripe\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|\SimplePay\Vendor\Stripe\TestHelpers\TestClock $test_clock ID of the test clock this invoice item belongs to. * @property null|int $unit_amount Unit amount (in the currency specified) of the invoice item. diff --git a/lib/Stripe/lib/InvoiceLineItem.php b/lib/Stripe/lib/InvoiceLineItem.php index 159dade6..8f0eee51 100644 --- a/lib/Stripe/lib/InvoiceLineItem.php +++ b/lib/Stripe/lib/InvoiceLineItem.php @@ -7,15 +7,14 @@ /** * @property string $id Unique identifier for the object. * @property string $object String representing the object's type. Objects of the same type share the same value. - * @property int $amount The amount, in %s. - * @property null|int $amount_excluding_tax The integer amount in %s representing the amount for this line item, excluding all tax and discounts. - * @property null|\SimplePay\Vendor\Stripe\StripeObject $applies_to + * @property int $amount The amount, in cents (or local equivalent). + * @property null|int $amount_excluding_tax The integer amount in cents (or local equivalent) representing the amount for this line item, excluding all tax and discounts. * @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|\SimplePay\Vendor\Stripe\StripeObject[] $discount_amounts The amount of discount calculated per discount for this line item. * @property bool $discountable If true, discounts will apply to this line item. Always false for prorations. * @property null|(string|\SimplePay\Vendor\Stripe\Discount)[] $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 string $invoice_item The ID of the invoice item associated with this line item if any. + * @property null|string|\SimplePay\Vendor\Stripe\InvoiceItem $invoice_item The ID of the invoice item associated with this line item 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 \SimplePay\Vendor\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. Note that for line items with type=subscription this will reflect the metadata of the subscription that caused the line item to be created. * @property \SimplePay\Vendor\Stripe\StripeObject $period @@ -24,12 +23,12 @@ * @property bool $proration Whether this is a proration. * @property null|\SimplePay\Vendor\Stripe\StripeObject $proration_details Additional details for proration line items * @property null|int $quantity The quantity of the subscription, if the line item is a subscription or a proration. - * @property null|string $subscription The subscription that the invoice item pertains to, if any. - * @property string $subscription_item The subscription item that generated this invoice item. Left empty if the line item is not an explicit result of a subscription. - * @property \SimplePay\Vendor\Stripe\StripeObject[] $tax_amounts The amount of tax calculated per tax rate for this line item - * @property \SimplePay\Vendor\Stripe\TaxRate[] $tax_rates The tax rates which apply to the line item. + * @property null|string|\SimplePay\Vendor\Stripe\Subscription $subscription The subscription that the invoice item pertains to, if any. + * @property null|string|\SimplePay\Vendor\Stripe\SubscriptionItem $subscription_item The subscription item that generated this line item. Left empty if the line item is not an explicit result of a subscription. + * @property null|\SimplePay\Vendor\Stripe\StripeObject[] $tax_amounts The amount of tax calculated per tax rate for this line item + * @property null|\SimplePay\Vendor\Stripe\TaxRate[] $tax_rates The tax rates which apply to the line item. * @property string $type A string identifying the type of the source of this line item, either an invoiceitem or a subscription. - * @property null|string $unit_amount_excluding_tax The amount in %s representing the unit amount for this line item, excluding all tax and discounts. + * @property null|string $unit_amount_excluding_tax The amount in cents (or local equivalent) representing the unit amount for this line item, excluding all tax and discounts. */ class InvoiceLineItem extends ApiResource { diff --git a/lib/Stripe/lib/Issuing/Authorization.php b/lib/Stripe/lib/Issuing/Authorization.php index 977db8eb..69a74898 100644 --- a/lib/Stripe/lib/Issuing/Authorization.php +++ b/lib/Stripe/lib/Issuing/Authorization.php @@ -5,14 +5,11 @@ namespace SimplePay\Vendor\Stripe\Issuing; /** - * When an issued card is used to - * make a purchase, an Issuing Authorization object is created. Authorizations - * must be approved for the purchase to be completed successfully. + * When an issued card is used to make a purchase, an Issuing Authorization + * object is created. Authorizations must be approved for the + * purchase to be completed successfully. * - * Related guide: Issued Card - * Authorizations. + * Related guide: Issued card authorizations * * @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. @@ -34,6 +31,7 @@ * @property null|\SimplePay\Vendor\Stripe\StripeObject $pending_request The pending authorization request. This field will only be non-null during an issuing_authorization.request webhook. * @property \SimplePay\Vendor\Stripe\StripeObject[] $request_history History of every time a pending_request authorization was approved/declined, either by you directly or by SimplePay\Vendor\Stripe (e.g. based on your spending_controls). If the merchant changes the authorization by performing an incremental authorization, you can look at this field to see the previous requests for the authorization. This field can be helpful in determining why a given authorization was approved/declined. * @property string $status The current status of the authorization in its lifecycle. + * @property null|string|\SimplePay\Vendor\Stripe\Issuing\Token $token Token object used for this authorization. If a network token was not used for this authorization, this field will be null. * @property \SimplePay\Vendor\Stripe\Issuing\Transaction[] $transactions List of transactions associated with this authorization. * @property null|\SimplePay\Vendor\Stripe\StripeObject $treasury Treasury details related to this authorization if it was created on a FinancialAccount. * @property \SimplePay\Vendor\Stripe\StripeObject $verification_data @@ -47,6 +45,16 @@ class Authorization extends \SimplePay\Vendor\Stripe\ApiResource use \SimplePay\Vendor\Stripe\ApiOperations\Retrieve; use \SimplePay\Vendor\Stripe\ApiOperations\Update; + const AUTHORIZATION_METHOD_CHIP = 'chip'; + const AUTHORIZATION_METHOD_CONTACTLESS = 'contactless'; + const AUTHORIZATION_METHOD_KEYED_IN = 'keyed_in'; + const AUTHORIZATION_METHOD_ONLINE = 'online'; + const AUTHORIZATION_METHOD_SWIPE = 'swipe'; + + const STATUS_CLOSED = 'closed'; + const STATUS_PENDING = 'pending'; + const STATUS_REVERSED = 'reversed'; + /** * @param null|array $params * @param null|array|string $opts diff --git a/lib/Stripe/lib/Issuing/Card.php b/lib/Stripe/lib/Issuing/Card.php index c5d86091..c59abee2 100644 --- a/lib/Stripe/lib/Issuing/Card.php +++ b/lib/Stripe/lib/Issuing/Card.php @@ -5,30 +5,29 @@ namespace SimplePay\Vendor\Stripe\Issuing; /** - * You can create physical or - * virtual cards that are issued to cardholders. + * You can create physical or virtual cards that are issued to cardholders. * * @property string $id Unique identifier for the object. * @property string $object String representing the object's type. Objects of the same type share the same value. * @property string $brand The brand of the card. * @property null|string $cancellation_reason The reason why the card was canceled. - * @property \SimplePay\Vendor\Stripe\Issuing\Cardholder $cardholder

An Issuing Cardholder object represents an individual or business entity who is issued cards.

Related guide: How to create a Cardholder

+ * @property \SimplePay\Vendor\Stripe\Issuing\Cardholder $cardholder

An Issuing Cardholder object represents an individual or business entity who is issued cards.

Related guide: How to create a cardholder

* @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. Supported currencies are usd in the US, eur in the EU, and gbp in the UK. - * @property string $cvc The card's CVC. For security reasons, this is only available for virtual cards, and will be omitted unless you explicitly request it with 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|string $cvc The card's CVC. For security reasons, this is only available for virtual cards, and will be omitted unless you explicitly request it with the expand parameter. Additionally, it's only available via the "Retrieve a card" endpoint, not via "List all cards" or any other endpoint. * @property int $exp_month The expiration month of the card. * @property int $exp_year The expiration year of the card. * @property null|string $financial_account The financial account this card is attached to. * @property string $last4 The last 4 digits of the card number. * @property bool $livemode Has the value true if the object exists in live mode or the value false if the object exists in test mode. * @property \SimplePay\Vendor\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 $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|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|string|\SimplePay\Vendor\Stripe\Issuing\Card $replaced_by The latest card that replaces this card, if any. * @property null|string|\SimplePay\Vendor\Stripe\Issuing\Card $replacement_for The card this card replaces, if any. * @property null|string $replacement_reason The reason why the previous card needed to be replaced. * @property null|\SimplePay\Vendor\Stripe\StripeObject $shipping Where and how the card will be shipped. * @property \SimplePay\Vendor\Stripe\StripeObject $spending_controls - * @property string $status Whether authorizations can be approved on this card. + * @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|\SimplePay\Vendor\Stripe\StripeObject $wallets Information relating to digital wallets (like Apple Pay and Google Pay). */ @@ -40,4 +39,20 @@ class Card extends \SimplePay\Vendor\Stripe\ApiResource use \SimplePay\Vendor\Stripe\ApiOperations\Create; use \SimplePay\Vendor\Stripe\ApiOperations\Retrieve; use \SimplePay\Vendor\Stripe\ApiOperations\Update; + + const CANCELLATION_REASON_DESIGN_REJECTED = 'design_rejected'; + const CANCELLATION_REASON_LOST = 'lost'; + const CANCELLATION_REASON_STOLEN = 'stolen'; + + const REPLACEMENT_REASON_DAMAGED = 'damaged'; + const REPLACEMENT_REASON_EXPIRED = 'expired'; + const REPLACEMENT_REASON_LOST = 'lost'; + const REPLACEMENT_REASON_STOLEN = 'stolen'; + + const STATUS_ACTIVE = 'active'; + const STATUS_CANCELED = 'canceled'; + const STATUS_INACTIVE = 'inactive'; + + const TYPE_PHYSICAL = 'physical'; + const TYPE_VIRTUAL = 'virtual'; } diff --git a/lib/Stripe/lib/Issuing/Cardholder.php b/lib/Stripe/lib/Issuing/Cardholder.php index 19da351b..69845c1a 100644 --- a/lib/Stripe/lib/Issuing/Cardholder.php +++ b/lib/Stripe/lib/Issuing/Cardholder.php @@ -5,12 +5,9 @@ namespace SimplePay\Vendor\Stripe\Issuing; /** - * An Issuing Cardholder object represents an individual or business - * entity who is issued cards. + * An Issuing Cardholder object represents an individual or business entity who is issued cards. * - * Related guide: How to create a - * Cardholder + * Related guide: How to create a cardholder * * @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. @@ -23,10 +20,11 @@ * @property \SimplePay\Vendor\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 \SimplePay\Vendor\Stripe\StripeObject $requirements * @property null|\SimplePay\Vendor\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. + * @property string $type One of individual or company. See Choose a cardholder type for more details. */ class Cardholder extends \SimplePay\Vendor\Stripe\ApiResource { @@ -36,4 +34,11 @@ class Cardholder extends \SimplePay\Vendor\Stripe\ApiResource use \SimplePay\Vendor\Stripe\ApiOperations\Create; use \SimplePay\Vendor\Stripe\ApiOperations\Retrieve; use \SimplePay\Vendor\Stripe\ApiOperations\Update; + + const STATUS_ACTIVE = 'active'; + const STATUS_BLOCKED = 'blocked'; + const STATUS_INACTIVE = 'inactive'; + + const TYPE_COMPANY = 'company'; + const TYPE_INDIVIDUAL = 'individual'; } diff --git a/lib/Stripe/lib/Issuing/Dispute.php b/lib/Stripe/lib/Issuing/Dispute.php index 2a4bebfe..3359a785 100644 --- a/lib/Stripe/lib/Issuing/Dispute.php +++ b/lib/Stripe/lib/Issuing/Dispute.php @@ -5,13 +5,9 @@ namespace SimplePay\Vendor\Stripe\Issuing; /** - * As a card issuer, you can dispute - * transactions that the cardholder does not recognize, suspects to be fraudulent, - * or has other issues with. + * As a card issuer, you can dispute transactions that the cardholder does not recognize, suspects to be fraudulent, or has other issues with. * - * Related guide: Disputing - * Transactions + * Related guide: Issuing disputes * * @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. @@ -35,6 +31,12 @@ class Dispute extends \SimplePay\Vendor\Stripe\ApiResource use \SimplePay\Vendor\Stripe\ApiOperations\Retrieve; use \SimplePay\Vendor\Stripe\ApiOperations\Update; + const STATUS_EXPIRED = 'expired'; + const STATUS_LOST = 'lost'; + const STATUS_SUBMITTED = 'submitted'; + const STATUS_UNSUBMITTED = 'unsubmitted'; + const STATUS_WON = 'won'; + /** * @param null|array $params * @param null|array|string $opts diff --git a/lib/Stripe/lib/Issuing/Token.php b/lib/Stripe/lib/Issuing/Token.php new file mode 100644 index 00000000..6c002204 --- /dev/null +++ b/lib/Stripe/lib/Issuing/Token.php @@ -0,0 +1,42 @@ +card issuer, you can view and manage these tokens through Stripe. + * + * @property string $id Unique identifier for the object. + * @property string $object String representing the object's type. Objects of the same type share the same value. + * @property string|\SimplePay\Vendor\Stripe\Issuing\Card $card Card associated with this token. + * @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 string $network The token service provider / card network associated with the token. + * @property null|\SimplePay\Vendor\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. + */ +class Token extends \SimplePay\Vendor\Stripe\ApiResource +{ + const OBJECT_NAME = 'issuing.token'; + + use \SimplePay\Vendor\Stripe\ApiOperations\All; + use \SimplePay\Vendor\Stripe\ApiOperations\Retrieve; + use \SimplePay\Vendor\Stripe\ApiOperations\Update; + + const NETWORK_MASTERCARD = 'mastercard'; + const NETWORK_VISA = 'visa'; + + const STATUS_ACTIVE = 'active'; + const STATUS_DELETED = 'deleted'; + const STATUS_REQUESTED = 'requested'; + const STATUS_SUSPENDED = 'suspended'; + + const WALLET_PROVIDER_APPLE_PAY = 'apple_pay'; + const WALLET_PROVIDER_GOOGLE_PAY = 'google_pay'; + const WALLET_PROVIDER_SAMSUNG_PAY = 'samsung_pay'; +} diff --git a/lib/Stripe/lib/Issuing/Transaction.php b/lib/Stripe/lib/Issuing/Transaction.php index c4de2a68..50671aba 100644 --- a/lib/Stripe/lib/Issuing/Transaction.php +++ b/lib/Stripe/lib/Issuing/Transaction.php @@ -5,14 +5,11 @@ namespace SimplePay\Vendor\Stripe\Issuing; /** - * Any use of an issued card that - * results in funds entering or leaving your SimplePay\Vendor\Stripe account, such as a completed - * purchase or refund, is represented by an Issuing Transaction - * object. + * Any use of an issued card that results in funds entering or leaving + * your SimplePay\Vendor\Stripe account, such as a completed purchase or refund, is represented by an Issuing + * Transaction object. * - * Related guide: Issued Card - * Transactions. + * Related guide: Issued card transactions * * @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. @@ -30,8 +27,8 @@ * @property string $merchant_currency The currency with which the merchant is taking payment. * @property \SimplePay\Vendor\Stripe\StripeObject $merchant_data * @property \SimplePay\Vendor\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|\SimplePay\Vendor\Stripe\StripeObject $network_data Details about the transaction, such as processing dates, set by the card network. * @property null|\SimplePay\Vendor\Stripe\StripeObject $purchase_details Additional purchase information that is optionally provided by the merchant. + * @property null|string|\SimplePay\Vendor\Stripe\Issuing\Token $token Token object used for this transaction. If a network token was not used for this transaction, this field will be null. * @property null|\SimplePay\Vendor\Stripe\StripeObject $treasury Treasury details related to this transaction if it was created on a [FinancialAccount](/docs/api/treasury/financial_accounts * @property string $type The nature of the transaction. * @property null|string $wallet The digital wallet used for this transaction. One of apple_pay, google_pay, or samsung_pay. @@ -43,4 +40,11 @@ class Transaction extends \SimplePay\Vendor\Stripe\ApiResource use \SimplePay\Vendor\Stripe\ApiOperations\All; use \SimplePay\Vendor\Stripe\ApiOperations\Retrieve; use \SimplePay\Vendor\Stripe\ApiOperations\Update; + + const TYPE_CAPTURE = 'capture'; + const TYPE_REFUND = 'refund'; + + const WALLET_APPLE_PAY = 'apple_pay'; + const WALLET_GOOGLE_PAY = 'google_pay'; + const WALLET_SAMSUNG_PAY = 'samsung_pay'; } diff --git a/lib/Stripe/lib/LineItem.php b/lib/Stripe/lib/LineItem.php index 4209b855..ad3d08ac 100644 --- a/lib/Stripe/lib/LineItem.php +++ b/lib/Stripe/lib/LineItem.php @@ -15,11 +15,10 @@ * @property int $amount_total Total after discounts and taxes. * @property string $currency Three-letter ISO currency code, in lowercase. Must be a supported currency. * @property string $description An arbitrary string attached to the object. Often useful for displaying to users. Defaults to product name. - * @property \SimplePay\Vendor\Stripe\StripeObject[] $discounts The discounts applied to the line item. + * @property null|\SimplePay\Vendor\Stripe\StripeObject[] $discounts The discounts applied to the line item. * @property null|\SimplePay\Vendor\Stripe\Price $price The price used to generate the line item. - * @property string|\SimplePay\Vendor\Stripe\Product $product

The ID of the product for this line item.

This will always be the same as price.product.

* @property null|int $quantity The quantity of products being purchased. - * @property \SimplePay\Vendor\Stripe\StripeObject[] $taxes The taxes applied to the line item. + * @property null|\SimplePay\Vendor\Stripe\StripeObject[] $taxes The taxes applied to the line item. */ class LineItem extends ApiResource { diff --git a/lib/Stripe/lib/LoginLink.php b/lib/Stripe/lib/LoginLink.php index 45ecfebc..d9c10ff2 100644 --- a/lib/Stripe/lib/LoginLink.php +++ b/lib/Stripe/lib/LoginLink.php @@ -5,6 +5,8 @@ namespace SimplePay\Vendor\Stripe; /** + * Login Links are single-use login link for an Express account to access their SimplePay\Vendor\Stripe dashboard. + * * @property string $object String representing the object's type. Objects of the same type share the same value. * @property int $created Time at which the object was created. Measured in seconds since the Unix epoch. * @property string $url The URL for the login link. diff --git a/lib/Stripe/lib/Mandate.php b/lib/Stripe/lib/Mandate.php index 50d7e70a..75e5414b 100644 --- a/lib/Stripe/lib/Mandate.php +++ b/lib/Stripe/lib/Mandate.php @@ -5,18 +5,18 @@ namespace SimplePay\Vendor\Stripe; /** - * A Mandate is a record of the permission a customer has given you to debit their - * payment method. + * A Mandate is a record of the permission that your customer gives you to debit their payment method. * * @property string $id Unique identifier for the object. * @property string $object String representing the object's type. Objects of the same type share the same value. * @property \SimplePay\Vendor\Stripe\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 \SimplePay\Vendor\Stripe\StripeObject $multi_use + * @property null|\SimplePay\Vendor\Stripe\StripeObject $multi_use + * @property null|string $on_behalf_of The account (if any) that the mandate is intended for. * @property string|\SimplePay\Vendor\Stripe\PaymentMethod $payment_method ID of the payment method associated with this mandate. * @property \SimplePay\Vendor\Stripe\StripeObject $payment_method_details - * @property \SimplePay\Vendor\Stripe\StripeObject $single_use - * @property string $status The status of the mandate, which indicates whether it can be used to initiate a payment. + * @property null|\SimplePay\Vendor\Stripe\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. */ class Mandate extends ApiResource @@ -24,4 +24,11 @@ class Mandate extends ApiResource const OBJECT_NAME = 'mandate'; use ApiOperations\Retrieve; + + const STATUS_ACTIVE = 'active'; + const STATUS_INACTIVE = 'inactive'; + const STATUS_PENDING = 'pending'; + + const TYPE_MULTI_USE = 'multi_use'; + const TYPE_SINGLE_USE = 'single_use'; } diff --git a/lib/Stripe/lib/Order.php b/lib/Stripe/lib/Order.php deleted file mode 100644 index 8587e1c4..00000000 --- a/lib/Stripe/lib/Order.php +++ /dev/null @@ -1,124 +0,0 @@ -Orders overview - * - * @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_remaining - * @property int $amount_subtotal Order cost before any discounts or taxes are applied. A positive integer representing the subtotal of the order in the smallest currency unit (e.g., 100 cents to charge $1.00 or 100 to charge ¥100, a zero-decimal currency). - * @property int $amount_total Total order cost after discounts and taxes are applied. A positive integer representing the cost of the order in the smallest currency unit (e.g., 100 cents to charge $1.00 or 100 to charge ¥100, a zero-decimal currency). To submit an order, the total must be either 0 or at least $0.50 USD or equivalent in charge currency. - * @property null|string|\SimplePay\Vendor\Stripe\StripeObject $application ID of the Connect application that created the Order, if any. - * @property \SimplePay\Vendor\Stripe\StripeObject $automatic_tax - * @property null|\SimplePay\Vendor\Stripe\StripeObject $billing_details Customer billing details associated with the order. - * @property null|string $client_secret

The client secret of this Order. Used for client-side retrieval using a publishable key.

The client secret can be used to complete a payment for an Order from your frontend. It should not be stored, logged, embedded in URLs, or exposed to anyone other than the customer. Make sure that you have TLS enabled on any page that includes the client secret.

Refer to our docs for creating and processing an order to learn about how client_secret should be handled.

- * @property int $created Time at which the object was created. Measured in seconds since the Unix epoch. - * @property \SimplePay\Vendor\Stripe\StripeObject[] $credits The credits applied to the Order. At most 10 credits can be applied to an Order. - * @property string $currency Three-letter ISO currency code, in lowercase. Must be a supported currency. - * @property null|string|\SimplePay\Vendor\Stripe\Customer $customer The customer which this orders belongs to. - * @property null|string $description An arbitrary string attached to the object. Often useful for displaying to users. - * @property null|(string|\SimplePay\Vendor\Stripe\Discount)[] $discounts The discounts applied to the order. Use expand[]=discounts to expand each discount. - * @property null|string $ip_address A recent IP address of the purchaser used for tax reporting and tax location inference. - * @property \SimplePay\Vendor\Stripe\Collection<\SimplePay\Vendor\Stripe\LineItem> $line_items A list of line items the customer is ordering. Each line item includes information about the product, the quantity, and the resulting cost. There is a maximum of 100 line items. - * @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|\SimplePay\Vendor\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 \SimplePay\Vendor\Stripe\StripeObject $payment - * @property null|\SimplePay\Vendor\Stripe\StripeObject $shipping_cost The details of the customer cost of shipping, including the customer chosen ShippingRate. - * @property null|\SimplePay\Vendor\Stripe\StripeObject $shipping_details Customer shipping information associated with the order. - * @property string $status The overall status of the order. - * @property \SimplePay\Vendor\Stripe\StripeObject $tax_details - * @property \SimplePay\Vendor\Stripe\StripeObject $total_details - */ -class Order extends ApiResource -{ - const OBJECT_NAME = 'order'; - - use ApiOperations\All; - use ApiOperations\Create; - use ApiOperations\Retrieve; - use ApiOperations\Update; - - const STATUS_CANCELED = 'canceled'; - const STATUS_COMPLETE = 'complete'; - const STATUS_OPEN = 'open'; - const STATUS_PROCESSING = 'processing'; - const STATUS_SUBMITTED = 'submitted'; - - /** - * @param null|array $params - * @param null|array|string $opts - * - * @throws \SimplePay\Vendor\Stripe\Exception\ApiErrorException if the request fails - * - * @return \SimplePay\Vendor\Stripe\Order the canceled order - */ - public function cancel($params = null, $opts = null) - { - $url = $this->instanceUrl() . '/cancel'; - list($response, $opts) = $this->_request('post', $url, $params, $opts); - $this->refreshFrom($response, $opts); - - return $this; - } - - /** - * @param string $id - * @param null|array $params - * @param null|array|string $opts - * - * @throws \SimplePay\Vendor\Stripe\Exception\ApiErrorException if the request fails - * - * @return \SimplePay\Vendor\Stripe\Collection<\SimplePay\Vendor\Stripe\LineItem> list of LineItems - */ - public static function allLineItems($id, $params = null, $opts = null) - { - $url = static::resourceUrl($id) . '/line_items'; - list($response, $opts) = static::_staticRequest('get', $url, $params, $opts); - $obj = \SimplePay\Vendor\Stripe\Util\Util::convertToStripeObject($response->json, $opts); - $obj->setLastResponse($response); - - return $obj; - } - - /** - * @param null|array $params - * @param null|array|string $opts - * - * @throws \SimplePay\Vendor\Stripe\Exception\ApiErrorException if the request fails - * - * @return \SimplePay\Vendor\Stripe\Order the reopened order - */ - public function reopen($params = null, $opts = null) - { - $url = $this->instanceUrl() . '/reopen'; - list($response, $opts) = $this->_request('post', $url, $params, $opts); - $this->refreshFrom($response, $opts); - - return $this; - } - - /** - * @param null|array $params - * @param null|array|string $opts - * - * @throws \SimplePay\Vendor\Stripe\Exception\ApiErrorException if the request fails - * - * @return \SimplePay\Vendor\Stripe\Order the submited order - */ - public function submit($params = null, $opts = null) - { - $url = $this->instanceUrl() . '/submit'; - list($response, $opts) = $this->_request('post', $url, $params, $opts); - $this->refreshFrom($response, $opts); - - return $this; - } -} diff --git a/lib/Stripe/lib/PaymentIntent.php b/lib/Stripe/lib/PaymentIntent.php index 0d0390f1..cd12d3c7 100644 --- a/lib/Stripe/lib/PaymentIntent.php +++ b/lib/Stripe/lib/PaymentIntent.php @@ -5,25 +5,24 @@ namespace SimplePay\Vendor\Stripe; /** - * A PaymentIntent guides you through the process of collecting a payment from your - * customer. We recommend that you create exactly one PaymentIntent for each order - * or customer session in your system. You can reference the PaymentIntent later to + * A PaymentIntent guides you through the process of collecting a payment from your customer. + * We recommend that you create exactly one PaymentIntent for each order or + * customer session in your system. You can reference the PaymentIntent later to * see the history of payment attempts for a particular session. * - * A PaymentIntent transitions through multiple - * statuses throughout its lifetime as it interfaces with Stripe.js to perform + * A PaymentIntent transitions through + * multiple statuses + * throughout its lifetime as it interfaces with Stripe.js to perform * authentication flows and ultimately creates at most one successful charge. * - * Related guide: Payment Intents API. + * Related guide: Payment Intents API * * @property string $id Unique identifier for the object. * @property string $object String representing the object's type. Objects of the same type share the same value. * @property int $amount Amount intended to be collected by this PaymentIntent. A positive integer representing how much to charge in the smallest currency unit (e.g., 100 cents to charge $1.00 or 100 to charge ¥100, a zero-decimal currency). The minimum amount is $0.50 US or equivalent in charge currency. The amount value supports up to eight digits (e.g., a value of 99999999 for a USD charge of $999,999.99). * @property int $amount_capturable Amount that can be captured from this PaymentIntent. - * @property \SimplePay\Vendor\Stripe\StripeObject $amount_details - * @property int $amount_received Amount that was collected by this PaymentIntent. + * @property null|\SimplePay\Vendor\Stripe\StripeObject $amount_details + * @property int $amount_received Amount that this PaymentIntent collects. * @property null|string|\SimplePay\Vendor\Stripe\StripeObject $application ID of the Connect application that created the PaymentIntent. * @property null|int $application_fee_amount The amount of the application fee (if any) that will be requested to be applied to the payment and transferred to the application owner's SimplePay\Vendor\Stripe account. The amount of the application fee collected will be capped at the total payment amount. For more information, see the PaymentIntents use case for connected accounts. * @property null|\SimplePay\Vendor\Stripe\StripeObject $automatic_payment_methods Settings to configure compatible payment methods from the SimplePay\Vendor\Stripe Dashboard @@ -38,26 +37,26 @@ * @property null|string $description An arbitrary string attached to the object. Often useful for displaying to users. * @property null|string|\SimplePay\Vendor\Stripe\Invoice $invoice ID of the invoice that created this PaymentIntent, if it exists. * @property null|\SimplePay\Vendor\Stripe\StripeObject $last_payment_error The payment error encountered in the previous PaymentIntent confirmation. It will be cleared if the PaymentIntent is later updated for any reason. - * @property null|string|\SimplePay\Vendor\Stripe\Charge $latest_charge The latest charge created by this payment intent. + * @property null|string|\SimplePay\Vendor\Stripe\Charge $latest_charge The latest charge created by this PaymentIntent. * @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 \SimplePay\Vendor\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. For more information, see the documentation. + * @property \SimplePay\Vendor\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. Learn more about storing information in metadata. * @property null|\SimplePay\Vendor\Stripe\StripeObject $next_action If present, this property tells you what actions you need to take in order for your customer to fulfill a payment using the provided source. * @property null|string|\SimplePay\Vendor\Stripe\Account $on_behalf_of The account (if any) for which the funds of the PaymentIntent are intended. See the PaymentIntents use case for connected accounts for details. * @property null|string|\SimplePay\Vendor\Stripe\PaymentMethod $payment_method ID of the payment method used in this PaymentIntent. + * @property null|\SimplePay\Vendor\Stripe\StripeObject $payment_method_configuration_details Information about the payment method configuration used for this PaymentIntent. * @property null|\SimplePay\Vendor\Stripe\StripeObject $payment_method_options Payment-method-specific configuration for this PaymentIntent. * @property string[] $payment_method_types The list of payment method types (e.g. card) that this PaymentIntent is allowed to use. * @property null|\SimplePay\Vendor\Stripe\StripeObject $processing If present, this property tells you about the processing state of the payment. * @property null|string $receipt_email Email address that the receipt for the resulting payment will be sent to. If receipt_email is specified for a payment in live mode, a receipt will be sent regardless of your email settings. * @property null|string|\SimplePay\Vendor\Stripe\Review $review ID of the review associated with this PaymentIntent, if any. - * @property string $secret_key_confirmation Indicates whether confirmation for this PaymentIntent using a secret key is required or optional. * @property null|string $setup_future_usage

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

Providing this parameter 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. If no Customer was provided, the payment method can still be attached to a Customer after the transaction completes.

When processing card payments, SimplePay\Vendor\Stripe also uses setup_future_usage to dynamically optimize your payment flow and comply with regional legislation and network rules, such as SCA.

* @property null|\SimplePay\Vendor\Stripe\StripeObject $shipping Shipping information for this PaymentIntent. * @property null|string|\SimplePay\Vendor\Stripe\Account|\SimplePay\Vendor\Stripe\BankAccount|\SimplePay\Vendor\Stripe\Card|\SimplePay\Vendor\Stripe\Source $source This is a legacy field that will be removed in the future. It is the ID of the Source object that is associated with this PaymentIntent, if one was supplied. * @property null|string $statement_descriptor For non-card charges, you can use this value as the complete description that appears on your customers’ statements. Must contain at least one letter, maximum 22 characters. * @property null|string $statement_descriptor_suffix Provides information about a card payment that customers see on their statements. Concatenated with the prefix (shortened descriptor) or statement descriptor that’s set on the account to form the complete statement descriptor. Maximum 22 characters for the concatenated descriptor. * @property string $status Status of this PaymentIntent, one of requires_payment_method, requires_confirmation, requires_action, processing, requires_capture, canceled, or succeeded. Read more about each PaymentIntent status. - * @property null|\SimplePay\Vendor\Stripe\StripeObject $transfer_data The data with which to automatically create a Transfer when the payment is finalized. See the PaymentIntents use case for connected accounts for details. - * @property null|string $transfer_group A string that identifies the resulting payment as part of a group. See the PaymentIntents use case for connected accounts for details. + * @property null|\SimplePay\Vendor\Stripe\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 { @@ -69,8 +68,23 @@ class PaymentIntent extends ApiResource use ApiOperations\Search; use ApiOperations\Update; - const SECRET_KEY_CONFIRMATION_OPTIONAL = 'optional'; - const SECRET_KEY_CONFIRMATION_REQUIRED = 'required'; + const CANCELLATION_REASON_ABANDONED = 'abandoned'; + const CANCELLATION_REASON_AUTOMATIC = 'automatic'; + const CANCELLATION_REASON_DUPLICATE = 'duplicate'; + const CANCELLATION_REASON_FAILED_INVOICE = 'failed_invoice'; + const CANCELLATION_REASON_FRAUDULENT = 'fraudulent'; + const CANCELLATION_REASON_REQUESTED_BY_CUSTOMER = 'requested_by_customer'; + const CANCELLATION_REASON_VOID_INVOICE = 'void_invoice'; + + const CAPTURE_METHOD_AUTOMATIC = 'automatic'; + const CAPTURE_METHOD_AUTOMATIC_ASYNC = 'automatic_async'; + const CAPTURE_METHOD_MANUAL = 'manual'; + + const CONFIRMATION_METHOD_AUTOMATIC = 'automatic'; + const CONFIRMATION_METHOD_MANUAL = 'manual'; + + const SETUP_FUTURE_USAGE_OFF_SESSION = 'off_session'; + const SETUP_FUTURE_USAGE_ON_SESSION = 'on_session'; const STATUS_CANCELED = 'canceled'; const STATUS_PROCESSING = 'processing'; @@ -188,7 +202,7 @@ public function verifyMicrodeposits($params = null, $opts = null) * * @throws \SimplePay\Vendor\Stripe\Exception\ApiErrorException if the request fails * - * @return \SimplePay\Vendor\Stripe\SearchResult the payment intent search results + * @return \SimplePay\Vendor\Stripe\SearchResult<\SimplePay\Vendor\Stripe\PaymentIntent> the payment intent search results */ public static function search($params = null, $opts = null) { diff --git a/lib/Stripe/lib/PaymentLink.php b/lib/Stripe/lib/PaymentLink.php index 8b93cd58..60f2d365 100644 --- a/lib/Stripe/lib/PaymentLink.php +++ b/lib/Stripe/lib/PaymentLink.php @@ -5,33 +5,29 @@ namespace SimplePay\Vendor\Stripe; /** - * A payment link is a shareable URL that will take your customers to a hosted - * payment page. A payment link can be shared and used multiple times. + * A payment link is a shareable URL that will take your customers to a hosted payment page. A payment link can be shared and used multiple times. * - * When a customer opens a payment link it will open a new checkout session to - * render the payment page. You can use checkout - * session events to track payments through payment links. + * When a customer opens a payment link it will open a new checkout session to render the payment page. You can use checkout session events to track payments through payment links. * - * Related guide: Payment Links API + * Related guide: Payment Links API * * @property string $id Unique identifier for the object. * @property string $object String representing the object's type. Objects of the same type share the same value. * @property bool $active Whether the payment link's url is active. If false, customers visiting the URL will be shown a page saying that the link has been deactivated. * @property \SimplePay\Vendor\Stripe\StripeObject $after_completion * @property bool $allow_promotion_codes Whether user redeemable promotion codes are enabled. + * @property null|string|\SimplePay\Vendor\Stripe\StripeObject $application The ID of the Connect application that created the Payment Link. * @property null|int $application_fee_amount The amount of the application fee (if any) that will be requested to be applied to the payment and transferred to the application owner's SimplePay\Vendor\Stripe account. - * @property null|float $application_fee_percent This represents the percentage of the subscription invoice subtotal that will be transferred to the application owner's SimplePay\Vendor\Stripe account. + * @property null|float $application_fee_percent This represents the percentage of the subscription invoice total that will be transferred to the application owner's SimplePay\Vendor\Stripe account. * @property \SimplePay\Vendor\Stripe\StripeObject $automatic_tax * @property string $billing_address_collection Configuration for collecting the customer's billing address. * @property null|\SimplePay\Vendor\Stripe\StripeObject $consent_collection When set, provides configuration to gather active consent from customers. * @property string $currency Three-letter ISO currency code, in lowercase. Must be a supported currency. + * @property \SimplePay\Vendor\Stripe\StripeObject[] $custom_fields Collect additional information from your customer using custom fields. Up to 2 fields are supported. * @property \SimplePay\Vendor\Stripe\StripeObject $custom_text * @property string $customer_creation Configuration for Customer creation during checkout. * @property null|\SimplePay\Vendor\Stripe\StripeObject $invoice_creation Configuration for creating invoice for payment mode payment links. - * @property \SimplePay\Vendor\Stripe\Collection<\SimplePay\Vendor\Stripe\LineItem> $line_items The line items representing what is being sold. + * @property null|\SimplePay\Vendor\Stripe\Collection<\SimplePay\Vendor\Stripe\LineItem> $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 \SimplePay\Vendor\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|\SimplePay\Vendor\Stripe\Account $on_behalf_of The account on behalf of which to charge. See the Connect documentation for details. @@ -77,7 +73,7 @@ class PaymentLink extends ApiResource * * @throws \SimplePay\Vendor\Stripe\Exception\ApiErrorException if the request fails * - * @return \SimplePay\Vendor\Stripe\Collection<\SimplePay\Vendor\Stripe\LineItem> list of LineItems + * @return \SimplePay\Vendor\Stripe\Collection<\SimplePay\Vendor\Stripe\LineItem> list of line items */ public static function allLineItems($id, $params = null, $opts = null) { diff --git a/lib/Stripe/lib/PaymentMethod.php b/lib/Stripe/lib/PaymentMethod.php index b2c5a876..70eff44e 100644 --- a/lib/Stripe/lib/PaymentMethod.php +++ b/lib/Stripe/lib/PaymentMethod.php @@ -5,59 +5,55 @@ namespace SimplePay\Vendor\Stripe; /** - * PaymentMethod objects represent your customer's payment instruments. You can use - * them with PaymentIntents to - * collect payments or save them to Customer objects to store instrument details - * for future payments. + * PaymentMethod objects represent your customer's payment instruments. + * You can use them with PaymentIntents to collect payments or save them to + * Customer objects to store instrument details for future payments. * - * Related guides: Payment Methods and - * More Payment - * Scenarios. + * Related guides: Payment Methods and More Payment Scenarios. * * @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 \SimplePay\Vendor\Stripe\StripeObject $acss_debit - * @property \SimplePay\Vendor\Stripe\StripeObject $affirm - * @property \SimplePay\Vendor\Stripe\StripeObject $afterpay_clearpay - * @property \SimplePay\Vendor\Stripe\StripeObject $alipay - * @property \SimplePay\Vendor\Stripe\StripeObject $au_becs_debit - * @property \SimplePay\Vendor\Stripe\StripeObject $bacs_debit - * @property \SimplePay\Vendor\Stripe\StripeObject $bancontact + * @property null|\SimplePay\Vendor\Stripe\StripeObject $acss_debit + * @property null|\SimplePay\Vendor\Stripe\StripeObject $affirm + * @property null|\SimplePay\Vendor\Stripe\StripeObject $afterpay_clearpay + * @property null|\SimplePay\Vendor\Stripe\StripeObject $alipay + * @property null|\SimplePay\Vendor\Stripe\StripeObject $au_becs_debit + * @property null|\SimplePay\Vendor\Stripe\StripeObject $bacs_debit + * @property null|\SimplePay\Vendor\Stripe\StripeObject $bancontact * @property \SimplePay\Vendor\Stripe\StripeObject $billing_details - * @property \SimplePay\Vendor\Stripe\StripeObject $blik - * @property \SimplePay\Vendor\Stripe\StripeObject $boleto - * @property \SimplePay\Vendor\Stripe\StripeObject $card - * @property \SimplePay\Vendor\Stripe\StripeObject $card_present - * @property \SimplePay\Vendor\Stripe\StripeObject $cashapp + * @property null|\SimplePay\Vendor\Stripe\StripeObject $blik + * @property null|\SimplePay\Vendor\Stripe\StripeObject $boleto + * @property null|\SimplePay\Vendor\Stripe\StripeObject $card + * @property null|\SimplePay\Vendor\Stripe\StripeObject $card_present + * @property null|\SimplePay\Vendor\Stripe\StripeObject $cashapp * @property int $created Time at which the object was created. Measured in seconds since the Unix epoch. * @property null|string|\SimplePay\Vendor\Stripe\Customer $customer The ID of the Customer to which this PaymentMethod is saved. This will not be set when the PaymentMethod has not been saved to a Customer. - * @property \SimplePay\Vendor\Stripe\StripeObject $customer_balance - * @property \SimplePay\Vendor\Stripe\StripeObject $eps - * @property \SimplePay\Vendor\Stripe\StripeObject $fpx - * @property \SimplePay\Vendor\Stripe\StripeObject $giropay - * @property \SimplePay\Vendor\Stripe\StripeObject $grabpay - * @property \SimplePay\Vendor\Stripe\StripeObject $ideal - * @property \SimplePay\Vendor\Stripe\StripeObject $interac_present - * @property \SimplePay\Vendor\Stripe\StripeObject $klarna - * @property \SimplePay\Vendor\Stripe\StripeObject $konbini - * @property \SimplePay\Vendor\Stripe\StripeObject $link + * @property null|\SimplePay\Vendor\Stripe\StripeObject $customer_balance + * @property null|\SimplePay\Vendor\Stripe\StripeObject $eps + * @property null|\SimplePay\Vendor\Stripe\StripeObject $fpx + * @property null|\SimplePay\Vendor\Stripe\StripeObject $giropay + * @property null|\SimplePay\Vendor\Stripe\StripeObject $grabpay + * @property null|\SimplePay\Vendor\Stripe\StripeObject $ideal + * @property null|\SimplePay\Vendor\Stripe\StripeObject $interac_present + * @property null|\SimplePay\Vendor\Stripe\StripeObject $klarna + * @property null|\SimplePay\Vendor\Stripe\StripeObject $konbini + * @property null|\SimplePay\Vendor\Stripe\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 null|\SimplePay\Vendor\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 \SimplePay\Vendor\Stripe\StripeObject $oxxo - * @property \SimplePay\Vendor\Stripe\StripeObject $p24 - * @property \SimplePay\Vendor\Stripe\StripeObject $paynow - * @property \SimplePay\Vendor\Stripe\StripeObject $paypal - * @property \SimplePay\Vendor\Stripe\StripeObject $pix - * @property \SimplePay\Vendor\Stripe\StripeObject $promptpay - * @property \SimplePay\Vendor\Stripe\StripeObject $radar_options Options to configure Radar. See Radar Session for more information. - * @property \SimplePay\Vendor\Stripe\StripeObject $sepa_debit - * @property \SimplePay\Vendor\Stripe\StripeObject $sofort + * @property null|\SimplePay\Vendor\Stripe\StripeObject $oxxo + * @property null|\SimplePay\Vendor\Stripe\StripeObject $p24 + * @property null|\SimplePay\Vendor\Stripe\StripeObject $paynow + * @property null|\SimplePay\Vendor\Stripe\StripeObject $paypal + * @property null|\SimplePay\Vendor\Stripe\StripeObject $pix + * @property null|\SimplePay\Vendor\Stripe\StripeObject $promptpay + * @property null|\SimplePay\Vendor\Stripe\StripeObject $radar_options Options to configure Radar. See Radar Session for more information. + * @property null|\SimplePay\Vendor\Stripe\StripeObject $revolut_pay + * @property null|\SimplePay\Vendor\Stripe\StripeObject $sepa_debit + * @property null|\SimplePay\Vendor\Stripe\StripeObject $sofort * @property string $type The type of the PaymentMethod. An additional hash is included on the PaymentMethod with a name matching this value. It contains additional information specific to the PaymentMethod type. - * @property \SimplePay\Vendor\Stripe\StripeObject $us_bank_account - * @property \SimplePay\Vendor\Stripe\StripeObject $wechat_pay - * @property \SimplePay\Vendor\Stripe\StripeObject $zip + * @property null|\SimplePay\Vendor\Stripe\StripeObject $us_bank_account + * @property null|\SimplePay\Vendor\Stripe\StripeObject $wechat_pay + * @property null|\SimplePay\Vendor\Stripe\StripeObject $zip */ class PaymentMethod extends ApiResource { @@ -68,6 +64,41 @@ class PaymentMethod extends ApiResource use ApiOperations\Retrieve; use ApiOperations\Update; + const TYPE_ACSS_DEBIT = 'acss_debit'; + const TYPE_AFFIRM = 'affirm'; + const TYPE_AFTERPAY_CLEARPAY = 'afterpay_clearpay'; + const TYPE_ALIPAY = 'alipay'; + const TYPE_AU_BECS_DEBIT = 'au_becs_debit'; + const TYPE_BACS_DEBIT = 'bacs_debit'; + const TYPE_BANCONTACT = 'bancontact'; + const TYPE_BLIK = 'blik'; + const TYPE_BOLETO = 'boleto'; + const TYPE_CARD = 'card'; + const TYPE_CARD_PRESENT = 'card_present'; + const TYPE_CASHAPP = 'cashapp'; + const TYPE_CUSTOMER_BALANCE = 'customer_balance'; + const TYPE_EPS = 'eps'; + const TYPE_FPX = 'fpx'; + const TYPE_GIROPAY = 'giropay'; + const TYPE_GRABPAY = 'grabpay'; + const TYPE_IDEAL = 'ideal'; + const TYPE_INTERAC_PRESENT = 'interac_present'; + const TYPE_KLARNA = 'klarna'; + const TYPE_KONBINI = 'konbini'; + const TYPE_LINK = 'link'; + const TYPE_OXXO = 'oxxo'; + const TYPE_P24 = 'p24'; + const TYPE_PAYNOW = 'paynow'; + const TYPE_PAYPAL = 'paypal'; + const TYPE_PIX = 'pix'; + const TYPE_PROMPTPAY = 'promptpay'; + const TYPE_REVOLUT_PAY = 'revolut_pay'; + const TYPE_SEPA_DEBIT = 'sepa_debit'; + const TYPE_SOFORT = 'sofort'; + const TYPE_US_BANK_ACCOUNT = 'us_bank_account'; + const TYPE_WECHAT_PAY = 'wechat_pay'; + const TYPE_ZIP = 'zip'; + /** * @param null|array $params * @param null|array|string $opts diff --git a/lib/Stripe/lib/PaymentMethodConfiguration.php b/lib/Stripe/lib/PaymentMethodConfiguration.php new file mode 100644 index 00000000..da20db2b --- /dev/null +++ b/lib/Stripe/lib/PaymentMethodConfiguration.php @@ -0,0 +1,77 @@ +charge type: + * + * Direct configurations apply to payments created on your account, including Connect destination charges, Connect separate charges and transfers, and payments not involving Connect. + * + * Child configurations apply to payments created on your connected accounts using direct charges, and charges with the on_behalf_of parameter. + * + * Child configurations have a parent that sets default values and controls which settings connected accounts may override. You can specify a parent ID at payment time, and SimplePay\Vendor\Stripe will automatically resolve the connected account’s associated child configuration. Parent configurations are managed in the dashboard and are not available in this API. + * + * Related guides: + * - Payment Method Configurations API + * - Multiple configurations on dynamic payment methods + * - Multiple configurations for your Connect accounts + * + * @property string $id Unique identifier for the object. + * @property string $object String representing the object's type. Objects of the same type share the same value. + * @property null|\SimplePay\Vendor\Stripe\StripeObject $acss_debit + * @property bool $active Whether the configuration can be used for new payments. + * @property null|\SimplePay\Vendor\Stripe\StripeObject $affirm + * @property null|\SimplePay\Vendor\Stripe\StripeObject $afterpay_clearpay + * @property null|\SimplePay\Vendor\Stripe\StripeObject $alipay + * @property null|\SimplePay\Vendor\Stripe\StripeObject $apple_pay + * @property null|string $application For child configs, the Connect application associated with the configuration. + * @property null|\SimplePay\Vendor\Stripe\StripeObject $au_becs_debit + * @property null|\SimplePay\Vendor\Stripe\StripeObject $bacs_debit + * @property null|\SimplePay\Vendor\Stripe\StripeObject $bancontact + * @property null|\SimplePay\Vendor\Stripe\StripeObject $blik + * @property null|\SimplePay\Vendor\Stripe\StripeObject $boleto + * @property null|\SimplePay\Vendor\Stripe\StripeObject $card + * @property null|\SimplePay\Vendor\Stripe\StripeObject $cartes_bancaires + * @property null|\SimplePay\Vendor\Stripe\StripeObject $cashapp + * @property null|\SimplePay\Vendor\Stripe\StripeObject $eps + * @property null|\SimplePay\Vendor\Stripe\StripeObject $fpx + * @property null|\SimplePay\Vendor\Stripe\StripeObject $giropay + * @property null|\SimplePay\Vendor\Stripe\StripeObject $google_pay + * @property null|\SimplePay\Vendor\Stripe\StripeObject $grabpay + * @property null|\SimplePay\Vendor\Stripe\StripeObject $id_bank_transfer + * @property null|\SimplePay\Vendor\Stripe\StripeObject $ideal + * @property bool $is_default The default configuration is used whenever a payment method configuration is not specified. + * @property null|\SimplePay\Vendor\Stripe\StripeObject $jcb + * @property null|\SimplePay\Vendor\Stripe\StripeObject $klarna + * @property null|\SimplePay\Vendor\Stripe\StripeObject $konbini + * @property null|\SimplePay\Vendor\Stripe\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 null|\SimplePay\Vendor\Stripe\StripeObject $multibanco + * @property string $name The configuration's name. + * @property null|\SimplePay\Vendor\Stripe\StripeObject $netbanking + * @property null|\SimplePay\Vendor\Stripe\StripeObject $oxxo + * @property null|\SimplePay\Vendor\Stripe\StripeObject $p24 + * @property null|string $parent For child configs, the configuration's parent configuration. + * @property null|\SimplePay\Vendor\Stripe\StripeObject $pay_by_bank + * @property null|\SimplePay\Vendor\Stripe\StripeObject $paynow + * @property null|\SimplePay\Vendor\Stripe\StripeObject $paypal + * @property null|\SimplePay\Vendor\Stripe\StripeObject $promptpay + * @property null|\SimplePay\Vendor\Stripe\StripeObject $sepa_debit + * @property null|\SimplePay\Vendor\Stripe\StripeObject $sofort + * @property null|\SimplePay\Vendor\Stripe\StripeObject $upi + * @property null|\SimplePay\Vendor\Stripe\StripeObject $us_bank_account + * @property null|\SimplePay\Vendor\Stripe\StripeObject $wechat_pay + */ +class PaymentMethodConfiguration extends ApiResource +{ + const OBJECT_NAME = 'payment_method_configuration'; + + use ApiOperations\All; + use ApiOperations\Create; + use ApiOperations\Retrieve; + use ApiOperations\Update; +} diff --git a/lib/Stripe/lib/PaymentMethodDomain.php b/lib/Stripe/lib/PaymentMethodDomain.php new file mode 100644 index 00000000..e37caed7 --- /dev/null +++ b/lib/Stripe/lib/PaymentMethodDomain.php @@ -0,0 +1,49 @@ +Payment method domains. + * + * @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 \SimplePay\Vendor\Stripe\StripeObject $apple_pay Indicates the status of a specific payment method on a payment method domain. + * @property int $created Time at which the object was created. Measured in seconds since the Unix epoch. + * @property string $domain_name The domain name that this payment method domain object represents. + * @property bool $enabled Whether this payment method domain is enabled. If the domain is not enabled, payment methods that require a payment method domain will not appear in Elements. + * @property \SimplePay\Vendor\Stripe\StripeObject $google_pay Indicates the status of a specific payment method on a payment method domain. + * @property \SimplePay\Vendor\Stripe\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 \SimplePay\Vendor\Stripe\StripeObject $paypal Indicates the status of a specific payment method on a payment method domain. + */ +class PaymentMethodDomain extends ApiResource +{ + const OBJECT_NAME = 'payment_method_domain'; + + use ApiOperations\All; + use ApiOperations\Create; + use ApiOperations\Retrieve; + use ApiOperations\Update; + + /** + * @param null|array $params + * @param null|array|string $opts + * + * @throws \SimplePay\Vendor\Stripe\Exception\ApiErrorException if the request fails + * + * @return \SimplePay\Vendor\Stripe\PaymentMethodDomain the validated payment method domain + */ + public function validate($params = null, $opts = null) + { + $url = $this->instanceUrl() . '/validate'; + list($response, $opts) = $this->_request('post', $url, $params, $opts); + $this->refreshFrom($response, $opts); + + return $this; + } +} diff --git a/lib/Stripe/lib/Payout.php b/lib/Stripe/lib/Payout.php index 7053df01..0e47c3ca 100644 --- a/lib/Stripe/lib/Payout.php +++ b/lib/Stripe/lib/Payout.php @@ -5,36 +5,37 @@ namespace SimplePay\Vendor\Stripe; /** - * A Payout object is created when you receive funds from Stripe, or - * when you initiate a payout to either a bank account or debit card of a connected SimplePay\Vendor\Stripe account. You - * can retrieve individual payouts, as well as list all payouts. Payouts are made - * on varying schedules, - * depending on your country and industry. + * A Payout object is created when you receive funds from Stripe, or when you + * initiate a payout to either a bank account or debit card of a connected + * SimplePay\Vendor\Stripe account. You can retrieve individual payouts, + * and list all payouts. Payouts are made on varying + * schedules, depending on your country and + * industry. * - * Related guide: Receiving Payouts. + * Related guide: Receiving payouts * * @property string $id Unique identifier for the object. * @property string $object String representing the object's type. Objects of the same type share the same value. - * @property int $amount Amount (in %s) to be transferred to your bank account or debit card. - * @property int $arrival_date Date the payout is expected to arrive in the bank. This factors in delays like weekends or bank holidays. - * @property bool $automatic Returns true if the payout was created by an automated payout schedule, and false if it was requested manually. + * @property int $amount The amount (in cents (or local equivalent)) that transfers to your bank account or debit card. + * @property int $arrival_date Date that you can expect the payout to arrive in the bank. This factors in delays to account for weekends or bank holidays. + * @property bool $automatic Returns true if the payout is created by an automated payout schedule and false if it's requested manually. * @property null|string|\SimplePay\Vendor\Stripe\BalanceTransaction $balance_transaction ID of the balance transaction that describes the impact of this payout on your account balance. * @property int $created Time at which the object was created. Measured in seconds since the Unix epoch. * @property string $currency Three-letter 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|string|\SimplePay\Vendor\Stripe\BankAccount|\SimplePay\Vendor\Stripe\Card $destination ID of the bank account or card the payout was sent to. - * @property null|string|\SimplePay\Vendor\Stripe\BalanceTransaction $failure_balance_transaction If the payout failed or was canceled, this will be the ID of the balance transaction that reversed the initial balance transaction, and puts the funds from the failed payout back in your balance. - * @property null|string $failure_code Error code explaining reason for payout failure if available. See Types of payout failures for a list of failure codes. - * @property null|string $failure_message Message to user further explaining reason for payout failure if available. + * @property null|string|\SimplePay\Vendor\Stripe\BankAccount|\SimplePay\Vendor\Stripe\Card $destination ID of the bank account or card the payout is sent to. + * @property null|string|\SimplePay\Vendor\Stripe\BalanceTransaction $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 null|\SimplePay\Vendor\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 $method The method used to send this payout, which can be standard or instant. instant is only supported for payouts to debit cards. (See Instant payouts for marketplaces for more information.) + * @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|string|\SimplePay\Vendor\Stripe\Payout $original_payout If the payout reverses another, this is the ID of the original payout. - * @property null|string|\SimplePay\Vendor\Stripe\Payout $reversed_by If the payout was reversed, this is the ID of the payout that reverses this payout. - * @property string $source_type The source balance this payout came from. One of card, fpx, or bank_account. - * @property null|string $statement_descriptor Extra information about a payout to be displayed on the user's bank statement. - * @property string $status Current status of the payout: paid, pending, in_transit, canceled or failed. A payout is pending until it is submitted to the bank, when it becomes in_transit. The status then changes to paid if the transaction goes through, or to failed or canceled (within 5 business days). Some failed payouts may initially show as paid but then change to failed. + * @property string $reconciliation_status If completed, you can use the Balance Transactions API to list all balance transactions that are paid out in this payout. + * @property null|string|\SimplePay\Vendor\Stripe\Payout $reversed_by If the payout reverses, this is the ID of the payout that reverses this payout. + * @property string $source_type The source balance this payout came from, which can be one of the following: card, fpx, or bank_account. + * @property null|string $statement_descriptor Extra information about a payout that displays on the user's bank statement. + * @property string $status Current status of the payout: paid, pending, in_transit, canceled or failed. A payout is pending until it's submitted to the bank, when it becomes in_transit. The status changes to paid if the transaction succeeds, or to failed or canceled (within 5 business days). Some payouts that fail might initially show as paid, then change to failed. * @property string $type Can be bank_account or card. */ class Payout extends ApiResource @@ -46,6 +47,22 @@ class Payout extends ApiResource use ApiOperations\Retrieve; use ApiOperations\Update; + const METHOD_INSTANT = 'instant'; + const METHOD_STANDARD = 'standard'; + + const RECONCILIATION_STATUS_COMPLETED = 'completed'; + const RECONCILIATION_STATUS_IN_PROGRESS = 'in_progress'; + const RECONCILIATION_STATUS_NOT_APPLICABLE = 'not_applicable'; + + const STATUS_CANCELED = 'canceled'; + const STATUS_FAILED = 'failed'; + const STATUS_IN_TRANSIT = 'in_transit'; + const STATUS_PAID = 'paid'; + const STATUS_PENDING = 'pending'; + + const TYPE_BANK_ACCOUNT = 'bank_account'; + const TYPE_CARD = 'card'; + const FAILURE_ACCOUNT_CLOSED = 'account_closed'; const FAILURE_ACCOUNT_FROZEN = 'account_frozen'; const FAILURE_BANK_ACCOUNT_RESTRICTED = 'bank_account_restricted'; @@ -62,18 +79,6 @@ class Payout extends ApiResource const FAILURE_NO_ACCOUNT = 'no_account'; const FAILURE_UNSUPPORTED_CARD = 'unsupported_card'; - const METHOD_INSTANT = 'instant'; - const METHOD_STANDARD = 'standard'; - - const STATUS_CANCELED = 'canceled'; - const STATUS_FAILED = 'failed'; - const STATUS_IN_TRANSIT = 'in_transit'; - const STATUS_PAID = 'paid'; - const STATUS_PENDING = 'pending'; - - const TYPE_BANK_ACCOUNT = 'bank_account'; - const TYPE_CARD = 'card'; - /** * @param null|array $params * @param null|array|string $opts diff --git a/lib/Stripe/lib/Person.php b/lib/Stripe/lib/Person.php index 9981d712..70b9c910 100644 --- a/lib/Stripe/lib/Person.php +++ b/lib/Stripe/lib/Person.php @@ -7,48 +7,42 @@ /** * This is an object representing a person associated with a SimplePay\Vendor\Stripe account. * - * A platform cannot access a Standard or Express account's persons after the - * account starts onboarding, such as after generating an account link for the - * account. See the Standard onboarding - * or Express onboarding - * documentation for information about platform pre-filling and account - * onboarding steps. + * A platform cannot access a Standard or Express account's persons after the account starts onboarding, such as after generating an account link for the account. + * See the Standard onboarding or Express onboarding documentation for information about platform prefilling and account onboarding steps. * - * Related guide: Handling - * Identity Verification with the API. + * Related guide: Handling identity verification with the API * * @property string $id Unique identifier for the object. * @property string $object String representing the object's type. Objects of the same type share the same value. - * @property string $account The account the person is associated with. - * @property \SimplePay\Vendor\Stripe\StripeObject $address + * @property null|string $account The account the person is associated with. + * @property null|\SimplePay\Vendor\Stripe\StripeObject $additional_tos_acceptances + * @property null|\SimplePay\Vendor\Stripe\StripeObject $address * @property null|\SimplePay\Vendor\Stripe\StripeObject $address_kana The Kana variation of the person's address (Japan only). * @property null|\SimplePay\Vendor\Stripe\StripeObject $address_kanji The Kanji variation of the person's address (Japan only). * @property int $created Time at which the object was created. Measured in seconds since the Unix epoch. - * @property \SimplePay\Vendor\Stripe\StripeObject $dob + * @property null|\SimplePay\Vendor\Stripe\StripeObject $dob * @property null|string $email The person's email address. * @property null|string $first_name The person's first name. * @property null|string $first_name_kana The Kana variation of the person's first name (Japan only). * @property null|string $first_name_kanji The Kanji variation of the person's first name (Japan only). - * @property string[] $full_name_aliases A list of alternate names or aliases that the person is known by. - * @property null|\SimplePay\Vendor\Stripe\StripeObject $future_requirements Information about the upcoming new requirements for this person, including what information needs to be collected, and by when. + * @property null|string[] $full_name_aliases A list of alternate names or aliases that the person is known by. + * @property null|\SimplePay\Vendor\Stripe\StripeObject $future_requirements Information about the upcoming new requirements for this person, including what information needs to be collected, and by when. * @property null|string $gender The person's gender (International regulations require either "male" or "female"). - * @property bool $id_number_provided Whether the person's id_number was provided. - * @property bool $id_number_secondary_provided Whether the person's id_number_secondary was provided. + * @property null|bool $id_number_provided Whether the person's id_number was provided. True if either the full ID number was provided or if only the required part of the ID number was provided (ex. last four of an individual's SSN for the US indicated by ssn_last_4_provided). + * @property null|bool $id_number_secondary_provided Whether the person's id_number_secondary was provided. * @property null|string $last_name The person's last name. * @property null|string $last_name_kana The Kana variation of the person's last name (Japan only). * @property null|string $last_name_kanji The Kanji variation of the person's last name (Japan only). * @property null|string $maiden_name The person's maiden name. - * @property \SimplePay\Vendor\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|\SimplePay\Vendor\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 $nationality The country where the person is a national. * @property null|string $phone The person's phone number. - * @property string $political_exposure Indicates if the person or any of their representatives, family members, or other closely related persons, declares that they hold or have held an important public job or function, in any jurisdiction. - * @property \SimplePay\Vendor\Stripe\StripeObject $registered_address - * @property \SimplePay\Vendor\Stripe\StripeObject $relationship + * @property null|string $political_exposure Indicates if the person or any of their representatives, family members, or other closely related persons, declares that they hold or have held an important public job or function, in any jurisdiction. + * @property null|\SimplePay\Vendor\Stripe\StripeObject $registered_address + * @property null|\SimplePay\Vendor\Stripe\StripeObject $relationship * @property null|\SimplePay\Vendor\Stripe\StripeObject $requirements Information about the requirements for this person, including what information needs to be collected, and by when. - * @property bool $ssn_last_4_provided Whether the last four digits of the person's Social Security number have been provided (U.S. only). - * @property \SimplePay\Vendor\Stripe\StripeObject $verification + * @property null|bool $ssn_last_4_provided Whether the last four digits of the person's Social Security number have been provided (U.S. only). + * @property null|\SimplePay\Vendor\Stripe\StripeObject $verification */ class Person extends ApiResource { diff --git a/lib/Stripe/lib/Plan.php b/lib/Stripe/lib/Plan.php index de73e4bf..8cca7973 100644 --- a/lib/Stripe/lib/Plan.php +++ b/lib/Stripe/lib/Plan.php @@ -5,31 +5,21 @@ namespace SimplePay\Vendor\Stripe; /** - * You can now model subscriptions more flexibly using the Prices API. It replaces the Plans - * API and is backwards compatible to simplify your migration. + * You can now model subscriptions more flexibly using the Prices API. It replaces the Plans API and is backwards compatible to simplify your migration. * - * Plans define the base price, currency, and billing cycle for recurring purchases - * of products. Products help - * you track inventory or provisioning, and plans help you track pricing. Different - * physical goods or levels of service should be represented by products, and - * pricing options should be represented by plans. This approach lets you change - * prices without having to change your provisioning scheme. + * Plans define the base price, currency, and billing cycle for recurring purchases of products. + * Products help you track inventory or provisioning, and plans help you track pricing. Different physical goods or levels of service should be represented by products, and pricing options should be represented by plans. This approach lets you change prices without having to change your provisioning scheme. * - * For example, you might have a single "gold" product that has plans for - * $10/month, $100/year, €9/month, and €90/year. + * For example, you might have a single "gold" product that has plans for $10/month, $100/year, €9/month, and €90/year. * - * Related guides: Set up - * a subscription and more about products and prices. + * Related guides: Set up a subscription and more about products and prices. * * @property string $id Unique identifier for the object. * @property string $object String representing the object's type. Objects of the same type share the same value. * @property bool $active Whether the plan can be used for new purchases. * @property null|string $aggregate_usage Specifies a usage aggregation strategy for plans of usage_type=metered. Allowed values are sum for summing up all usage during a period, last_during_period for using the last usage record reported within a period, last_ever for using the last usage record ever (across period bounds) or max which uses the usage record with the maximum reported usage during a period. Defaults to sum. - * @property null|int $amount The unit amount in %s to be charged, represented as a whole integer if possible. Only set if billing_scheme=per_unit. - * @property null|string $amount_decimal The unit amount in %s to be charged, represented as a decimal string with at most 12 decimal places. Only set if billing_scheme=per_unit. + * @property null|int $amount The unit amount in cents (or local equivalent) to be charged, represented as a whole integer if possible. Only set if billing_scheme=per_unit. + * @property null|string $amount_decimal The unit amount in cents (or local equivalent) to be charged, represented as a decimal string with at most 12 decimal places. Only set if billing_scheme=per_unit. * @property string $billing_scheme Describes how to compute the price per period. Either per_unit or tiered. per_unit indicates that the fixed amount (specified in amount) will be charged per unit in quantity (for plans with usage_type=licensed), or per unit of total usage (for plans with usage_type=metered). tiered indicates that the unit pricing will be computed using a tiering strategy as defined using the tiers and tiers_mode attributes. * @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. @@ -39,7 +29,7 @@ * @property null|\SimplePay\Vendor\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 A brief description of the plan, hidden from customers. * @property null|string|\SimplePay\Vendor\Stripe\Product $product The product whose pricing this plan determines. - * @property \SimplePay\Vendor\Stripe\StripeObject[] $tiers Each element represents a pricing tier. This parameter requires billing_scheme to be set to tiered. See also the documentation for billing_scheme. + * @property null|\SimplePay\Vendor\Stripe\StripeObject[] $tiers Each element represents a pricing tier. This parameter requires billing_scheme to be set to tiered. See also the documentation for billing_scheme. * @property null|string $tiers_mode Defines if the tiering price should be graduated or volume based. In volume-based tiering, the maximum quantity within a period determines the per unit price. In graduated tiering, pricing can change as the quantity grows. * @property null|\SimplePay\Vendor\Stripe\StripeObject $transform_usage Apply a transformation to the reported usage or set quantity before computing the amount billed. Cannot be combined with tiers. * @property null|int $trial_period_days Default number of trial days when subscribing a customer to this plan using trial_from_plan=true. @@ -54,4 +44,23 @@ class Plan extends ApiResource use ApiOperations\Delete; use ApiOperations\Retrieve; use ApiOperations\Update; + + const AGGREGATE_USAGE_LAST_DURING_PERIOD = 'last_during_period'; + const AGGREGATE_USAGE_LAST_EVER = 'last_ever'; + const AGGREGATE_USAGE_MAX = 'max'; + const AGGREGATE_USAGE_SUM = 'sum'; + + const BILLING_SCHEME_PER_UNIT = 'per_unit'; + const BILLING_SCHEME_TIERED = 'tiered'; + + const INTERVAL_DAY = 'day'; + const INTERVAL_MONTH = 'month'; + const INTERVAL_WEEK = 'week'; + const INTERVAL_YEAR = 'year'; + + const TIERS_MODE_GRADUATED = 'graduated'; + const TIERS_MODE_VOLUME = 'volume'; + + const USAGE_TYPE_LICENSED = 'licensed'; + const USAGE_TYPE_METERED = 'metered'; } diff --git a/lib/Stripe/lib/Price.php b/lib/Stripe/lib/Price.php index b939a92c..b090eebd 100644 --- a/lib/Stripe/lib/Price.php +++ b/lib/Stripe/lib/Price.php @@ -5,23 +5,12 @@ namespace SimplePay\Vendor\Stripe; /** - * Prices define the unit cost, currency, and (optional) billing cycle for both - * recurring and one-time purchases of products. Products help you track - * inventory or provisioning, and prices help you track payment terms. Different - * physical goods or levels of service should be represented by products, and - * pricing options should be represented by prices. This approach lets you change - * prices without having to change your provisioning scheme. + * Prices define the unit cost, currency, and (optional) billing cycle for both recurring and one-time purchases of products. + * Products help you track inventory or provisioning, and prices help you track payment terms. Different physical goods or levels of service should be represented by products, and pricing options should be represented by prices. This approach lets you change prices without having to change your provisioning scheme. * - * For example, you might have a single "gold" product that has prices - * for $10/month, $100/year, and €9 once. + * For example, you might have a single "gold" product that has prices for $10/month, $100/year, and €9 once. * - * Related guides: Set up - * a subscription, create an invoice, - * and more about products and prices. + * Related guides: Set up a subscription, create an invoice, and more about products and prices. * * @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. @@ -29,22 +18,21 @@ * @property string $billing_scheme Describes how to compute the price per period. Either per_unit or tiered. per_unit indicates that the fixed amount (specified in unit_amount or unit_amount_decimal) will be charged per unit in quantity (for prices with usage_type=licensed), or per unit of total usage (for prices with usage_type=metered). tiered indicates that the unit pricing will be computed using a tiering strategy as defined using the tiers and tiers_mode attributes. * @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 \SimplePay\Vendor\Stripe\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|\SimplePay\Vendor\Stripe\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|\SimplePay\Vendor\Stripe\StripeObject $custom_unit_amount When set, provides configuration for the amount to be adjusted by the customer during Checkout Sessions and Payment Links. * @property bool $livemode Has the value true if the object exists in live mode or the value false if the object exists in test mode. * @property null|string $lookup_key A lookup key used to retrieve prices dynamically from a static string. This may be up to 200 characters. * @property \SimplePay\Vendor\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|\SimplePay\Vendor\Stripe\StripeObject $migrate_to Subscriptions using this price will be migrated to use the new referenced price. * @property null|string $nickname A brief description of the price, hidden from customers. * @property string|\SimplePay\Vendor\Stripe\Product $product The ID of the product this price is associated with. * @property null|\SimplePay\Vendor\Stripe\StripeObject $recurring The recurring components of a price such as interval and usage_type. - * @property null|string $tax_behavior Specifies whether the price is considered inclusive of taxes or exclusive of taxes. One of inclusive, exclusive, or unspecified. Once specified as either inclusive or exclusive, it cannot be changed. - * @property \SimplePay\Vendor\Stripe\StripeObject[] $tiers Each element represents a pricing tier. This parameter requires billing_scheme to be set to tiered. See also the documentation for billing_scheme. + * @property null|string $tax_behavior Only required if a default tax behavior was not provided in the SimplePay\Vendor\Stripe Tax settings. Specifies whether the price is considered inclusive of taxes or exclusive of taxes. One of inclusive, exclusive, or unspecified. Once specified as either inclusive or exclusive, it cannot be changed. + * @property null|\SimplePay\Vendor\Stripe\StripeObject[] $tiers Each element represents a pricing tier. This parameter requires billing_scheme to be set to tiered. See also the documentation for billing_scheme. * @property null|string $tiers_mode Defines if the tiering price should be graduated or volume based. In volume-based tiering, the maximum quantity within a period determines the per unit price. In graduated tiering, pricing can change as the quantity grows. * @property null|\SimplePay\Vendor\Stripe\StripeObject $transform_quantity Apply a transformation to the reported usage or set quantity before computing the amount billed. Cannot be combined with tiers. * @property string $type One of one_time or recurring depending on whether the price is for a one-time purchase or a recurring (subscription) purchase. - * @property null|int $unit_amount The unit amount in %s to be charged, represented as a whole integer if possible. Only set if billing_scheme=per_unit. - * @property null|string $unit_amount_decimal The unit amount in %s to be charged, represented as a decimal string with at most 12 decimal places. Only set if billing_scheme=per_unit. + * @property null|int $unit_amount The unit amount in cents (or local equivalent) to be charged, represented as a whole integer if possible. Only set if billing_scheme=per_unit. + * @property null|string $unit_amount_decimal The unit amount in cents (or local equivalent) to be charged, represented as a decimal string with at most 12 decimal places. Only set if billing_scheme=per_unit. */ class Price extends ApiResource { @@ -75,7 +63,7 @@ class Price extends ApiResource * * @throws \SimplePay\Vendor\Stripe\Exception\ApiErrorException if the request fails * - * @return \SimplePay\Vendor\Stripe\SearchResult the price search results + * @return \SimplePay\Vendor\Stripe\SearchResult<\SimplePay\Vendor\Stripe\Price> the price search results */ public static function search($params = null, $opts = null) { diff --git a/lib/Stripe/lib/Product.php b/lib/Stripe/lib/Product.php index a46f5bc6..2946d597 100644 --- a/lib/Stripe/lib/Product.php +++ b/lib/Stripe/lib/Product.php @@ -6,35 +6,26 @@ /** * Products describe the specific goods or services you offer to your customers. - * For example, you might offer a Standard and Premium version of your goods or - * service; each version would be a separate Product. They can be used in - * conjunction with Prices to - * configure pricing in Payment Links, Checkout, and Subscriptions. + * For example, you might offer a Standard and Premium version of your goods or service; each version would be a separate Product. + * They can be used in conjunction with Prices to configure pricing in Payment Links, Checkout, and Subscriptions. * - * Related guides: Set up - * a subscription, share a Payment - * Link, accept - * payments with Checkout, and more about Products and Prices + * Related guides: Set up a subscription, + * share a Payment Link, + * accept payments with Checkout, + * and more about Products and Prices * * @property string $id Unique identifier for the object. * @property string $object String representing the object's type. Objects of the same type share the same value. * @property bool $active Whether the product is currently available for purchase. - * @property null|string[] $attributes A list of up to 5 attributes that each SKU can provide values for (e.g., ["color", "size"]). - * @property null|string $caption A short one-line description of the product, meant to be displayable to the customer. Only applicable to products of type=good. * @property int $created Time at which the object was created. Measured in seconds since the Unix epoch. - * @property string[] $deactivate_on An array of connect application identifiers that cannot purchase this product. Only applicable to products of type=good. * @property null|string|\SimplePay\Vendor\Stripe\Price $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 \SimplePay\Vendor\Stripe\StripeObject[] $features A list of up to 15 features for this product. These are displayed in pricing tables. * @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 \SimplePay\Vendor\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 product's name, meant to be displayable to the customer. * @property null|\SimplePay\Vendor\Stripe\StripeObject $package_dimensions The dimensions of this product for shipping purposes. - * @property null|\SimplePay\Vendor\Stripe\StripeObject $provisioning Provisioning configuration for this product. * @property null|bool $shippable Whether this product is shipped (i.e., physical goods). * @property null|string $statement_descriptor Extra information about a product which will appear on your customer's credit card statement. In the case that multiple products are billed at once, the first statement descriptor will be used. * @property null|string|\SimplePay\Vendor\Stripe\TaxCode $tax_code A tax code ID. @@ -63,7 +54,7 @@ class Product extends ApiResource * * @throws \SimplePay\Vendor\Stripe\Exception\ApiErrorException if the request fails * - * @return \SimplePay\Vendor\Stripe\SearchResult the product search results + * @return \SimplePay\Vendor\Stripe\SearchResult<\SimplePay\Vendor\Stripe\Product> the product search results */ public static function search($params = null, $opts = null) { diff --git a/lib/Stripe/lib/PromotionCode.php b/lib/Stripe/lib/PromotionCode.php index 1c5506fc..ad971ca1 100644 --- a/lib/Stripe/lib/PromotionCode.php +++ b/lib/Stripe/lib/PromotionCode.php @@ -5,9 +5,8 @@ namespace SimplePay\Vendor\Stripe; /** - * A Promotion Code represents a customer-redeemable code for a coupon. It can be used to create - * multiple codes for a single coupon. + * A Promotion Code represents a customer-redeemable code for a coupon. It can be used to + * create multiple codes for a single coupon. * * @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. diff --git a/lib/Stripe/lib/Quote.php b/lib/Stripe/lib/Quote.php index 656fb1fa..14d155c0 100644 --- a/lib/Stripe/lib/Quote.php +++ b/lib/Stripe/lib/Quote.php @@ -5,9 +5,8 @@ namespace SimplePay\Vendor\Stripe; /** - * A Quote is a way to model prices that you'd like to provide to a customer. Once - * accepted, it will automatically create an invoice, subscription or subscription - * schedule. + * A Quote is a way to model prices that you'd like to provide to a customer. + * Once accepted, it will automatically create an invoice, subscription or subscription schedule. * * @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. @@ -15,14 +14,14 @@ * @property int $amount_total Total after discounts and taxes are applied. * @property null|string|\SimplePay\Vendor\Stripe\StripeObject $application ID of the Connect Application that created the quote. * @property null|int $application_fee_amount The amount of the application fee (if any) that will be requested to be applied to the payment and transferred to the application owner's SimplePay\Vendor\Stripe account. Only applicable if there are no line items with recurring prices on the quote. - * @property null|float $application_fee_percent A non-negative decimal between 0 and 100, with at most two decimal places. This represents the percentage of the subscription invoice subtotal that will be transferred to the application owner's SimplePay\Vendor\Stripe account. Only applicable if there are line items with recurring prices on the quote. + * @property null|float $application_fee_percent A non-negative decimal between 0 and 100, with at most two decimal places. This represents the percentage of the subscription invoice total that will be transferred to the application owner's SimplePay\Vendor\Stripe account. Only applicable if there are line items with recurring prices on the quote. * @property \SimplePay\Vendor\Stripe\StripeObject $automatic_tax * @property string $collection_method Either charge_automatically, or send_invoice. When charging automatically, SimplePay\Vendor\Stripe will attempt to pay invoices at the end of the subscription cycle or on finalization using the default payment method attached to the subscription or customer. When sending an invoice, SimplePay\Vendor\Stripe will email your customer an invoice with payment instructions and mark the subscription as active. Defaults to charge_automatically. * @property \SimplePay\Vendor\Stripe\StripeObject $computed * @property int $created Time at which the object was created. Measured in seconds since the Unix epoch. * @property null|string $currency Three-letter ISO currency code, in lowercase. Must be a supported currency. * @property null|string|\SimplePay\Vendor\Stripe\Customer $customer The customer which this quote belongs to. A customer is required before finalizing the quote. Once specified, it cannot be changed. - * @property (string|\SimplePay\Vendor\Stripe\TaxRate)[] $default_tax_rates The tax rates applied to this quote. + * @property null|(string|\SimplePay\Vendor\Stripe\TaxRate)[] $default_tax_rates The tax rates applied to this quote. * @property null|string $description A description that will be displayed on the quote PDF. * @property (string|\SimplePay\Vendor\Stripe\Discount)[] $discounts The discounts applied to this quote. * @property int $expires_at The date on which the quote will be canceled if in open or draft status. Measured in seconds since the Unix epoch. @@ -31,20 +30,16 @@ * @property null|string $header A header that will be displayed on the quote PDF. * @property null|string|\SimplePay\Vendor\Stripe\Invoice $invoice The invoice that was created from this quote. * @property null|\SimplePay\Vendor\Stripe\StripeObject $invoice_settings All invoices will be billed using the specified settings. - * @property \SimplePay\Vendor\Stripe\Collection<\SimplePay\Vendor\Stripe\LineItem> $line_items A list of items the customer is being quoted for. - * @property null|string[] $lines A list of lines on the quote. These lines describe changes that will be used to create new subscription schedules or update existing subscription schedules when the quote is accepted. + * @property null|\SimplePay\Vendor\Stripe\Collection<\SimplePay\Vendor\Stripe\LineItem> $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 \SimplePay\Vendor\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 A unique number that identifies this particular quote. This number is assigned once the quote is finalized. * @property null|string|\SimplePay\Vendor\Stripe\Account $on_behalf_of The account on behalf of which to charge. See the Connect documentation for details. * @property string $status The status of the quote. - * @property null|\SimplePay\Vendor\Stripe\StripeObject $status_details Details on when and why a quote has been marked as stale or canceled. * @property \SimplePay\Vendor\Stripe\StripeObject $status_transitions * @property null|string|\SimplePay\Vendor\Stripe\Subscription $subscription The subscription that was created or updated from this quote. * @property \SimplePay\Vendor\Stripe\StripeObject $subscription_data - * @property null|\SimplePay\Vendor\Stripe\StripeObject[] $subscription_data_overrides * @property null|string|\SimplePay\Vendor\Stripe\SubscriptionSchedule $subscription_schedule The subscription schedule that was created or updated from this quote. - * @property null|\SimplePay\Vendor\Stripe\StripeObject[] $subscription_schedules The subscription schedules that were created or updated from this quote. * @property null|string|\SimplePay\Vendor\Stripe\TestHelpers\TestClock $test_clock ID of the test clock this quote belongs to. * @property \SimplePay\Vendor\Stripe\StripeObject $total_details * @property null|\SimplePay\Vendor\Stripe\StripeObject $transfer_data The account (if any) the payments will be attributed to for tax reporting, and where funds from each payment will be transferred to for each of the invoices. @@ -62,29 +57,9 @@ class Quote extends ApiResource const COLLECTION_METHOD_SEND_INVOICE = 'send_invoice'; const STATUS_ACCEPTED = 'accepted'; - const STATUS_ACCEPTING = 'accepting'; const STATUS_CANCELED = 'canceled'; const STATUS_DRAFT = 'draft'; const STATUS_OPEN = 'open'; - const STATUS_STALE = 'stale'; - - /** - * @param callable $readBodyChunkCallable - * @param null|array $params - * @param null|array|string $opts - * - * @throws \SimplePay\Vendor\Stripe\Exception\ApiErrorException if the request fails - */ - public function pdf($readBodyChunkCallable, $params = null, $opts = null) - { - $opts = \SimplePay\Vendor\Stripe\Util\RequestOptions::parse($opts); - if (null === $opts->apiBase) { - $opts->apiBase = Stripe::$apiUploadBase; - } - - $url = $this->instanceUrl() . '/pdf'; - $this->_requestStream('get', $url, $readBodyChunkCallable, $params, $opts); - } /** * @param null|array $params @@ -120,23 +95,6 @@ public function cancel($params = null, $opts = null) return $this; } - /** - * @param null|array $params - * @param null|array|string $opts - * - * @throws \SimplePay\Vendor\Stripe\Exception\ApiErrorException if the request fails - * - * @return \SimplePay\Vendor\Stripe\Quote the drafted quote - */ - public function draftQuote($params = null, $opts = null) - { - $url = $this->instanceUrl() . '/mark_draft'; - list($response, $opts) = $this->_request('post', $url, $params, $opts); - $this->refreshFrom($response, $opts); - - return $this; - } - /** * @param null|array $params * @param null|array|string $opts @@ -161,7 +119,7 @@ public function finalizeQuote($params = null, $opts = null) * * @throws \SimplePay\Vendor\Stripe\Exception\ApiErrorException if the request fails * - * @return \SimplePay\Vendor\Stripe\Collection<\SimplePay\Vendor\Stripe\LineItem> list of LineItems + * @return \SimplePay\Vendor\Stripe\Collection<\SimplePay\Vendor\Stripe\LineItem> list of line items */ public static function allComputedUpfrontLineItems($id, $params = null, $opts = null) { @@ -180,7 +138,7 @@ public static function allComputedUpfrontLineItems($id, $params = null, $opts = * * @throws \SimplePay\Vendor\Stripe\Exception\ApiErrorException if the request fails * - * @return \SimplePay\Vendor\Stripe\Collection<\SimplePay\Vendor\Stripe\LineItem> list of LineItems + * @return \SimplePay\Vendor\Stripe\Collection<\SimplePay\Vendor\Stripe\LineItem> list of line items */ public static function allLineItems($id, $params = null, $opts = null) { @@ -193,112 +151,21 @@ public static function allLineItems($id, $params = null, $opts = null) } /** - * @param string $id - * @param null|array $params - * @param null|array|string $opts - * - * @throws \SimplePay\Vendor\Stripe\Exception\ApiErrorException if the request fails - * - * @return \SimplePay\Vendor\Stripe\Collection<\SimplePay\Vendor\Stripe\QuoteLine> list of QuoteLines - */ - public static function allLines($id, $params = null, $opts = null) - { - $url = static::resourceUrl($id) . '/lines'; - list($response, $opts) = static::_staticRequest('get', $url, $params, $opts); - $obj = \SimplePay\Vendor\Stripe\Util\Util::convertToStripeObject($response->json, $opts); - $obj->setLastResponse($response); - - return $obj; - } - - /** - * @param null|array $params - * @param null|array|string $opts - * - * @throws \SimplePay\Vendor\Stripe\Exception\ApiErrorException if the request fails - * - * @return \SimplePay\Vendor\Stripe\Quote the marked quote - */ - public function markStaleQuote($params = null, $opts = null) - { - $url = $this->instanceUrl() . '/mark_stale'; - list($response, $opts) = $this->_request('post', $url, $params, $opts); - $this->refreshFrom($response, $opts); - - return $this; - } - - /** - * @param string $id - * @param null|array $params - * @param null|array|string $opts - * - * @throws \SimplePay\Vendor\Stripe\Exception\ApiErrorException if the request fails - * - * @return \SimplePay\Vendor\Stripe\Collection<\SimplePay\Vendor\Stripe\InvoiceLineItem> list of InvoiceLineItems - */ - public static function previewInvoiceLines($id, $params = null, $opts = null) - { - $url = static::resourceUrl($id) . '/preview_invoice_lines'; - list($response, $opts) = static::_staticRequest('get', $url, $params, $opts); - $obj = \SimplePay\Vendor\Stripe\Util\Util::convertToStripeObject($response->json, $opts); - $obj->setLastResponse($response); - - return $obj; - } - - /** - * @param string $id - * @param null|array $params - * @param null|array|string $opts - * - * @throws \SimplePay\Vendor\Stripe\Exception\ApiErrorException if the request fails - * - * @return \SimplePay\Vendor\Stripe\Collection<\SimplePay\Vendor\Stripe\Invoice> list of Invoices - */ - public static function previewInvoices($id, $params = null, $opts = null) - { - $url = static::resourceUrl($id) . '/preview_invoices'; - list($response, $opts) = static::_staticRequest('get', $url, $params, $opts); - $obj = \SimplePay\Vendor\Stripe\Util\Util::convertToStripeObject($response->json, $opts); - $obj->setLastResponse($response); - - return $obj; - } - - /** - * @param string $id - * @param null|array $params - * @param null|array|string $opts - * - * @throws \SimplePay\Vendor\Stripe\Exception\ApiErrorException if the request fails - * - * @return \SimplePay\Vendor\Stripe\Collection<\SimplePay\Vendor\Stripe\SubscriptionSchedule> list of SubscriptionSchedules - */ - public static function previewSubscriptionSchedules($id, $params = null, $opts = null) - { - $url = static::resourceUrl($id) . '/preview_subscription_schedules'; - list($response, $opts) = static::_staticRequest('get', $url, $params, $opts); - $obj = \SimplePay\Vendor\Stripe\Util\Util::convertToStripeObject($response->json, $opts); - $obj->setLastResponse($response); - - return $obj; - } - - /** + * @param callable $readBodyChunkCallable * @param null|array $params * @param null|array|string $opts * * @throws \SimplePay\Vendor\Stripe\Exception\ApiErrorException if the request fails * - * @return \SimplePay\Vendor\Stripe\Quote the reestimated quote + * @return void */ - public function reestimate($params = null, $opts = null) + public function pdf($readBodyChunkCallable, $params = null, $opts = null) { - $url = $this->instanceUrl() . '/reestimate'; - list($response, $opts) = $this->_request('post', $url, $params, $opts); - $this->refreshFrom($response, $opts); - - return $this; + $opts = \SimplePay\Vendor\Stripe\Util\RequestOptions::parse($opts); + if (!isset($opts->apiBase)) { + $opts->apiBase = \SimplePay\Vendor\Stripe\Stripe::$apiUploadBase; + } + $url = $this->instanceUrl() . '/pdf'; + $this->_requestStream('get', $url, $readBodyChunkCallable, $params, $opts); } } diff --git a/lib/Stripe/lib/QuotePhase.php b/lib/Stripe/lib/QuotePhase.php deleted file mode 100644 index 22ac9833..00000000 --- a/lib/Stripe/lib/QuotePhase.php +++ /dev/null @@ -1,62 +0,0 @@ -reset, the billing_cycle_anchor of the subscription is set to the start of the phase when entering the phase. If unset, then the billing cycle anchor is automatically modified as needed when entering the phase. For more information, see the billing cycle documentation. - * @property null|string $collection_method Either charge_automatically, or send_invoice. When charging automatically, SimplePay\Vendor\Stripe will attempt to pay the underlying subscription at the end of each billing cycle using the default source attached to the customer. When sending an invoice, SimplePay\Vendor\Stripe will email your customer an invoice with payment instructions and mark the subscription as active. - * @property (string|\SimplePay\Vendor\Stripe\TaxRate)[] $default_tax_rates The default tax rates to apply to the subscription during this phase of the quote. - * @property (string|\SimplePay\Vendor\Stripe\Discount)[] $discounts The stackable discounts that will be applied to the subscription on this phase. Subscription item discounts are applied before subscription discounts. - * @property null|int $end_date The end of this phase of the quote - * @property null|\SimplePay\Vendor\Stripe\StripeObject $invoice_settings The invoice settings applicable during this phase. - * @property null|int $iterations Integer representing the multiplier applied to the price interval. For example, iterations=2 applied to a price with interval=month and interval_count=3 results in a phase of duration 2 * 3 months = 6 months. - * @property \SimplePay\Vendor\Stripe\Collection<\SimplePay\Vendor\Stripe\LineItem> $line_items A list of items the customer is being quoted for. - * @property string $proration_behavior If the quote will prorate when transitioning to this phase. Possible values are create_prorations and none. - * @property \SimplePay\Vendor\Stripe\StripeObject $total_details - * @property null|bool $trial If set to true the entire phase is counted as a trial and the customer will not be charged for any recurring fees. - * @property null|int $trial_end When the trial ends within the phase. - */ -class QuotePhase extends ApiResource -{ - const OBJECT_NAME = 'quote_phase'; - - use ApiOperations\All; - use ApiOperations\Retrieve; - - const BILLING_CYCLE_ANCHOR_RESET = 'reset'; - - const COLLECTION_METHOD_CHARGE_AUTOMATICALLY = 'charge_automatically'; - const COLLECTION_METHOD_SEND_INVOICE = 'send_invoice'; - - const PRORATION_BEHAVIOR_ALWAYS_INVOICE = 'always_invoice'; - const PRORATION_BEHAVIOR_CREATE_PRORATIONS = 'create_prorations'; - const PRORATION_BEHAVIOR_NONE = 'none'; - - /** - * @param string $id - * @param null|array $params - * @param null|array|string $opts - * - * @throws \SimplePay\Vendor\Stripe\Exception\ApiErrorException if the request fails - * - * @return \SimplePay\Vendor\Stripe\Collection<\SimplePay\Vendor\Stripe\LineItem> list of LineItems - */ - public static function allLineItems($id, $params = null, $opts = null) - { - $url = static::resourceUrl($id) . '/line_items'; - list($response, $opts) = static::_staticRequest('get', $url, $params, $opts); - $obj = \SimplePay\Vendor\Stripe\Util\Util::convertToStripeObject($response->json, $opts); - $obj->setLastResponse($response); - - return $obj; - } -} diff --git a/lib/Stripe/lib/Radar/EarlyFraudWarning.php b/lib/Stripe/lib/Radar/EarlyFraudWarning.php index 914f4459..cd995b4a 100644 --- a/lib/Stripe/lib/Radar/EarlyFraudWarning.php +++ b/lib/Stripe/lib/Radar/EarlyFraudWarning.php @@ -8,9 +8,7 @@ * An early fraud warning indicates that the card issuer has notified us that a * charge may be fraudulent. * - * Related guide: Early - * Fraud Warnings. + * Related guide: Early fraud warnings * * @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. @@ -19,7 +17,7 @@ * @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 string|\SimplePay\Vendor\Stripe\PaymentIntent $payment_intent ID of the Payment Intent this early fraud warning is for, optionally expanded. + * @property null|string|\SimplePay\Vendor\Stripe\PaymentIntent $payment_intent ID of the Payment Intent this early fraud warning is for, optionally expanded. */ class EarlyFraudWarning extends \SimplePay\Vendor\Stripe\ApiResource { diff --git a/lib/Stripe/lib/Radar/ValueList.php b/lib/Stripe/lib/Radar/ValueList.php index 16a246b1..a4e76a01 100644 --- a/lib/Stripe/lib/Radar/ValueList.php +++ b/lib/Stripe/lib/Radar/ValueList.php @@ -5,19 +5,16 @@ namespace SimplePay\Vendor\Stripe\Radar; /** - * Value lists allow you to group values together which can then be referenced in - * rules. + * Value lists allow you to group values together which can then be referenced in rules. * - * Related guide: Default SimplePay\Vendor\Stripe - * Lists. + * Related guide: Default SimplePay\Vendor\Stripe lists * * @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 $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, or customer_id. + * @property string $item_type The type of items in the value list. One of card_fingerprint, us_bank_account_fingerprint, sepa_debit_fingerprint, card_bin, email, ip_address, country, string, case_sensitive_string, or customer_id. * @property \SimplePay\Vendor\Stripe\Collection<\SimplePay\Vendor\Stripe\Radar\ValueListItem> $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 \SimplePay\Vendor\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. @@ -32,4 +29,15 @@ class ValueList extends \SimplePay\Vendor\Stripe\ApiResource use \SimplePay\Vendor\Stripe\ApiOperations\Delete; use \SimplePay\Vendor\Stripe\ApiOperations\Retrieve; use \SimplePay\Vendor\Stripe\ApiOperations\Update; + + 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_CUSTOMER_ID = 'customer_id'; + const ITEM_TYPE_EMAIL = 'email'; + const ITEM_TYPE_IP_ADDRESS = 'ip_address'; + const ITEM_TYPE_SEPA_DEBIT_FINGERPRINT = 'sepa_debit_fingerprint'; + const ITEM_TYPE_STRING = 'string'; + const ITEM_TYPE_US_BANK_ACCOUNT_FINGERPRINT = 'us_bank_account_fingerprint'; } diff --git a/lib/Stripe/lib/Radar/ValueListItem.php b/lib/Stripe/lib/Radar/ValueListItem.php index 38ceacc9..e5e96df0 100644 --- a/lib/Stripe/lib/Radar/ValueListItem.php +++ b/lib/Stripe/lib/Radar/ValueListItem.php @@ -5,12 +5,9 @@ namespace SimplePay\Vendor\Stripe\Radar; /** - * Value list items allow you to add specific values to a given Radar value list, - * which can then be used in rules. + * Value list items allow you to add specific values to a given Radar value list, which can then be used in rules. * - * Related guide: Managing List - * Items. + * Related guide: Managing list items * * @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. diff --git a/lib/Stripe/lib/Refund.php b/lib/Stripe/lib/Refund.php index a6f54f17..5e307051 100644 --- a/lib/Stripe/lib/Refund.php +++ b/lib/Stripe/lib/Refund.php @@ -5,31 +5,31 @@ namespace SimplePay\Vendor\Stripe; /** - * Refund objects allow you to refund a charge that has previously - * been created but not yet refunded. Funds will be refunded to the credit or debit - * card that was originally charged. + * Refund objects allow you to refund a previously created charge that isn't + * refunded yet. Funds are refunded to the credit or debit card that's + * initially charged. * - * Related guide: Refunds. + * Related guide: Refunds * * @property string $id Unique identifier for the object. * @property string $object String representing the object's type. Objects of the same type share the same value. - * @property int $amount Amount, in %s. + * @property int $amount Amount, in cents (or local equivalent). * @property null|string|\SimplePay\Vendor\Stripe\BalanceTransaction $balance_transaction Balance transaction that describes the impact on your account balance. - * @property null|string|\SimplePay\Vendor\Stripe\Charge $charge ID of the charge that was refunded. + * @property null|string|\SimplePay\Vendor\Stripe\Charge $charge ID of the charge that's refunded. * @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 $description An arbitrary string attached to the object. Often useful for displaying to users. (Available on non-card refunds only) - * @property string|\SimplePay\Vendor\Stripe\BalanceTransaction $failure_balance_transaction If the refund failed, this balance transaction describes the adjustment made on your account balance that reverses the initial balance transaction. - * @property string $failure_reason If the refund failed, the reason for refund failure if known. Possible values are lost_or_stolen_card, expired_or_canceled_card, or unknown. - * @property string $instructions_email Email to which refund instructions, if required, are sent to. + * @property null|string $description An arbitrary string attached to the object. You can use this for displaying to users (available on non-card refunds only). + * @property null|string|\SimplePay\Vendor\Stripe\BalanceTransaction $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. * @property null|\SimplePay\Vendor\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 \SimplePay\Vendor\Stripe\StripeObject $next_action - * @property null|string|\SimplePay\Vendor\Stripe\PaymentIntent $payment_intent ID of the PaymentIntent that was refunded. - * @property null|string $reason Reason for the refund, either user-provided (duplicate, fraudulent, or requested_by_customer) or generated by SimplePay\Vendor\Stripe internally (expired_uncaptured_charge). + * @property null|\SimplePay\Vendor\Stripe\StripeObject $next_action + * @property null|string|\SimplePay\Vendor\Stripe\PaymentIntent $payment_intent ID of the PaymentIntent that's refunded. + * @property null|string $reason Reason for the refund, which is either user-provided (duplicate, fraudulent, or requested_by_customer) or generated by SimplePay\Vendor\Stripe internally (expired_uncaptured_charge). * @property null|string $receipt_number This is the transaction number that appears on email receipts sent for this refund. - * @property null|string|\SimplePay\Vendor\Stripe\TransferReversal $source_transfer_reversal The transfer reversal that is associated with the refund. Only present if the charge came from another SimplePay\Vendor\Stripe account. See the Connect documentation for details. - * @property null|string $status Status of the refund. For credit card refunds, this can be pending, succeeded, or failed. For other types of refunds, it can be pending, requires_action, succeeded, failed, or canceled. Refer to our refunds documentation for more details. - * @property null|string|\SimplePay\Vendor\Stripe\TransferReversal $transfer_reversal If the accompanying transfer was reversed, the transfer reversal object. Only applicable if the charge was created using the destination parameter. + * @property null|string|\SimplePay\Vendor\Stripe\TransferReversal $source_transfer_reversal The transfer reversal that's associated with the refund. Only present if the charge came from another SimplePay\Vendor\Stripe account. + * @property null|string $status Status of the refund. For credit card refunds, this can be pending, succeeded, or failed. For other types of refunds, it can be pending, requires_action, succeeded, failed, or canceled. Learn more about failed refunds. + * @property null|string|\SimplePay\Vendor\Stripe\TransferReversal $transfer_reversal This refers to the transfer reversal object if the accompanying transfer reverses. This is only applicable if the charge was created using the destination parameter. */ class Refund extends ApiResource { diff --git a/lib/Stripe/lib/Reporting/ReportRun.php b/lib/Stripe/lib/Reporting/ReportRun.php index c03e12a9..a791d7ad 100644 --- a/lib/Stripe/lib/Reporting/ReportRun.php +++ b/lib/Stripe/lib/Reporting/ReportRun.php @@ -6,15 +6,13 @@ /** * The Report Run object represents an instance of a report type generated with - * specific run parameters. Once the object is created, SimplePay\Vendor\Stripe begins processing - * the report. When the report has finished running, it will give you a reference - * to a file where you can retrieve your results. For an overview, see API Access to - * Reports. + * specific run parameters. Once the object is created, SimplePay\Vendor\Stripe begins processing the report. + * When the report has finished running, it will give you a reference to a file + * where you can retrieve your results. For an overview, see + * API Access to Reports. * - * Note that certain report types can only be run based on your live-mode data (not - * test-mode data), and will error when queried without a live-mode API key. + * Note that certain report types can only be run based on your live-mode data (not test-mode + * data), and will error when queried without a live-mode API key. * * @property string $id Unique identifier for the object. * @property string $object String representing the object's type. Objects of the same type share the same value. diff --git a/lib/Stripe/lib/Reporting/ReportType.php b/lib/Stripe/lib/Reporting/ReportType.php index 9b1671b0..a8999d9f 100644 --- a/lib/Stripe/lib/Reporting/ReportType.php +++ b/lib/Stripe/lib/Reporting/ReportType.php @@ -5,16 +5,14 @@ namespace SimplePay\Vendor\Stripe\Reporting; /** - * The Report Type resource corresponds to a particular type of report, such as the - * "Activity summary" or "Itemized payouts" reports. These - * objects are identified by an ID belonging to a set of enumerated values. See API Access to Reports - * documentation for those Report Type IDs, along with required and optional - * parameters. + * The Report Type resource corresponds to a particular type of report, such as + * the "Activity summary" or "Itemized payouts" reports. These objects are + * identified by an ID belonging to a set of enumerated values. See + * API Access to Reports documentation + * for those Report Type IDs, along with required and optional parameters. * - * Note that certain report types can only be run based on your live-mode data (not - * test-mode data), and will error when queried without a live-mode API key. + * Note that certain report types can only be run based on your live-mode data (not test-mode + * data), and will error when queried without a live-mode API key. * * @property string $id The ID of the Report Type, such as balance.summary.1. * @property string $object String representing the object's type. Objects of the same type share the same value. diff --git a/lib/Stripe/lib/Review.php b/lib/Stripe/lib/Review.php index 24e5c228..25554693 100644 --- a/lib/Stripe/lib/Review.php +++ b/lib/Stripe/lib/Review.php @@ -5,11 +5,10 @@ namespace SimplePay\Vendor\Stripe; /** - * Reviews can be used to supplement automated fraud detection with human - * expertise. + * Reviews can be used to supplement automated fraud detection with human expertise. * - * Learn more about Radar and reviewing payments here. + * Learn more about Radar and reviewing payments + * here. * * @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. @@ -22,7 +21,7 @@ * @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 $open If true, the review needs action. * @property string $opened_reason The reason the review was opened. One of rule or manual. - * @property string|\SimplePay\Vendor\Stripe\PaymentIntent $payment_intent The PaymentIntent ID associated with this review, if one exists. + * @property null|string|\SimplePay\Vendor\Stripe\PaymentIntent $payment_intent The PaymentIntent ID associated with this review, if one exists. * @property string $reason The reason the review is currently open or closed. One of rule, manual, approved, refunded, refunded_as_fraud, disputed, or redacted. * @property null|\SimplePay\Vendor\Stripe\StripeObject $session Information related to the browsing session of the user who initiated the payment. */ @@ -33,6 +32,15 @@ class Review extends ApiResource use ApiOperations\All; use ApiOperations\Retrieve; + const CLOSED_REASON_APPROVED = 'approved'; + const CLOSED_REASON_DISPUTED = 'disputed'; + const CLOSED_REASON_REDACTED = 'redacted'; + const CLOSED_REASON_REFUNDED = 'refunded'; + const CLOSED_REASON_REFUNDED_AS_FRAUD = 'refunded_as_fraud'; + + const OPENED_REASON_MANUAL = 'manual'; + const OPENED_REASON_RULE = 'rule'; + /** * Possible string representations of the current, the opening or the closure reason of the review. * Not all of these enumeration apply to all of the ´reason´ fields. Please consult the Review object to diff --git a/lib/Stripe/lib/Service/AbstractService.php b/lib/Stripe/lib/Service/AbstractService.php index 6b200213..40213c4d 100644 --- a/lib/Stripe/lib/Service/AbstractService.php +++ b/lib/Stripe/lib/Service/AbstractService.php @@ -72,22 +72,28 @@ private static function formatParams($params) protected function request($method, $path, $params, $opts) { - return $this->getClient()->request($method, $path, static::formatParams($params), $opts); + return $this->getClient()->request($method, $path, self::formatParams($params), $opts); } protected function requestStream($method, $path, $readBodyChunkCallable, $params, $opts) { - return $this->getStreamingClient()->requestStream($method, $path, $readBodyChunkCallable, static::formatParams($params), $opts); + // TODO (MAJOR): Add this method to StripeClientInterface + // @phpstan-ignore-next-line + return $this->getStreamingClient()->requestStream($method, $path, $readBodyChunkCallable, self::formatParams($params), $opts); } protected function requestCollection($method, $path, $params, $opts) { - return $this->getClient()->requestCollection($method, $path, static::formatParams($params), $opts); + // TODO (MAJOR): Add this method to StripeClientInterface + // @phpstan-ignore-next-line + return $this->getClient()->requestCollection($method, $path, self::formatParams($params), $opts); } protected function requestSearchResult($method, $path, $params, $opts) { - return $this->getClient()->requestSearchResult($method, $path, static::formatParams($params), $opts); + // TODO (MAJOR): Add this method to StripeClientInterface + // @phpstan-ignore-next-line + return $this->getClient()->requestSearchResult($method, $path, self::formatParams($params), $opts); } protected function buildPath($basePath, ...$ids) diff --git a/lib/Stripe/lib/Service/AccountService.php b/lib/Stripe/lib/Service/AccountService.php index 159c2a16..f62511cf 100644 --- a/lib/Stripe/lib/Service/AccountService.php +++ b/lib/Stripe/lib/Service/AccountService.php @@ -80,6 +80,12 @@ public function allPersons($parentId, $params = null, $opts = null) * href="https://dashboard.stripe.com/account/applications/settings">register your * platform. * + * If you’ve already collected information for your connected accounts, you can prefill that information + * when creating the account. Connect Onboarding won’t ask for the prefilled + * information during account onboarding. You can prefill any information on the + * account. + * * @param null|array $params * @param null|array|\SimplePay\Vendor\Stripe\Util\RequestOptions $opts * @@ -154,8 +160,8 @@ public function createPerson($parentId, $params = null, $opts = null) * zero. * * If you want to delete your own account, use the account information tab in your - * account settings instead. + * href="https://dashboard.stripe.com/settings/account">account information tab in + * your account settings instead. * * @param string $id * @param null|array $params @@ -281,14 +287,18 @@ public function retrievePerson($parentId, $id, $params = null, $opts = null) /** * Updates a connected account by setting the * values of the parameters passed. Any parameters not provided are left unchanged. - * Most parameters can be changed only for Custom accounts. (These are marked - * Custom Only below.) Parameters marked Custom and - * Express are not supported for Standard accounts. + * + * For Custom accounts, you can update any information on the account. For other + * accounts, you can update all information until that account has started to go + * through Connect Onboarding. Once you create an Account Link for a Standard or Express + * account, some parameters can no longer be changed. These are marked as + * Custom Only or Custom and Express below. * * To update your own account, use the Dashboard. Refer to our Connect documentation to learn more - * about updating accounts. + * href="https://dashboard.stripe.com/settings/account">Dashboard. Refer to our + * Connect documentation to learn + * more about updating accounts. * * @param string $id * @param null|array $params @@ -304,7 +314,8 @@ public function update($id, $params = null, $opts = null) } /** - * Updates an existing Account Capability. + * Updates an existing Account Capability. Request or remove a capability by + * updating its requested parameter. * * @param string $parentId * @param string $id @@ -365,7 +376,7 @@ public function updatePerson($parentId, $id, $params = null, $opts = null) * * @param null|string $id * @param null|array $params - * @param null|array|StripeUtilRequestOptions $opts + * @param null|array|\SimplePay\Vendor\Stripe\Util\RequestOptions $opts * * @throws \SimplePay\Vendor\Stripe\Exception\ApiErrorException if the request fails * diff --git a/lib/Stripe/lib/Service/Capital/CapitalServiceFactory.php b/lib/Stripe/lib/Service/Capital/CapitalServiceFactory.php deleted file mode 100644 index b6576ea0..00000000 --- a/lib/Stripe/lib/Service/Capital/CapitalServiceFactory.php +++ /dev/null @@ -1,29 +0,0 @@ - - */ - private static $classMap = [ - 'financingOffers' => FinancingOfferService::class, - 'financingSummary' => FinancingSummaryService::class, - 'financingTransactions' => FinancingTransactionService::class, - ]; - - protected function getServiceClass($name) - { - return \array_key_exists($name, self::$classMap) ? self::$classMap[$name] : null; - } -} diff --git a/lib/Stripe/lib/Service/Capital/FinancingOfferService.php b/lib/Stripe/lib/Service/Capital/FinancingOfferService.php deleted file mode 100644 index 01ff77c2..00000000 --- a/lib/Stripe/lib/Service/Capital/FinancingOfferService.php +++ /dev/null @@ -1,58 +0,0 @@ - - */ - public function all($params = null, $opts = null) - { - return $this->requestCollection('get', '/v1/capital/financing_offers', $params, $opts); - } - - /** - * Acknowledges that platform has received and delivered the financing_offer to the - * intended merchant recipient. This is required to make the application - * accessible. - * - * @param string $id - * @param null|array $params - * @param null|array|\SimplePay\Vendor\Stripe\Util\RequestOptions $opts - * - * @throws \SimplePay\Vendor\Stripe\Exception\ApiErrorException if the request fails - * - * @return \SimplePay\Vendor\Stripe\Capital\FinancingOffer - */ - public function markDelivered($id, $params = null, $opts = null) - { - return $this->request('post', $this->buildPath('/v1/capital/financing_offers/%s/mark_delivered', $id), $params, $opts); - } - - /** - * Get the details of the financing offer. - * - * @param string $id - * @param null|array $params - * @param null|array|\SimplePay\Vendor\Stripe\Util\RequestOptions $opts - * - * @throws \SimplePay\Vendor\Stripe\Exception\ApiErrorException if the request fails - * - * @return \SimplePay\Vendor\Stripe\Capital\FinancingOffer - */ - public function retrieve($id, $params = null, $opts = null) - { - return $this->request('get', $this->buildPath('/v1/capital/financing_offers/%s', $id), $params, $opts); - } -} diff --git a/lib/Stripe/lib/Service/Capital/FinancingSummaryService.php b/lib/Stripe/lib/Service/Capital/FinancingSummaryService.php deleted file mode 100644 index 0d5c4b9c..00000000 --- a/lib/Stripe/lib/Service/Capital/FinancingSummaryService.php +++ /dev/null @@ -1,24 +0,0 @@ -request('get', '/v1/capital/financing_summary', $params, $opts); - } -} diff --git a/lib/Stripe/lib/Service/Capital/FinancingTransactionService.php b/lib/Stripe/lib/Service/Capital/FinancingTransactionService.php deleted file mode 100644 index 040567dd..00000000 --- a/lib/Stripe/lib/Service/Capital/FinancingTransactionService.php +++ /dev/null @@ -1,40 +0,0 @@ - - */ - public function all($params = null, $opts = null) - { - return $this->requestCollection('get', '/v1/capital/financing_transactions', $params, $opts); - } - - /** - * Retrieves a financing transaction for a financing offer. - * - * @param string $id - * @param null|array $params - * @param null|array|\SimplePay\Vendor\Stripe\Util\RequestOptions $opts - * - * @throws \SimplePay\Vendor\Stripe\Exception\ApiErrorException if the request fails - * - * @return \SimplePay\Vendor\Stripe\Capital\FinancingTransaction - */ - public function retrieve($id, $params = null, $opts = null) - { - return $this->request('get', $this->buildPath('/v1/capital/financing_transactions/%s', $id), $params, $opts); - } -} diff --git a/lib/Stripe/lib/Service/ChargeService.php b/lib/Stripe/lib/Service/ChargeService.php index 1c38184b..04f524cd 100644 --- a/lib/Stripe/lib/Service/ChargeService.php +++ b/lib/Stripe/lib/Service/ChargeService.php @@ -23,14 +23,15 @@ public function all($params = null, $opts = null) } /** - * Capture the payment of an existing, uncaptured, charge. This is the second half - * of the two-step payment flow, where first you created a - * charge with the capture option set to false. + * Capture the payment of an existing, uncaptured charge that was created with the + * capture option set to false. * * Uncaptured payments expire a set number of days after they are created (7 by default). If they are not captured - * by that point in time, they will be marked as refunded and will no longer be - * capturable. + * href="/docs/charges/placing-a-hold">7 by default), after which they are + * marked as refunded and capture attempts will fail. + * + * Don’t use this method to capture a PaymentIntent-initiated charge. Use Capture a PaymentIntent. * * @param string $id * @param null|array $params @@ -46,11 +47,10 @@ public function capture($id, $params = null, $opts = null) } /** - * To charge a credit card or other payment source, you create a - * Charge object. If your API key is in test mode, the supplied - * payment source (e.g., card) won’t actually be charged, although everything else - * will occur as if in live mode. (SimplePay\Vendor\Stripe assumes that the charge would have - * completed successfully). + * Use the Payment Intents API to initiate + * a new payment instead of using this method. Confirmation of the PaymentIntent + * creates the Charge object used to request payment, so this method + * is limited to legacy integrations. * * @param null|array $params * @param null|array|\SimplePay\Vendor\Stripe\Util\RequestOptions $opts diff --git a/lib/Stripe/lib/Service/CoreServiceFactory.php b/lib/Stripe/lib/Service/CoreServiceFactory.php index 97952591..a6e37db5 100644 --- a/lib/Stripe/lib/Service/CoreServiceFactory.php +++ b/lib/Stripe/lib/Service/CoreServiceFactory.php @@ -1,12 +1,12 @@ */ private static $classMap = [ + 'oauth' => OAuthService::class, + // Class Map: The beginning of the section generated from our OpenAPI spec 'accountLinks' => AccountLinkService::class, 'accounts' => AccountService::class, 'accountSessions' => AccountSessionService::class, @@ -86,7 +86,6 @@ class CoreServiceFactory extends \SimplePay\Vendor\Stripe\Service\AbstractServic 'balance' => BalanceService::class, 'balanceTransactions' => BalanceTransactionService::class, 'billingPortal' => BillingPortal\BillingPortalServiceFactory::class, - 'capital' => Capital\CapitalServiceFactory::class, 'charges' => ChargeService::class, 'checkout' => Checkout\CheckoutServiceFactory::class, 'countrySpecs' => CountrySpecService::class, @@ -100,23 +99,21 @@ class CoreServiceFactory extends \SimplePay\Vendor\Stripe\Service\AbstractServic 'fileLinks' => FileLinkService::class, 'files' => FileService::class, 'financialConnections' => FinancialConnections\FinancialConnectionsServiceFactory::class, - 'giftCards' => GiftCards\GiftCardsServiceFactory::class, 'identity' => Identity\IdentityServiceFactory::class, 'invoiceItems' => InvoiceItemService::class, 'invoices' => InvoiceService::class, 'issuing' => Issuing\IssuingServiceFactory::class, 'mandates' => MandateService::class, - 'oauth' => OAuthService::class, - 'orders' => OrderService::class, 'paymentIntents' => PaymentIntentService::class, 'paymentLinks' => PaymentLinkService::class, + 'paymentMethodConfigurations' => PaymentMethodConfigurationService::class, + 'paymentMethodDomains' => PaymentMethodDomainService::class, 'paymentMethods' => PaymentMethodService::class, 'payouts' => PayoutService::class, 'plans' => PlanService::class, 'prices' => PriceService::class, 'products' => ProductService::class, 'promotionCodes' => PromotionCodeService::class, - 'quotePhases' => QuotePhaseService::class, 'quotes' => QuoteService::class, 'radar' => Radar\RadarServiceFactory::class, 'refunds' => RefundService::class, @@ -140,6 +137,7 @@ class CoreServiceFactory extends \SimplePay\Vendor\Stripe\Service\AbstractServic 'transfers' => TransferService::class, 'treasury' => Treasury\TreasuryServiceFactory::class, 'webhookEndpoints' => WebhookEndpointService::class, + // Class Map: The end of the section generated from our OpenAPI spec ]; protected function getServiceClass($name) diff --git a/lib/Stripe/lib/Service/CustomerService.php b/lib/Stripe/lib/Service/CustomerService.php index 0e672771..2e1ea141 100644 --- a/lib/Stripe/lib/Service/CustomerService.php +++ b/lib/Stripe/lib/Service/CustomerService.php @@ -81,7 +81,7 @@ public function allPaymentMethods($id, $params = null, $opts = null) * * @throws \SimplePay\Vendor\Stripe\Exception\ApiErrorException if the request fails * - * @return \SimplePay\Vendor\Stripe\Collection<\SimplePay\Vendor\Stripe\BankAccount|\SimplePay\Vendor\Stripe\Card|\SimplePay\Vendor\Stripe\Source> + * @return \SimplePay\Vendor\Stripe\Collection<\SimplePay\Vendor\Stripe\Account|\SimplePay\Vendor\Stripe\BankAccount|\SimplePay\Vendor\Stripe\Card|\SimplePay\Vendor\Stripe\Source> */ public function allSources($parentId, $params = null, $opts = null) { @@ -149,7 +149,7 @@ public function createBalanceTransaction($parentId, $params = null, $opts = null * * @throws \SimplePay\Vendor\Stripe\Exception\ApiErrorException if the request fails * - * @return \SimplePay\Vendor\Stripe\Customer + * @return \SimplePay\Vendor\Stripe\FundingInstructions */ public function createFundingInstructions($id, $params = null, $opts = null) { @@ -171,7 +171,7 @@ public function createFundingInstructions($id, $params = null, $opts = null) * * @throws \SimplePay\Vendor\Stripe\Exception\ApiErrorException if the request fails * - * @return \SimplePay\Vendor\Stripe\BankAccount|\SimplePay\Vendor\Stripe\Card|\SimplePay\Vendor\Stripe\Source + * @return \SimplePay\Vendor\Stripe\Account|\SimplePay\Vendor\Stripe\BankAccount|\SimplePay\Vendor\Stripe\Card|\SimplePay\Vendor\Stripe\Source */ public function createSource($parentId, $params = null, $opts = null) { @@ -179,7 +179,7 @@ public function createSource($parentId, $params = null, $opts = null) } /** - * Creates a new TaxID object for a customer. + * Creates a new tax_id object for a customer. * * @param string $parentId * @param null|array $params @@ -220,7 +220,7 @@ public function delete($id, $params = null, $opts = null) * * @throws \SimplePay\Vendor\Stripe\Exception\ApiErrorException if the request fails * - * @return \SimplePay\Vendor\Stripe\Customer + * @return \SimplePay\Vendor\Stripe\Discount */ public function deleteDiscount($id, $params = null, $opts = null) { @@ -228,6 +228,8 @@ public function deleteDiscount($id, $params = null, $opts = null) } /** + * Delete a specified source for a given customer. + * * @param string $parentId * @param string $id * @param null|array $params @@ -235,7 +237,7 @@ public function deleteDiscount($id, $params = null, $opts = null) * * @throws \SimplePay\Vendor\Stripe\Exception\ApiErrorException if the request fails * - * @return \SimplePay\Vendor\Stripe\BankAccount|\SimplePay\Vendor\Stripe\Card|\SimplePay\Vendor\Stripe\Source + * @return \SimplePay\Vendor\Stripe\Account|\SimplePay\Vendor\Stripe\BankAccount|\SimplePay\Vendor\Stripe\Card|\SimplePay\Vendor\Stripe\Source */ public function deleteSource($parentId, $id, $params = null, $opts = null) { @@ -243,7 +245,7 @@ public function deleteSource($parentId, $id, $params = null, $opts = null) } /** - * Deletes an existing TaxID object. + * Deletes an existing tax_id object. * * @param string $parentId * @param string $id @@ -337,7 +339,7 @@ public function retrieveCashBalanceTransaction($parentId, $id, $params = null, $ * * @throws \SimplePay\Vendor\Stripe\Exception\ApiErrorException if the request fails * - * @return \SimplePay\Vendor\Stripe\Customer + * @return \SimplePay\Vendor\Stripe\PaymentMethod */ public function retrievePaymentMethod($parentId, $id, $params = null, $opts = null) { @@ -354,7 +356,7 @@ public function retrievePaymentMethod($parentId, $id, $params = null, $opts = nu * * @throws \SimplePay\Vendor\Stripe\Exception\ApiErrorException if the request fails * - * @return \SimplePay\Vendor\Stripe\BankAccount|\SimplePay\Vendor\Stripe\Card|\SimplePay\Vendor\Stripe\Source + * @return \SimplePay\Vendor\Stripe\Account|\SimplePay\Vendor\Stripe\BankAccount|\SimplePay\Vendor\Stripe\Card|\SimplePay\Vendor\Stripe\Source */ public function retrieveSource($parentId, $id, $params = null, $opts = null) { @@ -362,7 +364,7 @@ public function retrieveSource($parentId, $id, $params = null, $opts = null) } /** - * Retrieves the TaxID object with the given identifier. + * Retrieves the tax_id object with the given identifier. * * @param string $parentId * @param string $id @@ -461,6 +463,8 @@ public function updateCashBalance($parentId, $params = null, $opts = null) } /** + * Update a specified source for a given customer. + * * @param string $parentId * @param string $id * @param null|array $params @@ -468,7 +472,7 @@ public function updateCashBalance($parentId, $params = null, $opts = null) * * @throws \SimplePay\Vendor\Stripe\Exception\ApiErrorException if the request fails * - * @return \SimplePay\Vendor\Stripe\BankAccount|\SimplePay\Vendor\Stripe\Card|\SimplePay\Vendor\Stripe\Source + * @return \SimplePay\Vendor\Stripe\Account|\SimplePay\Vendor\Stripe\BankAccount|\SimplePay\Vendor\Stripe\Card|\SimplePay\Vendor\Stripe\Source */ public function updateSource($parentId, $id, $params = null, $opts = null) { @@ -476,6 +480,8 @@ public function updateSource($parentId, $id, $params = null, $opts = null) } /** + * Verify a specified bank account for a given customer. + * * @param string $parentId * @param string $id * @param null|array $params @@ -483,7 +489,7 @@ public function updateSource($parentId, $id, $params = null, $opts = null) * * @throws \SimplePay\Vendor\Stripe\Exception\ApiErrorException if the request fails * - * @return \SimplePay\Vendor\Stripe\BankAccount|\SimplePay\Vendor\Stripe\Card|\SimplePay\Vendor\Stripe\Source + * @return \SimplePay\Vendor\Stripe\Account|\SimplePay\Vendor\Stripe\BankAccount|\SimplePay\Vendor\Stripe\Card|\SimplePay\Vendor\Stripe\Source */ public function verifySource($parentId, $id, $params = null, $opts = null) { diff --git a/lib/Stripe/lib/Service/FileService.php b/lib/Stripe/lib/Service/FileService.php index dc55c608..e7fb2b43 100644 --- a/lib/Stripe/lib/Service/FileService.php +++ b/lib/Stripe/lib/Service/FileService.php @@ -7,9 +7,9 @@ class FileService extends \SimplePay\Vendor\Stripe\Service\AbstractService { /** - * Returns a list of the files that your account has access to. The files are - * returned sorted by creation date, with the most recently created files appearing - * first. + * Returns a list of the files that your account has access to. SimplePay\Vendor\Stripe sorts and + * returns the files by their creation dates, placing the most recently created + * files at the top. * * @param null|array $params * @param null|array|\SimplePay\Vendor\Stripe\Util\RequestOptions $opts @@ -24,10 +24,9 @@ public function all($params = null, $opts = null) } /** - * Retrieves the details of an existing file object. Supply the unique file ID from - * a file, and SimplePay\Vendor\Stripe will return the corresponding file object. To access file - * contents, see the File Upload - * Guide. + * Retrieves the details of an existing file object. After you supply a unique file + * ID, SimplePay\Vendor\Stripe returns the corresponding file object. Learn how to access file contents. * * @param string $id * @param null|array $params diff --git a/lib/Stripe/lib/Service/FinancialConnections/AccountService.php b/lib/Stripe/lib/Service/FinancialConnections/AccountService.php index 96eb23d1..d2eb2b8d 100644 --- a/lib/Stripe/lib/Service/FinancialConnections/AccountService.php +++ b/lib/Stripe/lib/Service/FinancialConnections/AccountService.php @@ -21,23 +21,6 @@ public function all($params = null, $opts = null) return $this->requestCollection('get', '/v1/financial_connections/accounts', $params, $opts); } - /** - * Lists the recorded inferred balances for a Financial Connections - * Account. - * - * @param string $parentId - * @param null|array $params - * @param null|array|\SimplePay\Vendor\Stripe\Util\RequestOptions $opts - * - * @throws \SimplePay\Vendor\Stripe\Exception\ApiErrorException if the request fails - * - * @return \SimplePay\Vendor\Stripe\Collection<\SimplePay\Vendor\Stripe\FinancialConnections\InferredBalance> - */ - public function allInferredBalances($parentId, $params = null, $opts = null) - { - return $this->requestCollection('get', $this->buildPath('/v1/financial_connections/accounts/%s/inferred_balances', $parentId), $params, $opts); - } - /** * Lists all owners for a given Account. * diff --git a/lib/Stripe/lib/Service/FinancialConnections/FinancialConnectionsServiceFactory.php b/lib/Stripe/lib/Service/FinancialConnections/FinancialConnectionsServiceFactory.php index 100264dd..dff0d9ab 100644 --- a/lib/Stripe/lib/Service/FinancialConnections/FinancialConnectionsServiceFactory.php +++ b/lib/Stripe/lib/Service/FinancialConnections/FinancialConnectionsServiceFactory.php @@ -9,7 +9,6 @@ * * @property AccountService $accounts * @property SessionService $sessions - * @property TransactionService $transactions */ class FinancialConnectionsServiceFactory extends \SimplePay\Vendor\Stripe\Service\AbstractServiceFactory { @@ -19,7 +18,6 @@ class FinancialConnectionsServiceFactory extends \SimplePay\Vendor\Stripe\Servic private static $classMap = [ 'accounts' => AccountService::class, 'sessions' => SessionService::class, - 'transactions' => TransactionService::class, ]; protected function getServiceClass($name) diff --git a/lib/Stripe/lib/Service/FinancialConnections/TransactionService.php b/lib/Stripe/lib/Service/FinancialConnections/TransactionService.php deleted file mode 100644 index 6471d51c..00000000 --- a/lib/Stripe/lib/Service/FinancialConnections/TransactionService.php +++ /dev/null @@ -1,23 +0,0 @@ -Transaction objects. - * - * @param null|array $params - * @param null|array|\SimplePay\Vendor\Stripe\Util\RequestOptions $opts - * - * @throws \SimplePay\Vendor\Stripe\Exception\ApiErrorException if the request fails - * - * @return \SimplePay\Vendor\Stripe\Collection<\SimplePay\Vendor\Stripe\FinancialConnections\Transaction> - */ - public function all($params = null, $opts = null) - { - return $this->requestCollection('get', '/v1/financial_connections/transactions', $params, $opts); - } -} diff --git a/lib/Stripe/lib/Service/GiftCards/GiftCardsServiceFactory.php b/lib/Stripe/lib/Service/GiftCards/GiftCardsServiceFactory.php deleted file mode 100644 index 3b295de6..00000000 --- a/lib/Stripe/lib/Service/GiftCards/GiftCardsServiceFactory.php +++ /dev/null @@ -1,27 +0,0 @@ - - */ - private static $classMap = [ - 'cards' => CardService::class, - 'transactions' => TransactionService::class, - ]; - - protected function getServiceClass($name) - { - return \array_key_exists($name, self::$classMap) ? self::$classMap[$name] : null; - } -} diff --git a/lib/Stripe/lib/Service/GiftCards/TransactionService.php b/lib/Stripe/lib/Service/GiftCards/TransactionService.php deleted file mode 100644 index 127788dd..00000000 --- a/lib/Stripe/lib/Service/GiftCards/TransactionService.php +++ /dev/null @@ -1,102 +0,0 @@ - - */ - public function all($params = null, $opts = null) - { - return $this->requestCollection('get', '/v1/gift_cards/transactions', $params, $opts); - } - - /** - * Cancel a gift card transaction. - * - * @param string $id - * @param null|array $params - * @param null|array|\SimplePay\Vendor\Stripe\Util\RequestOptions $opts - * - * @throws \SimplePay\Vendor\Stripe\Exception\ApiErrorException if the request fails - * - * @return \SimplePay\Vendor\Stripe\GiftCards\Transaction - */ - public function cancel($id, $params = null, $opts = null) - { - return $this->request('post', $this->buildPath('/v1/gift_cards/transactions/%s/cancel', $id), $params, $opts); - } - - /** - * Confirm a gift card transaction. - * - * @param string $id - * @param null|array $params - * @param null|array|\SimplePay\Vendor\Stripe\Util\RequestOptions $opts - * - * @throws \SimplePay\Vendor\Stripe\Exception\ApiErrorException if the request fails - * - * @return \SimplePay\Vendor\Stripe\GiftCards\Transaction - */ - public function confirm($id, $params = null, $opts = null) - { - return $this->request('post', $this->buildPath('/v1/gift_cards/transactions/%s/confirm', $id), $params, $opts); - } - - /** - * Create a gift card transaction. - * - * @param null|array $params - * @param null|array|\SimplePay\Vendor\Stripe\Util\RequestOptions $opts - * - * @throws \SimplePay\Vendor\Stripe\Exception\ApiErrorException if the request fails - * - * @return \SimplePay\Vendor\Stripe\GiftCards\Transaction - */ - public function create($params = null, $opts = null) - { - return $this->request('post', '/v1/gift_cards/transactions', $params, $opts); - } - - /** - * Retrieves the gift card transaction. - * - * @param string $id - * @param null|array $params - * @param null|array|\SimplePay\Vendor\Stripe\Util\RequestOptions $opts - * - * @throws \SimplePay\Vendor\Stripe\Exception\ApiErrorException if the request fails - * - * @return \SimplePay\Vendor\Stripe\GiftCards\Transaction - */ - public function retrieve($id, $params = null, $opts = null) - { - return $this->request('get', $this->buildPath('/v1/gift_cards/transactions/%s', $id), $params, $opts); - } - - /** - * Update a gift card transaction. - * - * @param string $id - * @param null|array $params - * @param null|array|\SimplePay\Vendor\Stripe\Util\RequestOptions $opts - * - * @throws \SimplePay\Vendor\Stripe\Exception\ApiErrorException if the request fails - * - * @return \SimplePay\Vendor\Stripe\GiftCards\Transaction - */ - public function update($id, $params = null, $opts = null) - { - return $this->request('post', $this->buildPath('/v1/gift_cards/transactions/%s', $id), $params, $opts); - } -} diff --git a/lib/Stripe/lib/Service/Identity/VerificationSessionService.php b/lib/Stripe/lib/Service/Identity/VerificationSessionService.php index 6923ef1d..8d3caa34 100644 --- a/lib/Stripe/lib/Service/Identity/VerificationSessionService.php +++ b/lib/Stripe/lib/Service/Identity/VerificationSessionService.php @@ -53,7 +53,7 @@ public function cancel($id, $params = null, $opts = null) * though everything else will occur as if in live mode. * * Related guide: Verify your - * users’ identity documents. + * users’ identity documents * * @param null|array $params * @param null|array|\SimplePay\Vendor\Stripe\Util\RequestOptions $opts diff --git a/lib/Stripe/lib/Service/Issuing/AuthorizationService.php b/lib/Stripe/lib/Service/Issuing/AuthorizationService.php index 37f4c132..24526d47 100644 --- a/lib/Stripe/lib/Service/Issuing/AuthorizationService.php +++ b/lib/Stripe/lib/Service/Issuing/AuthorizationService.php @@ -24,12 +24,12 @@ public function all($params = null, $opts = null) } /** - * Approves a pending Issuing Authorization object. This request - * should be made within the timeout window of the Authorization object. This + * request should be made within the timeout window of the real-time - * authorization flow. You can also respond directly to the webhook request to - * approve an authorization (preferred). More details can be found here. + * authorization flow. This method is deprecated. Instead, respond + * directly to the webhook request to approve an authorization. * * @param string $id * @param null|array $params @@ -45,12 +45,12 @@ public function approve($id, $params = null, $opts = null) } /** - * Declines a pending Issuing Authorization object. This request - * should be made within the timeout window of the Authorization object. This + * request should be made within the timeout window of the real time - * authorization flow. You can also respond directly to the webhook request to - * decline an authorization (preferred). More details can be found here. + * authorization flow. This method is deprecated. Instead, respond + * directly to the webhook request to decline an authorization. * * @param string $id * @param null|array $params diff --git a/lib/Stripe/lib/Service/Issuing/IssuingServiceFactory.php b/lib/Stripe/lib/Service/Issuing/IssuingServiceFactory.php index 580b8e90..62fb7732 100644 --- a/lib/Stripe/lib/Service/Issuing/IssuingServiceFactory.php +++ b/lib/Stripe/lib/Service/Issuing/IssuingServiceFactory.php @@ -11,6 +11,7 @@ * @property CardholderService $cardholders * @property CardService $cards * @property DisputeService $disputes + * @property TokenService $tokens * @property TransactionService $transactions */ class IssuingServiceFactory extends \SimplePay\Vendor\Stripe\Service\AbstractServiceFactory @@ -23,6 +24,7 @@ class IssuingServiceFactory extends \SimplePay\Vendor\Stripe\Service\AbstractSer 'cardholders' => CardholderService::class, 'cards' => CardService::class, 'disputes' => DisputeService::class, + 'tokens' => TokenService::class, 'transactions' => TransactionService::class, ]; diff --git a/lib/Stripe/lib/Service/QuotePhaseService.php b/lib/Stripe/lib/Service/Issuing/TokenService.php similarity index 50% rename from lib/Stripe/lib/Service/QuotePhaseService.php rename to lib/Stripe/lib/Service/Issuing/TokenService.php index 41846692..4def5c30 100644 --- a/lib/Stripe/lib/Service/QuotePhaseService.php +++ b/lib/Stripe/lib/Service/Issuing/TokenService.php @@ -2,30 +2,27 @@ // File generated from our OpenAPI spec -namespace SimplePay\Vendor\Stripe\Service; +namespace SimplePay\Vendor\Stripe\Service\Issuing; -class QuotePhaseService extends \SimplePay\Vendor\Stripe\Service\AbstractService +class TokenService extends \SimplePay\Vendor\Stripe\Service\AbstractService { /** - * Returns a list of quote phases. + * Lists all Issuing Token objects for a given card. * * @param null|array $params * @param null|array|\SimplePay\Vendor\Stripe\Util\RequestOptions $opts * * @throws \SimplePay\Vendor\Stripe\Exception\ApiErrorException if the request fails * - * @return \SimplePay\Vendor\Stripe\Collection<\SimplePay\Vendor\Stripe\QuotePhase> + * @return \SimplePay\Vendor\Stripe\Collection<\SimplePay\Vendor\Stripe\Issuing\Token> */ public function all($params = null, $opts = null) { - return $this->requestCollection('get', '/v1/quote_phases', $params, $opts); + return $this->requestCollection('get', '/v1/issuing/tokens', $params, $opts); } /** - * When retrieving a quote phase, there is an includable - * line_items property containing the first handful of those - * items. There is also a URL where you can retrieve the full (paginated) list of - * line items. + * Retrieves an Issuing Token object. * * @param string $id * @param null|array $params @@ -33,15 +30,16 @@ public function all($params = null, $opts = null) * * @throws \SimplePay\Vendor\Stripe\Exception\ApiErrorException if the request fails * - * @return \SimplePay\Vendor\Stripe\Collection<\SimplePay\Vendor\Stripe\LineItem> + * @return \SimplePay\Vendor\Stripe\Issuing\Token */ - public function allLineItems($id, $params = null, $opts = null) + public function retrieve($id, $params = null, $opts = null) { - return $this->requestCollection('get', $this->buildPath('/v1/quote_phases/%s/line_items', $id), $params, $opts); + return $this->request('get', $this->buildPath('/v1/issuing/tokens/%s', $id), $params, $opts); } /** - * Retrieves the quote phase with the given ID. + * Attempts to update the specified Issuing Token object to the status + * specified. * * @param string $id * @param null|array $params @@ -49,10 +47,10 @@ public function allLineItems($id, $params = null, $opts = null) * * @throws \SimplePay\Vendor\Stripe\Exception\ApiErrorException if the request fails * - * @return \SimplePay\Vendor\Stripe\QuotePhase + * @return \SimplePay\Vendor\Stripe\Issuing\Token */ - public function retrieve($id, $params = null, $opts = null) + public function update($id, $params = null, $opts = null) { - return $this->request('get', $this->buildPath('/v1/quote_phases/%s', $id), $params, $opts); + return $this->request('post', $this->buildPath('/v1/issuing/tokens/%s', $id), $params, $opts); } } diff --git a/lib/Stripe/lib/Service/OAuthService.php b/lib/Stripe/lib/Service/OAuthService.php index 0470b3d2..1d8b8f86 100644 --- a/lib/Stripe/lib/Service/OAuthService.php +++ b/lib/Stripe/lib/Service/OAuthService.php @@ -7,7 +7,7 @@ class OAuthService extends \SimplePay\Vendor\Stripe\Service\AbstractService /** * Sends a request to Stripe's Connect API. * - * @param string $method the HTTP method + * @param 'delete'|'get'|'post' $method the HTTP method * @param string $path the path of the request * @param array $params the parameters of the request * @param array|\SimplePay\Vendor\Stripe\Util\RequestOptions $opts the special modifiers of the request diff --git a/lib/Stripe/lib/Service/OrderService.php b/lib/Stripe/lib/Service/OrderService.php deleted file mode 100644 index 1d925f79..00000000 --- a/lib/Stripe/lib/Service/OrderService.php +++ /dev/null @@ -1,144 +0,0 @@ - - */ - public function all($params = null, $opts = null) - { - return $this->requestCollection('get', '/v1/orders', $params, $opts); - } - - /** - * When retrieving an order, there is an includable line_items - * property containing the first handful of those items. There is also a URL where - * you can retrieve the full (paginated) list of line items. - * - * @param string $id - * @param null|array $params - * @param null|array|\SimplePay\Vendor\Stripe\Util\RequestOptions $opts - * - * @throws \SimplePay\Vendor\Stripe\Exception\ApiErrorException if the request fails - * - * @return \SimplePay\Vendor\Stripe\Collection<\SimplePay\Vendor\Stripe\LineItem> - */ - public function allLineItems($id, $params = null, $opts = null) - { - return $this->requestCollection('get', $this->buildPath('/v1/orders/%s/line_items', $id), $params, $opts); - } - - /** - * Cancels the order as well as the payment intent if one is attached. - * - * @param string $id - * @param null|array $params - * @param null|array|\SimplePay\Vendor\Stripe\Util\RequestOptions $opts - * - * @throws \SimplePay\Vendor\Stripe\Exception\ApiErrorException if the request fails - * - * @return \SimplePay\Vendor\Stripe\Order - */ - public function cancel($id, $params = null, $opts = null) - { - return $this->request('post', $this->buildPath('/v1/orders/%s/cancel', $id), $params, $opts); - } - - /** - * Creates a new open order object. - * - * @param null|array $params - * @param null|array|\SimplePay\Vendor\Stripe\Util\RequestOptions $opts - * - * @throws \SimplePay\Vendor\Stripe\Exception\ApiErrorException if the request fails - * - * @return \SimplePay\Vendor\Stripe\Order - */ - public function create($params = null, $opts = null) - { - return $this->request('post', '/v1/orders', $params, $opts); - } - - /** - * Reopens a submitted order. - * - * @param string $id - * @param null|array $params - * @param null|array|\SimplePay\Vendor\Stripe\Util\RequestOptions $opts - * - * @throws \SimplePay\Vendor\Stripe\Exception\ApiErrorException if the request fails - * - * @return \SimplePay\Vendor\Stripe\Order - */ - public function reopen($id, $params = null, $opts = null) - { - return $this->request('post', $this->buildPath('/v1/orders/%s/reopen', $id), $params, $opts); - } - - /** - * Retrieves the details of an existing order. Supply the unique order ID from - * either an order creation request or the order list, and SimplePay\Vendor\Stripe will return the - * corresponding order information. - * - * @param string $id - * @param null|array $params - * @param null|array|\SimplePay\Vendor\Stripe\Util\RequestOptions $opts - * - * @throws \SimplePay\Vendor\Stripe\Exception\ApiErrorException if the request fails - * - * @return \SimplePay\Vendor\Stripe\Order - */ - public function retrieve($id, $params = null, $opts = null) - { - return $this->request('get', $this->buildPath('/v1/orders/%s', $id), $params, $opts); - } - - /** - * Submitting an Order transitions the status to processing and - * creates a PaymentIntent object so the order can be paid. If the Order has an - * amount_total of 0, no PaymentIntent object will be created. Once - * the order is submitted, its contents cannot be changed, unless the reopen method is called. - * - * @param string $id - * @param null|array $params - * @param null|array|\SimplePay\Vendor\Stripe\Util\RequestOptions $opts - * - * @throws \SimplePay\Vendor\Stripe\Exception\ApiErrorException if the request fails - * - * @return \SimplePay\Vendor\Stripe\Order - */ - public function submit($id, $params = null, $opts = null) - { - return $this->request('post', $this->buildPath('/v1/orders/%s/submit', $id), $params, $opts); - } - - /** - * Updates the specific order by setting the values of the parameters passed. Any - * parameters not provided will be left unchanged. - * - * @param string $id - * @param null|array $params - * @param null|array|\SimplePay\Vendor\Stripe\Util\RequestOptions $opts - * - * @throws \SimplePay\Vendor\Stripe\Exception\ApiErrorException if the request fails - * - * @return \SimplePay\Vendor\Stripe\Order - */ - public function update($id, $params = null, $opts = null) - { - return $this->request('post', $this->buildPath('/v1/orders/%s', $id), $params, $opts); - } -} diff --git a/lib/Stripe/lib/Service/PaymentIntentService.php b/lib/Stripe/lib/Service/PaymentIntentService.php index 16733653..bac6a190 100644 --- a/lib/Stripe/lib/Service/PaymentIntentService.php +++ b/lib/Stripe/lib/Service/PaymentIntentService.php @@ -22,7 +22,8 @@ public function all($params = null, $opts = null) } /** - * Manually reconcile the remaining amount for a customer_balance PaymentIntent. + * Manually reconcile the remaining amount for a customer_balance + * PaymentIntent. * * @param string $id * @param null|array $params @@ -38,17 +39,17 @@ public function applyCustomerBalance($id, $params = null, $opts = null) } /** - * A PaymentIntent object can be canceled when it is in one of these statuses: + * You can cancel a PaymentIntent object when it’s in one of these statuses: * requires_payment_method, requires_capture, * requires_confirmation, requires_action or, in rare cases, processing. * - * Once canceled, no additional charges will be made by the PaymentIntent and any - * operations on the PaymentIntent will fail with an error. For PaymentIntents with - * status=’requires_capture’, the remaining - * amount_capturable will automatically be refunded. + * After it’s canceled, no additional charges are made by the PaymentIntent and any + * operations on the PaymentIntent fail with an error. For PaymentIntents with a + * status of requires_capture, the remaining + * amount_capturable is automatically refunded. * - * You cannot cancel the PaymentIntent for a Checkout Session. Expire the Checkout Session * instead. * @@ -69,8 +70,8 @@ public function cancel($id, $params = null, $opts = null) * Capture the funds of an existing uncaptured PaymentIntent when its status is * requires_capture. * - * Uncaptured PaymentIntents will be canceled a set number of days after they are - * created (7 by default). + * Uncaptured PaymentIntents are cancelled a set number of days (7 by default) + * after their creation. * * Learn more about separate authorization * and capture. @@ -94,8 +95,9 @@ public function capture($id, $params = null, $opts = null) * If the selected payment method requires additional authentication steps, the * PaymentIntent will transition to the requires_action status and * suggest additional actions via next_action. If payment fails, the - * PaymentIntent will transition to the requires_payment_method - * status. If payment succeeds, the PaymentIntent will transition to the + * PaymentIntent transitions to the requires_payment_method status or + * the canceled status if the confirmation limit is reached. If + * payment succeeds, the PaymentIntent will transition to the * succeeded status (or requires_capture, if * capture_method is set to manual). If the * confirmation_method is automatic, payment may be @@ -131,13 +133,13 @@ public function confirm($id, $params = null, $opts = null) * * After the PaymentIntent is created, attach a payment method and confirm to continue the payment. - * You can read more about the different payment flows available via the Payment - * Intents API here. + * Learn more about the available payment + * flows with the Payment Intents API. * - * When confirm=true is used during creation, it is equivalent to - * creating and confirming the PaymentIntent in the same call. You may use any + * When you use confirm=true during creation, it’s equivalent to + * creating and confirming the PaymentIntent in the same call. You can use any * parameters available in the confirm - * API when confirm=true is supplied. + * API when you supply confirm=true. * * @param null|array $params * @param null|array|\SimplePay\Vendor\Stripe\Util\RequestOptions $opts @@ -159,21 +161,22 @@ public function create($params = null, $opts = null) * must be true. * * Incremental authorizations attempt to increase the authorized amount on your - * customer’s card to the new, higher amount provided. As with the - * initial authorization, incremental authorizations may be declined. A single + * customer’s card to the new, higher amount provided. Similar to the + * initial authorization, incremental authorizations can be declined. A single * PaymentIntent can call this endpoint multiple times to further increase the * authorized amount. * - * If the incremental authorization succeeds, the PaymentIntent object is returned - * with the updated amount. * If the incremental authorization fails, a card_declined error is returned, and - * no fields on the PaymentIntent or Charge are updated. The PaymentIntent object + * href="/docs/error-codes#card-declined">card_declined error returns, and no + * other fields on the PaymentIntent or Charge update. The PaymentIntent object * remains capturable for the previously authorized amount. * * Each PaymentIntent can have a maximum of 10 incremental authorization attempts, - * including declines. Once captured, a PaymentIntent can no longer be incremented. + * including declines. After it’s captured, a PaymentIntent can no longer be + * incremented. * * Learn more about incremental @@ -195,12 +198,12 @@ public function incrementAuthorization($id, $params = null, $opts = null) /** * Retrieves the details of a PaymentIntent that has previously been created. * - * Client-side retrieval using a publishable key is allowed when the - * client_secret is provided in the query string. + * You can retrieve a PaymentIntent client-side using a publishable key when the + * client_secret is in the query string. * - * When retrieved with a publishable key, only a subset of properties will be - * returned. Please refer to the payment - * intent object reference for more details. + * If you retrieve a PaymentIntent with a publishable key, it only returns a subset + * of properties. Refer to the payment intent + * object reference for more details. * * @param string $id * @param null|array $params @@ -238,10 +241,10 @@ public function search($params = null, $opts = null) /** * Updates properties on a PaymentIntent object without confirming. * - * Depending on which properties you update, you may need to confirm the - * PaymentIntent again. For example, updating the payment_method will - * always require you to confirm the PaymentIntent again. If you prefer to update - * and confirm at the same time, we recommend updating properties via the payment_method + * always requires you to confirm the PaymentIntent again. If you prefer to update + * and confirm at the same time, we recommend updating properties through the confirm API instead. * * @param string $id diff --git a/lib/Stripe/lib/Service/GiftCards/CardService.php b/lib/Stripe/lib/Service/PaymentMethodConfigurationService.php similarity index 50% rename from lib/Stripe/lib/Service/GiftCards/CardService.php rename to lib/Stripe/lib/Service/PaymentMethodConfigurationService.php index 7355b378..ebac069d 100644 --- a/lib/Stripe/lib/Service/GiftCards/CardService.php +++ b/lib/Stripe/lib/Service/PaymentMethodConfigurationService.php @@ -2,42 +2,42 @@ // File generated from our OpenAPI spec -namespace SimplePay\Vendor\Stripe\Service\GiftCards; +namespace SimplePay\Vendor\Stripe\Service; -class CardService extends \SimplePay\Vendor\Stripe\Service\AbstractService +class PaymentMethodConfigurationService extends \SimplePay\Vendor\Stripe\Service\AbstractService { /** - * List gift cards for an account. + * List payment method configurations. * * @param null|array $params * @param null|array|\SimplePay\Vendor\Stripe\Util\RequestOptions $opts * * @throws \SimplePay\Vendor\Stripe\Exception\ApiErrorException if the request fails * - * @return \SimplePay\Vendor\Stripe\Collection<\SimplePay\Vendor\Stripe\GiftCards\Card> + * @return \SimplePay\Vendor\Stripe\Collection<\SimplePay\Vendor\Stripe\PaymentMethodConfiguration> */ public function all($params = null, $opts = null) { - return $this->requestCollection('get', '/v1/gift_cards/cards', $params, $opts); + return $this->requestCollection('get', '/v1/payment_method_configurations', $params, $opts); } /** - * Creates a new gift card object. + * Creates a payment method configuration. * * @param null|array $params * @param null|array|\SimplePay\Vendor\Stripe\Util\RequestOptions $opts * * @throws \SimplePay\Vendor\Stripe\Exception\ApiErrorException if the request fails * - * @return \SimplePay\Vendor\Stripe\GiftCards\Card + * @return \SimplePay\Vendor\Stripe\PaymentMethodConfiguration */ public function create($params = null, $opts = null) { - return $this->request('post', '/v1/gift_cards/cards', $params, $opts); + return $this->request('post', '/v1/payment_method_configurations', $params, $opts); } /** - * Retrieve a gift card by id. + * Retrieve payment method configuration. * * @param string $id * @param null|array $params @@ -45,15 +45,15 @@ public function create($params = null, $opts = null) * * @throws \SimplePay\Vendor\Stripe\Exception\ApiErrorException if the request fails * - * @return \SimplePay\Vendor\Stripe\GiftCards\Card + * @return \SimplePay\Vendor\Stripe\PaymentMethodConfiguration */ public function retrieve($id, $params = null, $opts = null) { - return $this->request('get', $this->buildPath('/v1/gift_cards/cards/%s', $id), $params, $opts); + return $this->request('get', $this->buildPath('/v1/payment_method_configurations/%s', $id), $params, $opts); } /** - * Update a gift card. + * Update payment method configuration. * * @param string $id * @param null|array $params @@ -61,26 +61,10 @@ public function retrieve($id, $params = null, $opts = null) * * @throws \SimplePay\Vendor\Stripe\Exception\ApiErrorException if the request fails * - * @return \SimplePay\Vendor\Stripe\GiftCards\Card + * @return \SimplePay\Vendor\Stripe\PaymentMethodConfiguration */ public function update($id, $params = null, $opts = null) { - return $this->request('post', $this->buildPath('/v1/gift_cards/cards/%s', $id), $params, $opts); - } - - /** - * Validates a gift card code, returning the matching gift card object if it - * exists. - * - * @param null|array $params - * @param null|array|\SimplePay\Vendor\Stripe\Util\RequestOptions $opts - * - * @throws \SimplePay\Vendor\Stripe\Exception\ApiErrorException if the request fails - * - * @return \SimplePay\Vendor\Stripe\GiftCards\Card - */ - public function validate($params = null, $opts = null) - { - return $this->request('post', '/v1/gift_cards/cards/validate', $params, $opts); + return $this->request('post', $this->buildPath('/v1/payment_method_configurations/%s', $id), $params, $opts); } } diff --git a/lib/Stripe/lib/Service/PaymentMethodDomainService.php b/lib/Stripe/lib/Service/PaymentMethodDomainService.php new file mode 100644 index 00000000..f5830ee7 --- /dev/null +++ b/lib/Stripe/lib/Service/PaymentMethodDomainService.php @@ -0,0 +1,97 @@ + + */ + public function all($params = null, $opts = null) + { + return $this->requestCollection('get', '/v1/payment_method_domains', $params, $opts); + } + + /** + * Creates a payment method domain. + * + * @param null|array $params + * @param null|array|\SimplePay\Vendor\Stripe\Util\RequestOptions $opts + * + * @throws \SimplePay\Vendor\Stripe\Exception\ApiErrorException if the request fails + * + * @return \SimplePay\Vendor\Stripe\PaymentMethodDomain + */ + public function create($params = null, $opts = null) + { + return $this->request('post', '/v1/payment_method_domains', $params, $opts); + } + + /** + * Retrieves the details of an existing payment method domain. + * + * @param string $id + * @param null|array $params + * @param null|array|\SimplePay\Vendor\Stripe\Util\RequestOptions $opts + * + * @throws \SimplePay\Vendor\Stripe\Exception\ApiErrorException if the request fails + * + * @return \SimplePay\Vendor\Stripe\PaymentMethodDomain + */ + public function retrieve($id, $params = null, $opts = null) + { + return $this->request('get', $this->buildPath('/v1/payment_method_domains/%s', $id), $params, $opts); + } + + /** + * Updates an existing payment method domain. + * + * @param string $id + * @param null|array $params + * @param null|array|\SimplePay\Vendor\Stripe\Util\RequestOptions $opts + * + * @throws \SimplePay\Vendor\Stripe\Exception\ApiErrorException if the request fails + * + * @return \SimplePay\Vendor\Stripe\PaymentMethodDomain + */ + public function update($id, $params = null, $opts = null) + { + return $this->request('post', $this->buildPath('/v1/payment_method_domains/%s', $id), $params, $opts); + } + + /** + * Some payment methods such as Apple Pay require additional steps to verify a + * domain. If the requirements weren’t satisfied when the domain was created, the + * payment method will be inactive on the domain. The payment method doesn’t appear + * in Elements for this domain until it is active. + * + * To activate a payment method on an existing payment method domain, complete the + * required validation steps specific to the payment method, and then validate the + * payment method domain with this endpoint. + * + * Related guides: Payment method + * domains. + * + * @param string $id + * @param null|array $params + * @param null|array|\SimplePay\Vendor\Stripe\Util\RequestOptions $opts + * + * @throws \SimplePay\Vendor\Stripe\Exception\ApiErrorException if the request fails + * + * @return \SimplePay\Vendor\Stripe\PaymentMethodDomain + */ + public function validate($id, $params = null, $opts = null) + { + return $this->request('post', $this->buildPath('/v1/payment_method_domains/%s/validate', $id), $params, $opts); + } +} diff --git a/lib/Stripe/lib/Service/PayoutService.php b/lib/Stripe/lib/Service/PayoutService.php index b4f0265a..e4bd8ffc 100644 --- a/lib/Stripe/lib/Service/PayoutService.php +++ b/lib/Stripe/lib/Service/PayoutService.php @@ -7,8 +7,8 @@ class PayoutService extends \SimplePay\Vendor\Stripe\Service\AbstractService { /** - * Returns a list of existing payouts sent to third-party bank accounts or that - * SimplePay\Vendor\Stripe has sent you. The payouts are returned in sorted order, with the most + * Returns a list of existing payouts sent to third-party bank accounts or payouts + * that SimplePay\Vendor\Stripe sent to you. The payouts return in sorted order, with the most * recently created payouts appearing first. * * @param null|array $params @@ -24,8 +24,8 @@ public function all($params = null, $opts = null) } /** - * A previously created payout can be canceled if it has not yet been paid out. - * Funds will be refunded to your available balance. You may not cancel automatic + * You can cancel a previously created payout if it hasn’t been paid out yet. + * SimplePay\Vendor\Stripe refunds the funds to your available balance. You can’t cancel automatic * SimplePay\Vendor\Stripe payouts. * * @param string $id @@ -42,17 +42,17 @@ public function cancel($id, $params = null, $opts = null) } /** - * To send funds to your own bank account, you create a new payout object. Your SimplePay\Vendor\Stripe balance must be able to cover the payout amount, or - * you’ll receive an “Insufficient Funds” error. + * To send funds to your own bank account, create a new payout object. Your SimplePay\Vendor\Stripe balance must cover the payout amount. If it doesn’t, + * you receive an “Insufficient Funds” error. * - * If your API key is in test mode, money won’t actually be sent, though everything - * else will occur as if in live mode. + * If your API key is in test mode, money won’t actually be sent, though every + * other action occurs as if you’re in live mode. * - * If you are creating a manual payout on a SimplePay\Vendor\Stripe account that uses multiple - * payment source types, you’ll need to specify the source type balance that the - * payout should draw from. The balance object - * details available and pending amounts by source type. + * If you create a manual payout on a SimplePay\Vendor\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. * * @param null|array $params * @param null|array|\SimplePay\Vendor\Stripe\Util\RequestOptions $opts @@ -68,7 +68,7 @@ public function create($params = null, $opts = null) /** * Retrieves the details of an existing payout. Supply the unique payout ID from - * either a payout creation request or the payout list, and SimplePay\Vendor\Stripe will return the + * either a payout creation request or the payout list. SimplePay\Vendor\Stripe returns the * corresponding payout information. * * @param string $id @@ -85,14 +85,14 @@ public function retrieve($id, $params = null, $opts = null) } /** - * Reverses a payout by debiting the destination bank account. Only payouts for - * connected accounts to US bank accounts may be reversed at this time. If the - * payout is in the pending status, - * /v1/payouts/:id/cancel should be used instead. + * Reverses a payout by debiting the destination bank account. At this time, you + * can only reverse payouts for connected accounts to US bank accounts. If the + * payout is in the pending status, use + * /v1/payouts/:id/cancel instead. * - * By requesting a reversal via /v1/payouts/:id/reverse, you confirm - * that the authorized signatory of the selected bank account has authorized the - * debit on the bank account and that no other authorization is required. + * By requesting a reversal through /v1/payouts/:id/reverse, you + * confirm that the authorized signatory of the selected bank account authorizes + * the debit on the bank account and that no other authorization is required. * * @param string $id * @param null|array $params @@ -108,8 +108,8 @@ public function reverse($id, $params = null, $opts = null) } /** - * Updates the specified payout by setting the values of the parameters passed. Any - * parameters not provided will be left unchanged. This request accepts only the + * Updates the specified payout by setting the values of the parameters you pass. + * We don’t change parameters that you don’t provide. This request only accepts the * metadata as arguments. * * @param string $id diff --git a/lib/Stripe/lib/Service/QuoteService.php b/lib/Stripe/lib/Service/QuoteService.php index d550fdcb..b8c7942f 100644 --- a/lib/Stripe/lib/Service/QuoteService.php +++ b/lib/Stripe/lib/Service/QuoteService.php @@ -74,24 +74,6 @@ public function allLineItems($id, $params = null, $opts = null) return $this->requestCollection('get', $this->buildPath('/v1/quotes/%s/line_items', $id), $params, $opts); } - /** - * When retrieving a quote, there is an includable lines property - * containing the first handful of those items. There is also a URL where you can - * retrieve the full (paginated) list of lines. - * - * @param string $id - * @param null|array $params - * @param null|array|\SimplePay\Vendor\Stripe\Util\RequestOptions $opts - * - * @throws \SimplePay\Vendor\Stripe\Exception\ApiErrorException if the request fails - * - * @return \SimplePay\Vendor\Stripe\Collection<\SimplePay\Vendor\Stripe\QuoteLine> - */ - public function allLines($id, $params = null, $opts = null) - { - return $this->requestCollection('get', $this->buildPath('/v1/quotes/%s/lines', $id), $params, $opts); - } - /** * Cancels the quote. * @@ -126,22 +108,6 @@ public function create($params = null, $opts = null) return $this->request('post', '/v1/quotes', $params, $opts); } - /** - * Converts a stale quote to draft. - * - * @param string $id - * @param null|array $params - * @param null|array|\SimplePay\Vendor\Stripe\Util\RequestOptions $opts - * - * @throws \SimplePay\Vendor\Stripe\Exception\ApiErrorException if the request fails - * - * @return \SimplePay\Vendor\Stripe\Quote - */ - public function draftQuote($id, $params = null, $opts = null) - { - return $this->request('post', $this->buildPath('/v1/quotes/%s/mark_draft', $id), $params, $opts); - } - /** * Finalizes the quote. * @@ -159,83 +125,25 @@ public function finalizeQuote($id, $params = null, $opts = null) } /** - * Converts a draft or open quote to stale. - * - * @param string $id - * @param null|array $params - * @param null|array|\SimplePay\Vendor\Stripe\Util\RequestOptions $opts - * - * @throws \SimplePay\Vendor\Stripe\Exception\ApiErrorException if the request fails - * - * @return \SimplePay\Vendor\Stripe\Quote - */ - public function markStaleQuote($id, $params = null, $opts = null) - { - return $this->request('post', $this->buildPath('/v1/quotes/%s/mark_stale', $id), $params, $opts); - } - - /** - * Preview the invoice line items that would be generated by accepting the quote. - * - * @param string $id - * @param null|array $params - * @param null|array|\SimplePay\Vendor\Stripe\Util\RequestOptions $opts - * - * @throws \SimplePay\Vendor\Stripe\Exception\ApiErrorException if the request fails - * - * @return \SimplePay\Vendor\Stripe\Collection<\SimplePay\Vendor\Stripe\InvoiceLineItem> - */ - public function previewInvoiceLines($id, $params = null, $opts = null) - { - return $this->requestCollection('get', $this->buildPath('/v1/quotes/%s/preview_invoice_lines', $id), $params, $opts); - } - - /** - * Preview the invoices that would be generated by accepting the quote. + * Download the PDF for a finalized quote. * * @param string $id + * @param callable $readBodyChunkCallable * @param null|array $params * @param null|array|\SimplePay\Vendor\Stripe\Util\RequestOptions $opts * * @throws \SimplePay\Vendor\Stripe\Exception\ApiErrorException if the request fails * - * @return \SimplePay\Vendor\Stripe\Collection<\SimplePay\Vendor\Stripe\Invoice> + * @return mixed */ - public function previewInvoices($id, $params = null, $opts = null) + public function pdf($id, $readBodyChunkCallable, $params = null, $opts = null) { - return $this->requestCollection('get', $this->buildPath('/v1/quotes/%s/preview_invoices', $id), $params, $opts); - } + $opts = \SimplePay\Vendor\Stripe\Util\RequestOptions::parse($opts); + if (!isset($opts->apiBase)) { + $opts->apiBase = $this->getClient()->getFilesBase(); + } - /** - * Preview the schedules that would be generated by accepting the quote. - * - * @param string $id - * @param null|array $params - * @param null|array|\SimplePay\Vendor\Stripe\Util\RequestOptions $opts - * - * @throws \SimplePay\Vendor\Stripe\Exception\ApiErrorException if the request fails - * - * @return \SimplePay\Vendor\Stripe\Collection<\SimplePay\Vendor\Stripe\SubscriptionSchedule> - */ - public function previewSubscriptionSchedules($id, $params = null, $opts = null) - { - return $this->requestCollection('get', $this->buildPath('/v1/quotes/%s/preview_subscription_schedules', $id), $params, $opts); - } - - /** - * Recompute the upcoming invoice estimate for the quote. - * - * @param string $id - * @param null|array $params - * @param null|array|\SimplePay\Vendor\Stripe\Util\RequestOptions $opts - * - * @throws \SimplePay\Vendor\Stripe\Exception\ApiErrorException if the request fails - * - * @return \SimplePay\Vendor\Stripe\Quote - */ - public function reestimate($id, $params = null, $opts = null) - { - return $this->request('post', $this->buildPath('/v1/quotes/%s/reestimate', $id), $params, $opts); + return $this->requestStream('get', $this->buildPath('/v1/quotes/%s/pdf', $id), $readBodyChunkCallable, $params, $opts); } /** @@ -269,23 +177,4 @@ public function update($id, $params = null, $opts = null) { return $this->request('post', $this->buildPath('/v1/quotes/%s', $id), $params, $opts); } - - /** - * Download the PDF for a finalized quote. - * - * @param string $id - * @param callable $readBodyChunkCallable - * @param null|array $params - * @param null|array|\SimplePay\Vendor\Stripe\Util\RequestOptions $opts - * - * @throws \SimplePay\Vendor\Stripe\Exception\ApiErrorException if the request fails - */ - public function pdf($id, $readBodyChunkCallable, $params = null, $opts = null) - { - $opts = \SimplePay\Vendor\Stripe\Util\RequestOptions::parse($opts); - if (!isset($opts->apiBase)) { - $opts->apiBase = $this->getClient()->getFilesBase(); - } - $this->requestStream('get', $this->buildPath('/v1/quotes/%s/pdf', $id), $readBodyChunkCallable, $params, $opts); - } } diff --git a/lib/Stripe/lib/Service/RefundService.php b/lib/Stripe/lib/Service/RefundService.php index 47e9c226..4a8277a4 100644 --- a/lib/Stripe/lib/Service/RefundService.php +++ b/lib/Stripe/lib/Service/RefundService.php @@ -7,10 +7,9 @@ class RefundService extends \SimplePay\Vendor\Stripe\Service\AbstractService { /** - * Returns a list of all refunds you’ve previously created. The refunds are - * returned in sorted order, with the most recent refunds appearing first. For - * convenience, the 10 most recent refunds are always available by default on the - * charge object. + * Returns a list of all refunds you created. We return the refunds in sorted + * order, with the most recent refunds appearing first The 10 most recent refunds + * are always available by default on the Charge object. * * @param null|array $params * @param null|array|\SimplePay\Vendor\Stripe\Util\RequestOptions $opts @@ -27,8 +26,8 @@ public function all($params = null, $opts = null) /** * Cancels a refund with a status of requires_action. * - * Refunds in other states cannot be canceled, and only refunds for payment methods - * that require customer action will enter the requires_action state. + * You can’t cancel refunds in other states. Only refunds for payment methods that + * require customer action can enter the requires_action state. * * @param string $id * @param null|array $params @@ -44,7 +43,19 @@ public function cancel($id, $params = null, $opts = null) } /** - * Create a refund. + * When you create a new refund, you must specify a Charge or a PaymentIntent + * object on which to create it. + * + * Creating a new refund will refund a charge that has previously been created but + * not yet refunded. Funds will be refunded to the credit or debit card that was + * originally charged. + * + * You can optionally refund only part of a charge. You can do so multiple times, + * until the entire charge has been refunded. + * + * Once entirely refunded, a charge can’t be refunded again. This method will raise + * an error when called on an already-refunded charge, or when trying to refund + * more money than is left on a charge. * * @param null|array $params * @param null|array|\SimplePay\Vendor\Stripe\Util\RequestOptions $opts @@ -75,8 +86,8 @@ public function retrieve($id, $params = null, $opts = null) } /** - * Updates the specified refund by setting the values of the parameters passed. Any - * parameters not provided will be left unchanged. + * Updates the refund that you specify by setting the values of the passed + * parameters. Any parameters that you don’t provide remain unchanged. * * This request only accepts metadata as an argument. * diff --git a/lib/Stripe/lib/Service/SetupAttemptService.php b/lib/Stripe/lib/Service/SetupAttemptService.php index d2e5b003..9656e429 100644 --- a/lib/Stripe/lib/Service/SetupAttemptService.php +++ b/lib/Stripe/lib/Service/SetupAttemptService.php @@ -7,7 +7,7 @@ class SetupAttemptService extends \SimplePay\Vendor\Stripe\Service\AbstractService { /** - * Returns a list of SetupAttempts associated with a provided SetupIntent. + * Returns a list of SetupAttempts that associate with a provided SetupIntent. * * @param null|array $params * @param null|array|\SimplePay\Vendor\Stripe\Util\RequestOptions $opts diff --git a/lib/Stripe/lib/Service/SetupIntentService.php b/lib/Stripe/lib/Service/SetupIntentService.php index 3a56e15d..842f3336 100644 --- a/lib/Stripe/lib/Service/SetupIntentService.php +++ b/lib/Stripe/lib/Service/SetupIntentService.php @@ -22,11 +22,11 @@ public function all($params = null, $opts = null) } /** - * A SetupIntent object can be canceled when it is in one of these statuses: + * You can cancel a SetupIntent object when it’s in one of these statuses: * requires_payment_method, requires_confirmation, or * requires_action. * - * Once canceled, setup is abandoned and any operations on the SetupIntent will + * After you cancel it, setup is abandoned and any operations on the SetupIntent * fail with an error. * * @param string $id @@ -52,7 +52,8 @@ public function cancel($id, $params = null, $opts = null) * * Otherwise, it will transition to the requires_action status and * suggest additional actions via next_action. If setup fails, the - * SetupIntent will transition to the requires_payment_method status. + * SetupIntent will transition to the requires_payment_method status + * or the canceled status if the confirmation limit is reached. * * @param string $id * @param null|array $params @@ -70,8 +71,8 @@ public function confirm($id, $params = null, $opts = null) /** * Creates a SetupIntent object. * - * After the SetupIntent is created, attach a payment method and confirm to collect any required + * After you create the SetupIntent, attach a payment method and confirm it to collect any required * permissions to charge the payment method later. * * @param null|array $params diff --git a/lib/Stripe/lib/Service/SourceService.php b/lib/Stripe/lib/Service/SourceService.php index 8d2ac96d..9e96457d 100644 --- a/lib/Stripe/lib/Service/SourceService.php +++ b/lib/Stripe/lib/Service/SourceService.php @@ -47,7 +47,7 @@ public function create($params = null, $opts = null) * * @throws \SimplePay\Vendor\Stripe\Exception\ApiErrorException if the request fails * - * @return \SimplePay\Vendor\Stripe\Source + * @return \SimplePay\Vendor\Stripe\Account|\SimplePay\Vendor\Stripe\BankAccount|\SimplePay\Vendor\Stripe\Card|\SimplePay\Vendor\Stripe\Source */ public function detach($parentId, $id, $params = null, $opts = null) { diff --git a/lib/Stripe/lib/Service/SubscriptionScheduleService.php b/lib/Stripe/lib/Service/SubscriptionScheduleService.php index 27ea453f..8b9bae9b 100644 --- a/lib/Stripe/lib/Service/SubscriptionScheduleService.php +++ b/lib/Stripe/lib/Service/SubscriptionScheduleService.php @@ -21,22 +21,6 @@ public function all($params = null, $opts = null) return $this->requestCollection('get', '/v1/subscription_schedules', $params, $opts); } - /** - * Amends an existing subscription schedule. - * - * @param string $id - * @param null|array $params - * @param null|array|\SimplePay\Vendor\Stripe\Util\RequestOptions $opts - * - * @throws \SimplePay\Vendor\Stripe\Exception\ApiErrorException if the request fails - * - * @return \SimplePay\Vendor\Stripe\SubscriptionSchedule - */ - public function amend($id, $params = null, $opts = null) - { - return $this->request('post', $this->buildPath('/v1/subscription_schedules/%s/amend', $id), $params, $opts); - } - /** * Cancels a subscription schedule and its associated subscription immediately (if * the subscription schedule has an active subscription). A subscription schedule diff --git a/lib/Stripe/lib/Service/SubscriptionService.php b/lib/Stripe/lib/Service/SubscriptionService.php index f8caa09e..1a1141bc 100644 --- a/lib/Stripe/lib/Service/SubscriptionService.php +++ b/lib/Stripe/lib/Service/SubscriptionService.php @@ -90,7 +90,7 @@ public function create($params = null, $opts = null) * * @throws \SimplePay\Vendor\Stripe\Exception\ApiErrorException if the request fails * - * @return \SimplePay\Vendor\Stripe\Subscription + * @return \SimplePay\Vendor\Stripe\Discount */ public function deleteDiscount($id, $params = null, $opts = null) { @@ -155,11 +155,52 @@ public function search($params = null, $opts = null) } /** - * Updates an existing subscription on a customer to match the specified - * parameters. When changing plans or quantities, we will optionally prorate the - * price we charge next month to make up for any price changes. To preview how the - * proration will be calculated, use the upcoming - * invoice endpoint. + * Updates an existing subscription to match the specified parameters. When + * changing prices or quantities, we optionally prorate the price we charge next + * month to make up for any price changes. To preview how the proration is + * calculated, use the upcoming invoice + * endpoint. + * + * By default, we prorate subscription changes. For example, if a customer signs up + * on May 1 for a 100 price, they’ll be billed + * 100 immediately. If on May 15 they switch to a + * 200 price, then on June 1 they’ll be billed + * 250 (200 for a renewal of her + * subscription, plus a 50 prorating adjustment for half of + * the previous month’s 100 difference). Similarly, a + * downgrade generates a credit that is applied to the next invoice. We also + * prorate when you make quantity changes. + * + * Switching prices does not normally change the billing date or generate an + * immediate charge unless: + * + *
  • The billing interval is changed (for example, from monthly to + * yearly).
  • The subscription moves from free to paid, or paid to + * free.
  • A trial starts or ends.
+ * + * In these cases, we apply a credit for the unused time on the previous price, + * immediately charge the customer using the new price, and reset the billing date. + * + * If you want to charge for an upgrade immediately, pass + * proration_behavior as always_invoice to create + * prorations, automatically invoice the customer for those proration adjustments, + * and attempt to collect payment. If you pass create_prorations, the + * prorations are created but not automatically invoiced. If you want to bill the + * customer for the prorations before the subscription’s renewal date, you need to + * manually invoice the customer. + * + * If you don’t want to prorate, set the proration_behavior option to + * none. With this option, the customer is billed + * 100 on May 1 and 200 on June 1. + * Similarly, if you set proration_behavior to none when + * switching between different billing intervals (for example, from monthly to + * yearly), we don’t generate any credits for the old subscription’s unused time. + * We still reset the billing date and bill immediately for the new subscription. + * + * Updating the quantity on a subscription many times in an hour may result in rate limiting. If you need to bill for a frequently + * changing quantity, consider integrating usage-based billing instead. * * @param string $id * @param null|array $params diff --git a/lib/Stripe/lib/Service/Tax/CalculationService.php b/lib/Stripe/lib/Service/Tax/CalculationService.php index 7cd5c1eb..39931470 100644 --- a/lib/Stripe/lib/Service/Tax/CalculationService.php +++ b/lib/Stripe/lib/Service/Tax/CalculationService.php @@ -15,7 +15,7 @@ class CalculationService extends \SimplePay\Vendor\Stripe\Service\AbstractServic * * @throws \SimplePay\Vendor\Stripe\Exception\ApiErrorException if the request fails * - * @return \SimplePay\Vendor\Stripe\Collection<\SimplePay\Vendor\Stripe\LineItem> + * @return \SimplePay\Vendor\Stripe\Collection<\SimplePay\Vendor\Stripe\Tax\CalculationLineItem> */ public function allLineItems($id, $params = null, $opts = null) { diff --git a/lib/Stripe/lib/Service/Tax/TransactionService.php b/lib/Stripe/lib/Service/Tax/TransactionService.php index 9ec477e8..0c7fd25d 100644 --- a/lib/Stripe/lib/Service/Tax/TransactionService.php +++ b/lib/Stripe/lib/Service/Tax/TransactionService.php @@ -15,28 +15,13 @@ class TransactionService extends \SimplePay\Vendor\Stripe\Service\AbstractServic * * @throws \SimplePay\Vendor\Stripe\Exception\ApiErrorException if the request fails * - * @return \SimplePay\Vendor\Stripe\Collection<\SimplePay\Vendor\Stripe\LineItem> + * @return \SimplePay\Vendor\Stripe\Collection<\SimplePay\Vendor\Stripe\Tax\TransactionLineItem> */ public function allLineItems($id, $params = null, $opts = null) { return $this->requestCollection('get', $this->buildPath('/v1/tax/transactions/%s/line_items', $id), $params, $opts); } - /** - * Lists Tax Transaction objects. - * - * @param null|array $params - * @param null|array|\SimplePay\Vendor\Stripe\Util\RequestOptions $opts - * - * @throws \SimplePay\Vendor\Stripe\Exception\ApiErrorException if the request fails - * - * @return \SimplePay\Vendor\Stripe\Collection<\SimplePay\Vendor\Stripe\Tax\Transaction> - */ - public function allTransactions($params = null, $opts = null) - { - return $this->requestCollection('get', '/v1/tax/transactions', $params, $opts); - } - /** * Creates a Tax Transaction from a calculation. * @@ -47,9 +32,9 @@ public function allTransactions($params = null, $opts = null) * * @return \SimplePay\Vendor\Stripe\Tax\Transaction */ - public function create($params = null, $opts = null) + public function createFromCalculation($params = null, $opts = null) { - return $this->request('post', '/v1/tax/transactions', $params, $opts); + return $this->request('post', '/v1/tax/transactions/create_from_calculation', $params, $opts); } /** diff --git a/lib/Stripe/lib/Service/TestHelpers/CustomerService.php b/lib/Stripe/lib/Service/TestHelpers/CustomerService.php index d2531aa2..7e275199 100644 --- a/lib/Stripe/lib/Service/TestHelpers/CustomerService.php +++ b/lib/Stripe/lib/Service/TestHelpers/CustomerService.php @@ -15,7 +15,7 @@ class CustomerService extends \SimplePay\Vendor\Stripe\Service\AbstractService * * @throws \SimplePay\Vendor\Stripe\Exception\ApiErrorException if the request fails * - * @return \SimplePay\Vendor\Stripe\Customer + * @return \SimplePay\Vendor\Stripe\CustomerCashBalanceTransaction */ public function fundCashBalance($id, $params = null, $opts = null) { diff --git a/lib/Stripe/lib/Service/TestHelpers/Issuing/AuthorizationService.php b/lib/Stripe/lib/Service/TestHelpers/Issuing/AuthorizationService.php new file mode 100644 index 00000000..c0d4247c --- /dev/null +++ b/lib/Stripe/lib/Service/TestHelpers/Issuing/AuthorizationService.php @@ -0,0 +1,87 @@ +request('post', $this->buildPath('/v1/test_helpers/issuing/authorizations/%s/capture', $id), $params, $opts); + } + + /** + * Create a test-mode authorization. + * + * @param null|array $params + * @param null|array|\SimplePay\Vendor\Stripe\Util\RequestOptions $opts + * + * @throws \SimplePay\Vendor\Stripe\Exception\ApiErrorException if the request fails + * + * @return \SimplePay\Vendor\Stripe\Issuing\Authorization + */ + public function create($params = null, $opts = null) + { + return $this->request('post', '/v1/test_helpers/issuing/authorizations', $params, $opts); + } + + /** + * Expire a test-mode Authorization. + * + * @param string $id + * @param null|array $params + * @param null|array|\SimplePay\Vendor\Stripe\Util\RequestOptions $opts + * + * @throws \SimplePay\Vendor\Stripe\Exception\ApiErrorException if the request fails + * + * @return \SimplePay\Vendor\Stripe\Issuing\Authorization + */ + public function expire($id, $params = null, $opts = null) + { + return $this->request('post', $this->buildPath('/v1/test_helpers/issuing/authorizations/%s/expire', $id), $params, $opts); + } + + /** + * Increment a test-mode Authorization. + * + * @param string $id + * @param null|array $params + * @param null|array|\SimplePay\Vendor\Stripe\Util\RequestOptions $opts + * + * @throws \SimplePay\Vendor\Stripe\Exception\ApiErrorException if the request fails + * + * @return \SimplePay\Vendor\Stripe\Issuing\Authorization + */ + public function increment($id, $params = null, $opts = null) + { + return $this->request('post', $this->buildPath('/v1/test_helpers/issuing/authorizations/%s/increment', $id), $params, $opts); + } + + /** + * Reverse a test-mode Authorization. + * + * @param string $id + * @param null|array $params + * @param null|array|\SimplePay\Vendor\Stripe\Util\RequestOptions $opts + * + * @throws \SimplePay\Vendor\Stripe\Exception\ApiErrorException if the request fails + * + * @return \SimplePay\Vendor\Stripe\Issuing\Authorization + */ + public function reverse($id, $params = null, $opts = null) + { + return $this->request('post', $this->buildPath('/v1/test_helpers/issuing/authorizations/%s/reverse', $id), $params, $opts); + } +} diff --git a/lib/Stripe/lib/Service/TestHelpers/Issuing/IssuingServiceFactory.php b/lib/Stripe/lib/Service/TestHelpers/Issuing/IssuingServiceFactory.php index ba4201c8..0b801224 100644 --- a/lib/Stripe/lib/Service/TestHelpers/Issuing/IssuingServiceFactory.php +++ b/lib/Stripe/lib/Service/TestHelpers/Issuing/IssuingServiceFactory.php @@ -7,7 +7,9 @@ /** * Service factory class for API resources in the Issuing namespace. * + * @property AuthorizationService $authorizations * @property CardService $cards + * @property TransactionService $transactions */ class IssuingServiceFactory extends \SimplePay\Vendor\Stripe\Service\AbstractServiceFactory { @@ -15,7 +17,9 @@ class IssuingServiceFactory extends \SimplePay\Vendor\Stripe\Service\AbstractSer * @var array */ private static $classMap = [ + 'authorizations' => AuthorizationService::class, 'cards' => CardService::class, + 'transactions' => TransactionService::class, ]; protected function getServiceClass($name) diff --git a/lib/Stripe/lib/Service/TestHelpers/Issuing/TransactionService.php b/lib/Stripe/lib/Service/TestHelpers/Issuing/TransactionService.php new file mode 100644 index 00000000..e1ba625f --- /dev/null +++ b/lib/Stripe/lib/Service/TestHelpers/Issuing/TransactionService.php @@ -0,0 +1,54 @@ +request('post', '/v1/test_helpers/issuing/transactions/create_force_capture', $params, $opts); + } + + /** + * Allows the user to refund an arbitrary amount, also known as a unlinked refund. + * + * @param null|array $params + * @param null|array|\SimplePay\Vendor\Stripe\Util\RequestOptions $opts + * + * @throws \SimplePay\Vendor\Stripe\Exception\ApiErrorException if the request fails + * + * @return \SimplePay\Vendor\Stripe\Issuing\Transaction + */ + public function createUnlinkedRefund($params = null, $opts = null) + { + return $this->request('post', '/v1/test_helpers/issuing/transactions/create_unlinked_refund', $params, $opts); + } + + /** + * Refund a test-mode Transaction. + * + * @param string $id + * @param null|array $params + * @param null|array|\SimplePay\Vendor\Stripe\Util\RequestOptions $opts + * + * @throws \SimplePay\Vendor\Stripe\Exception\ApiErrorException if the request fails + * + * @return \SimplePay\Vendor\Stripe\Issuing\Transaction + */ + public function refund($id, $params = null, $opts = null) + { + return $this->request('post', $this->buildPath('/v1/test_helpers/issuing/transactions/%s/refund', $id), $params, $opts); + } +} diff --git a/lib/Stripe/lib/Service/TokenService.php b/lib/Stripe/lib/Service/TokenService.php index 70402cca..d34b9759 100644 --- a/lib/Stripe/lib/Service/TokenService.php +++ b/lib/Stripe/lib/Service/TokenService.php @@ -7,9 +7,9 @@ class TokenService extends \SimplePay\Vendor\Stripe\Service\AbstractService { /** - * Creates a single-use token that represents a bank account’s details. This token - * can be used with any API method in place of a bank account dictionary. This - * token can be used only once, by attaching it to a Custom + * Creates a single-use token that represents a bank account’s details. You can use + * this token with any API method in place of a bank account dictionary. You can + * only use this token once. To do so, attach it to a Custom * account. * * @param null|array $params diff --git a/lib/Stripe/lib/Service/Treasury/FinancialAccountService.php b/lib/Stripe/lib/Service/Treasury/FinancialAccountService.php index 165e84ad..396a1e09 100644 --- a/lib/Stripe/lib/Service/Treasury/FinancialAccountService.php +++ b/lib/Stripe/lib/Service/Treasury/FinancialAccountService.php @@ -62,7 +62,7 @@ public function retrieve($id, $params = null, $opts = null) * * @throws \SimplePay\Vendor\Stripe\Exception\ApiErrorException if the request fails * - * @return \SimplePay\Vendor\Stripe\Treasury\FinancialAccount + * @return \SimplePay\Vendor\Stripe\Treasury\FinancialAccountFeatures */ public function retrieveFeatures($id, $params = null, $opts = null) { @@ -94,7 +94,7 @@ public function update($id, $params = null, $opts = null) * * @throws \SimplePay\Vendor\Stripe\Exception\ApiErrorException if the request fails * - * @return \SimplePay\Vendor\Stripe\Treasury\FinancialAccount + * @return \SimplePay\Vendor\Stripe\Treasury\FinancialAccountFeatures */ public function updateFeatures($id, $params = null, $opts = null) { diff --git a/lib/Stripe/lib/SetupAttempt.php b/lib/Stripe/lib/SetupAttempt.php index b5e88db8..48bc2430 100644 --- a/lib/Stripe/lib/SetupAttempt.php +++ b/lib/Stripe/lib/SetupAttempt.php @@ -5,15 +5,15 @@ namespace SimplePay\Vendor\Stripe; /** - * A SetupAttempt describes one attempted confirmation of a SetupIntent, whether - * that confirmation was successful or unsuccessful. You can use SetupAttempts to - * inspect details of a specific attempt at setting up a payment method using a - * SetupIntent. + * A SetupAttempt describes one attempted confirmation of a SetupIntent, + * whether that confirmation is successful or unsuccessful. You can use + * SetupAttempts to inspect details of a specific attempt at setting up a + * payment method using a SetupIntent. * * @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|\SimplePay\Vendor\Stripe\StripeObject $application The value of application on the SetupIntent at the time of this confirmation. - * @property bool $attach_to_self

If present, the SetupIntent's payment method will be attached to the in-context SimplePay\Vendor\Stripe Account.

It can only be used for this SimplePay\Vendor\Stripe Account’s own money movement flows like InboundTransfer and OutboundTransfers. It cannot be set to true when setting up a PaymentMethod for a Customer, and defaults to false when attaching a PaymentMethod to a Customer.

+ * @property null|bool $attach_to_self

If present, the SetupIntent's payment method will be attached to the in-context SimplePay\Vendor\Stripe Account.

It can only be used for this SimplePay\Vendor\Stripe Account’s own money movement flows like InboundTransfer and OutboundTransfers. It cannot be set to true when setting up a PaymentMethod for a Customer, and defaults to false when attaching a PaymentMethod to a Customer.

* @property int $created Time at which the object was created. Measured in seconds since the Unix epoch. * @property null|string|\SimplePay\Vendor\Stripe\Customer $customer The value of customer 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.

diff --git a/lib/Stripe/lib/SetupIntent.php b/lib/Stripe/lib/SetupIntent.php index d1351192..e153de16 100644 --- a/lib/Stripe/lib/SetupIntent.php +++ b/lib/Stripe/lib/SetupIntent.php @@ -5,45 +5,33 @@ namespace SimplePay\Vendor\Stripe; /** - * A SetupIntent guides you through the process of setting up and saving a - * customer's payment credentials for future payments. For example, you could use a - * SetupIntent to set up and save your customer's card without immediately - * collecting a payment. Later, you can use PaymentIntents to drive - * the payment flow. + * A SetupIntent guides you through the process of setting up and saving a customer's payment credentials for future payments. + * For example, you can use a SetupIntent to set up and save your customer's card without immediately collecting a payment. + * Later, you can use PaymentIntents to drive the payment flow. * - * Create a SetupIntent as soon as you're ready to collect your customer's payment - * credentials. Do not maintain long-lived, unconfirmed SetupIntents as they may no - * longer be valid. The SetupIntent then transitions through multiple statuses as - * it guides you through the setup process. + * Create a SetupIntent when you're ready to collect your customer's payment credentials. + * Don't maintain long-lived, unconfirmed SetupIntents because they might not be valid. + * The SetupIntent transitions through multiple statuses as it guides + * you through the setup process. * - * Successful SetupIntents result in payment credentials that are optimized for - * future payments. For example, cardholders in certain regions may need to be - * run through Strong Customer - * Authentication at the time of payment method collection in order to - * streamline later off-session payments. - * If the SetupIntent is used with a Customer, - * upon success, it will automatically attach the resulting payment method to that - * Customer. We recommend using SetupIntents or setup_future_usage - * on PaymentIntents to save payment methods in order to prevent saving invalid or - * unoptimized payment methods. + * Successful SetupIntents result in payment credentials that are optimized for future payments. + * For example, cardholders in certain regions might need to be run through + * Strong Customer Authentication during payment method collection + * to streamline later off-session payments. + * If you use the SetupIntent with a Customer, + * it automatically attaches the resulting payment method to that Customer after successful setup. + * We recommend using SetupIntents or setup_future_usage on + * PaymentIntents to save payment methods to prevent saving invalid or unoptimized payment methods. * - * By using SetupIntents, you ensure that your customers experience the minimum set - * of required friction, even as regulations change over time. + * By using SetupIntents, you can reduce friction for your customers, even as regulations change over time. * - * Related guide: Setup - * Intents API. + * Related guide: Setup Intents API * * @property string $id Unique identifier for the object. * @property string $object String representing the object's type. Objects of the same type share the same value. * @property null|string|\SimplePay\Vendor\Stripe\StripeObject $application ID of the Connect application that created the SetupIntent. - * @property bool $attach_to_self

If present, the SetupIntent's payment method will be attached to the in-context SimplePay\Vendor\Stripe Account.

It can only be used for this SimplePay\Vendor\Stripe Account’s own money movement flows like InboundTransfer and OutboundTransfers. It cannot be set to true when setting up a PaymentMethod for a Customer, and defaults to false when attaching a PaymentMethod to a Customer.

+ * @property null|bool $attach_to_self

If present, the SetupIntent's payment method will be attached to the in-context SimplePay\Vendor\Stripe Account.

It can only be used for this SimplePay\Vendor\Stripe Account’s own money movement flows like InboundTransfer and OutboundTransfers. It cannot be set to true when setting up a PaymentMethod for a Customer, and defaults to false when attaching a PaymentMethod to a Customer.

+ * @property null|\SimplePay\Vendor\Stripe\StripeObject $automatic_payment_methods Settings for dynamic payment methods compatible with this Setup Intent * @property null|string $cancellation_reason Reason for cancellation of this SetupIntent, one of abandoned, requested_by_customer, or duplicate. * @property null|string $client_secret

The client secret of this SetupIntent. Used for client-side retrieval using a publishable key.

The client secret can be used to complete payment setup from your frontend. It should not be stored, logged, or exposed to anyone other than the customer. Make sure that you have TLS enabled on any page that includes the client secret.

* @property int $created Time at which the object was created. Measured in seconds since the Unix epoch. @@ -58,7 +46,8 @@ * @property null|\SimplePay\Vendor\Stripe\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|string|\SimplePay\Vendor\Stripe\Account $on_behalf_of The account (if any) for which the setup is intended. * @property null|string|\SimplePay\Vendor\Stripe\PaymentMethod $payment_method ID of the payment method used with this SetupIntent. - * @property null|\SimplePay\Vendor\Stripe\StripeObject $payment_method_options Payment-method-specific configuration for this SetupIntent. + * @property null|\SimplePay\Vendor\Stripe\StripeObject $payment_method_configuration_details Information about the payment method configuration used for this Setup Intent. + * @property null|\SimplePay\Vendor\Stripe\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. * @property null|string|\SimplePay\Vendor\Stripe\Mandate $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. @@ -73,6 +62,10 @@ class SetupIntent extends ApiResource use ApiOperations\Retrieve; use ApiOperations\Update; + const CANCELLATION_REASON_ABANDONED = 'abandoned'; + const CANCELLATION_REASON_DUPLICATE = 'duplicate'; + const CANCELLATION_REASON_REQUESTED_BY_CUSTOMER = 'requested_by_customer'; + const STATUS_CANCELED = 'canceled'; const STATUS_PROCESSING = 'processing'; const STATUS_REQUIRES_ACTION = 'requires_action'; diff --git a/lib/Stripe/lib/ShippingRate.php b/lib/Stripe/lib/ShippingRate.php index a12936db..9ceca5a6 100644 --- a/lib/Stripe/lib/ShippingRate.php +++ b/lib/Stripe/lib/ShippingRate.php @@ -6,10 +6,7 @@ /** * Shipping rates describe the price of shipping presented to your customers and - * can be applied to Checkout Sessions - * and Orders to collect - * shipping costs. + * applied to a purchase. For more information, see Charge for shipping. * * @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. @@ -17,7 +14,7 @@ * @property int $created Time at which the object was created. Measured in seconds since the Unix epoch. * @property null|\SimplePay\Vendor\Stripe\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 \SimplePay\Vendor\Stripe\StripeObject $fixed_amount + * @property null|\SimplePay\Vendor\Stripe\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 \SimplePay\Vendor\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 $tax_behavior Specifies whether the rate is considered inclusive of taxes or exclusive of taxes. One of inclusive, exclusive, or unspecified. diff --git a/lib/Stripe/lib/Sigma/ScheduledQueryRun.php b/lib/Stripe/lib/Sigma/ScheduledQueryRun.php index f335a3be..c6d91eb8 100644 --- a/lib/Stripe/lib/Sigma/ScheduledQueryRun.php +++ b/lib/Stripe/lib/Sigma/ScheduledQueryRun.php @@ -5,17 +5,16 @@ namespace SimplePay\Vendor\Stripe\Sigma; /** - * If you have scheduled - * a Sigma query, you'll receive a - * sigma.scheduled_query_run.created webhook each time the query runs. - * The webhook contains a ScheduledQueryRun object, which you can use - * to retrieve the query results. + * If you have scheduled a Sigma query, you'll + * receive a sigma.scheduled_query_run.created webhook each time the query + * runs. The webhook contains a ScheduledQueryRun object, which you can use to + * retrieve the query results. * * @property string $id Unique identifier for the object. * @property string $object String representing the object's type. Objects of the same type share the same value. * @property int $created Time at which the object was created. Measured in seconds since the Unix epoch. * @property int $data_load_time When the query was run, Sigma contained a snapshot of your SimplePay\Vendor\Stripe data at this time. - * @property \SimplePay\Vendor\Stripe\StripeObject $error + * @property null|\SimplePay\Vendor\Stripe\StripeObject $error * @property null|\SimplePay\Vendor\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 int $result_available_until Time at which the result expires and is no longer available for download. diff --git a/lib/Stripe/lib/Source.php b/lib/Stripe/lib/Source.php index 2d103219..fc024a93 100644 --- a/lib/Stripe/lib/Source.php +++ b/lib/Stripe/lib/Source.php @@ -5,59 +5,55 @@ namespace SimplePay\Vendor\Stripe; /** - * Source objects allow you to accept a variety of payment methods. - * They represent a customer's payment instrument, and can be used with the SimplePay\Vendor\Stripe - * API just like a Card object: once chargeable, they can be charged, - * or can be attached to customers. + * Source objects allow you to accept a variety of payment methods. They + * represent a customer's payment instrument, and can be used with the SimplePay\Vendor\Stripe API + * just like a Card object: once chargeable, they can be charged, or can be + * attached to customers. * - * SimplePay\Vendor\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. + * SimplePay\Vendor\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. + * Related guides: Sources API and Sources & Customers. * * @property string $id Unique identifier for the object. * @property string $object String representing the object's type. Objects of the same type share the same value. - * @property \SimplePay\Vendor\Stripe\StripeObject $ach_credit_transfer - * @property \SimplePay\Vendor\Stripe\StripeObject $ach_debit - * @property \SimplePay\Vendor\Stripe\StripeObject $acss_debit - * @property \SimplePay\Vendor\Stripe\StripeObject $alipay + * @property null|\SimplePay\Vendor\Stripe\StripeObject $ach_credit_transfer + * @property null|\SimplePay\Vendor\Stripe\StripeObject $ach_debit + * @property null|\SimplePay\Vendor\Stripe\StripeObject $acss_debit + * @property null|\SimplePay\Vendor\Stripe\StripeObject $alipay * @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 total amount associated with the source. This is the amount for which the source will be chargeable once ready. Required for single_use sources. - * @property \SimplePay\Vendor\Stripe\StripeObject $au_becs_debit - * @property \SimplePay\Vendor\Stripe\StripeObject $bancontact - * @property \SimplePay\Vendor\Stripe\StripeObject $card - * @property \SimplePay\Vendor\Stripe\StripeObject $card_present + * @property null|\SimplePay\Vendor\Stripe\StripeObject $au_becs_debit + * @property null|\SimplePay\Vendor\Stripe\StripeObject $bancontact + * @property null|\SimplePay\Vendor\Stripe\StripeObject $card + * @property null|\SimplePay\Vendor\Stripe\StripeObject $card_present * @property string $client_secret The client secret of the source. Used for client-side retrieval using a publishable key. - * @property \SimplePay\Vendor\Stripe\StripeObject $code_verification + * @property null|\SimplePay\Vendor\Stripe\StripeObject $code_verification * @property int $created Time at which the object was created. Measured in seconds since the Unix epoch. * @property null|string $currency Three-letter ISO code for the currency associated with the source. This is the currency for which the source will be chargeable once ready. Required for single_use sources. - * @property string $customer The ID of the customer to which this source is attached. This will not be present when the source has not been attached to a customer. - * @property \SimplePay\Vendor\Stripe\StripeObject $eps + * @property null|string $customer The ID of the customer to which this source is attached. This will not be present when the source has not been attached to a customer. + * @property null|\SimplePay\Vendor\Stripe\StripeObject $eps * @property string $flow The authentication flow of the source. flow is one of redirect, receiver, code_verification, none. - * @property \SimplePay\Vendor\Stripe\StripeObject $giropay - * @property \SimplePay\Vendor\Stripe\StripeObject $ideal - * @property \SimplePay\Vendor\Stripe\StripeObject $klarna + * @property null|\SimplePay\Vendor\Stripe\StripeObject $giropay + * @property null|\SimplePay\Vendor\Stripe\StripeObject $ideal + * @property null|\SimplePay\Vendor\Stripe\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 null|\SimplePay\Vendor\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 \SimplePay\Vendor\Stripe\StripeObject $multibanco + * @property null|\SimplePay\Vendor\Stripe\StripeObject $multibanco * @property null|\SimplePay\Vendor\Stripe\StripeObject $owner Information about the owner of the payment instrument that may be used or required by particular source types. - * @property \SimplePay\Vendor\Stripe\StripeObject $p24 - * @property \SimplePay\Vendor\Stripe\StripeObject $paypal - * @property \SimplePay\Vendor\Stripe\StripeObject $receiver - * @property \SimplePay\Vendor\Stripe\StripeObject $redirect - * @property \SimplePay\Vendor\Stripe\StripeObject $sepa_credit_transfer - * @property \SimplePay\Vendor\Stripe\StripeObject $sepa_debit - * @property \SimplePay\Vendor\Stripe\StripeObject $sofort - * @property \SimplePay\Vendor\Stripe\StripeObject $source_order + * @property null|\SimplePay\Vendor\Stripe\StripeObject $p24 + * @property null|\SimplePay\Vendor\Stripe\StripeObject $receiver + * @property null|\SimplePay\Vendor\Stripe\StripeObject $redirect + * @property null|\SimplePay\Vendor\Stripe\StripeObject $sepa_credit_transfer + * @property null|\SimplePay\Vendor\Stripe\StripeObject $sepa_debit + * @property null|\SimplePay\Vendor\Stripe\StripeObject $sofort + * @property null|\SimplePay\Vendor\Stripe\StripeObject $source_order * @property null|string $statement_descriptor Extra information about a source. This will appear on your customer's statement every time you charge the source. * @property string $status The status of the source, one of canceled, chargeable, consumed, failed, or pending. Only chargeable sources can be used to create a charge. - * @property \SimplePay\Vendor\Stripe\StripeObject $three_d_secure + * @property null|\SimplePay\Vendor\Stripe\StripeObject $three_d_secure * @property string $type The type of the source. The type is a payment method, one of ach_credit_transfer, ach_debit, alipay, bancontact, card, card_present, eps, giropay, ideal, multibanco, klarna, p24, sepa_debit, sofort, three_d_secure, or wechat. An additional hash is included on the source with a name matching this value. It contains additional information specific to the payment method used. * @property null|string $usage Either reusable or single_use. Whether this source should be reusable or not. Some source types may or may not be reusable by construction, while others may leave the option at creation. If an incompatible value is passed, an error will be returned. - * @property \SimplePay\Vendor\Stripe\StripeObject $wechat + * @property null|\SimplePay\Vendor\Stripe\StripeObject $wechat */ class Source extends ApiResource { @@ -78,6 +74,26 @@ class Source extends ApiResource const STATUS_FAILED = 'failed'; const STATUS_PENDING = 'pending'; + const TYPE_ACH_CREDIT_TRANSFER = 'ach_credit_transfer'; + const TYPE_ACH_DEBIT = 'ach_debit'; + const TYPE_ACSS_DEBIT = 'acss_debit'; + const TYPE_ALIPAY = 'alipay'; + const TYPE_AU_BECS_DEBIT = 'au_becs_debit'; + const TYPE_BANCONTACT = 'bancontact'; + const TYPE_CARD = 'card'; + const TYPE_CARD_PRESENT = 'card_present'; + const TYPE_EPS = 'eps'; + const TYPE_GIROPAY = 'giropay'; + const TYPE_IDEAL = 'ideal'; + const TYPE_KLARNA = 'klarna'; + const TYPE_MULTIBANCO = 'multibanco'; + const TYPE_P24 = 'p24'; + const TYPE_SEPA_CREDIT_TRANSFER = 'sepa_credit_transfer'; + const TYPE_SEPA_DEBIT = 'sepa_debit'; + const TYPE_SOFORT = 'sofort'; + const TYPE_THREE_D_SECURE = 'three_d_secure'; + const TYPE_WECHAT = 'wechat'; + const USAGE_REUSABLE = 'reusable'; const USAGE_SINGLE_USE = 'single_use'; @@ -129,7 +145,7 @@ public function detach($params = null, $opts = null) * * @throws \SimplePay\Vendor\Stripe\Exception\ApiErrorException if the request fails * - * @return \SimplePay\Vendor\Stripe\Collection<\SimplePay\Vendor\Stripe\SourceTransaction> list of SourceTransactions + * @return \SimplePay\Vendor\Stripe\Collection<\SimplePay\Vendor\Stripe\SourceTransaction> list of source transactions */ public static function allSourceTransactions($id, $params = null, $opts = null) { diff --git a/lib/Stripe/lib/SourceTransaction.php b/lib/Stripe/lib/SourceTransaction.php index 94131fca..7bf6f3b3 100644 --- a/lib/Stripe/lib/SourceTransaction.php +++ b/lib/Stripe/lib/SourceTransaction.php @@ -1,20 +1,48 @@ ISO currency code, in lowercase. Must be a supported currency. + * @property null|\SimplePay\Vendor\Stripe\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 null|\SimplePay\Vendor\Stripe\StripeObject $paper_check + * @property null|\SimplePay\Vendor\Stripe\StripeObject $sepa_credit_transfer + * @property string $source The ID of the source this transaction is attached to. + * @property string $status The status of the transaction, one of succeeded, pending, or failed. + * @property string $type The type of source this transaction is attached to. */ class SourceTransaction extends ApiResource { const OBJECT_NAME = 'source_transaction'; + + const TYPE_ACH_CREDIT_TRANSFER = 'ach_credit_transfer'; + const TYPE_ACH_DEBIT = 'ach_debit'; + const TYPE_ALIPAY = 'alipay'; + const TYPE_BANCONTACT = 'bancontact'; + const TYPE_CARD = 'card'; + const TYPE_CARD_PRESENT = 'card_present'; + const TYPE_EPS = 'eps'; + const TYPE_GIROPAY = 'giropay'; + const TYPE_IDEAL = 'ideal'; + const TYPE_KLARNA = 'klarna'; + const TYPE_MULTIBANCO = 'multibanco'; + const TYPE_P24 = 'p24'; + const TYPE_SEPA_DEBIT = 'sepa_debit'; + const TYPE_SOFORT = 'sofort'; + const TYPE_THREE_D_SECURE = 'three_d_secure'; + const TYPE_WECHAT = 'wechat'; } diff --git a/lib/Stripe/lib/Stripe.php b/lib/Stripe/lib/Stripe.php index 3f5f41a8..a4f324b2 100644 --- a/lib/Stripe/lib/Stripe.php +++ b/lib/Stripe/lib/Stripe.php @@ -22,8 +22,8 @@ class Stripe /** @var string The base URL for the SimplePay\Vendor\Stripe API uploads endpoint. */ public static $apiUploadBase = 'https://files.stripe.com'; - /** @var null|string The version of the SimplePay\Vendor\Stripe API to use for requests. */ - public static $apiVersion = null; + /** @var string The version of the SimplePay\Vendor\Stripe API to use for requests. */ + public static $apiVersion = \SimplePay\Vendor\Stripe\Util\ApiVersion::CURRENT; /** @var null|string The account ID for connected accounts requests. */ public static $accountId = null; @@ -58,7 +58,7 @@ class Stripe /** @var float Initial delay between retries, in seconds */ private static $initialNetworkRetryDelay = 0.5; - const VERSION = '10.6.0-beta.1'; + const VERSION = '13.3.0'; /** * @return string the API key used for requests @@ -119,8 +119,7 @@ public static function setClientId($clientId) } /** - * @return string The API version used for requests. null if we're using the - * latest version. + * @return string the API version used for requests */ public static function getApiVersion() { diff --git a/lib/Stripe/lib/StripeClient.php b/lib/Stripe/lib/StripeClient.php index 7f0d5afd..180168ba 100644 --- a/lib/Stripe/lib/StripeClient.php +++ b/lib/Stripe/lib/StripeClient.php @@ -1,22 +1,21 @@ getService($name); + } + + public function getService($name) { if (null === $this->coreServiceFactory) { $this->coreServiceFactory = new \SimplePay\Vendor\Stripe\Service\CoreServiceFactory($this); } - return $this->coreServiceFactory->__get($name); + return $this->coreServiceFactory->getService($name); } } diff --git a/lib/Stripe/lib/StripeClientInterface.php b/lib/Stripe/lib/StripeClientInterface.php index 19b5b421..873ae98b 100644 --- a/lib/Stripe/lib/StripeClientInterface.php +++ b/lib/Stripe/lib/StripeClientInterface.php @@ -10,7 +10,7 @@ interface StripeClientInterface extends BaseStripeClientInterface /** * Sends a request to Stripe's API. * - * @param string $method the HTTP method + * @param 'delete'|'get'|'post' $method the HTTP method * @param string $path the path of the request * @param array $params the parameters of the request * @param array|\SimplePay\Vendor\Stripe\Util\RequestOptions $opts the special modifiers of the request diff --git a/lib/Stripe/lib/StripeObject.php b/lib/Stripe/lib/StripeObject.php index ce6d38fc..679f0a3b 100644 --- a/lib/Stripe/lib/StripeObject.php +++ b/lib/Stripe/lib/StripeObject.php @@ -4,6 +4,8 @@ /** * Class StripeObject. + * + * @property null|string $id */ class StripeObject implements \ArrayAccess, \Countable, \JsonSerializable { diff --git a/lib/Stripe/lib/Subscription.php b/lib/Stripe/lib/Subscription.php index 26547e66..d24b3604 100644 --- a/lib/Stripe/lib/Subscription.php +++ b/lib/Stripe/lib/Subscription.php @@ -7,20 +7,19 @@ /** * Subscriptions allow you to charge a customer on a recurring basis. * - * Related guide: Creating - * Subscriptions. + * Related guide: Creating subscriptions * * @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|\SimplePay\Vendor\Stripe\StripeObject $application ID of the Connect Application that created the subscription. - * @property null|float $application_fee_percent A non-negative decimal between 0 and 100, with at most two decimal places. This represents the percentage of the subscription invoice subtotal that will be transferred to the application owner's SimplePay\Vendor\Stripe account. + * @property null|float $application_fee_percent A non-negative decimal between 0 and 100, with at most two decimal places. This represents the percentage of the subscription invoice total that will be transferred to the application owner's SimplePay\Vendor\Stripe account. * @property \SimplePay\Vendor\Stripe\StripeObject $automatic_tax * @property int $billing_cycle_anchor Determines the date of the first full invoice, and, for plans with month or year intervals, the day of the month for subsequent invoices. The timestamp is in UTC format. * @property null|\SimplePay\Vendor\Stripe\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 If the subscription has been canceled with the at_period_end flag set to true, cancel_at_period_end on the subscription will be true. You can use this attribute to determine whether a subscription that has a status of active is scheduled to be canceled at the end of the current period. * @property null|int $canceled_at If the subscription has been canceled, the date of that cancellation. If the subscription was canceled with cancel_at_period_end, canceled_at will reflect the time of the most recent update request, not the end of the subscription period when the subscription is automatically moved to a canceled state. + * @property null|\SimplePay\Vendor\Stripe\StripeObject $cancellation_details Details about why this subscription was cancelled * @property string $collection_method Either charge_automatically, or send_invoice. When charging automatically, SimplePay\Vendor\Stripe will attempt to pay this subscription at the end of the cycle using the default source attached to the customer. When sending an invoice, SimplePay\Vendor\Stripe will email your customer an invoice with payment instructions and mark the subscription as active. * @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. @@ -31,9 +30,8 @@ * @property null|string|\SimplePay\Vendor\Stripe\PaymentMethod $default_payment_method ID of the default payment method for the subscription. It must belong to the customer associated with the subscription. This takes precedence over default_source. If neither are set, invoices will use the customer's invoice_settings.default_payment_method or default_source. * @property null|string|\SimplePay\Vendor\Stripe\Account|\SimplePay\Vendor\Stripe\BankAccount|\SimplePay\Vendor\Stripe\Card|\SimplePay\Vendor\Stripe\Source $default_source ID of the default payment source for the subscription. It must belong to the customer associated with the subscription and be in a chargeable state. If default_payment_method is also set, default_payment_method will take precedence. If neither are set, invoices will use the customer's invoice_settings.default_payment_method or default_source. * @property null|\SimplePay\Vendor\Stripe\TaxRate[] $default_tax_rates The tax rates that will apply to any subscription item that does not have tax_rates set. Invoices created will have their default_tax_rates populated from the subscription. - * @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 SimplePay\Vendor\Stripe surfaces. + * @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 SimplePay\Vendor\Stripe surfaces and certain local payment methods UIs. * @property null|\SimplePay\Vendor\Stripe\Discount $discount Describes the current discount applied to this subscription, if there is one. When billing, a discount applied to a subscription overrides a discount applied on a customer-wide basis. - * @property null|(string|\SimplePay\Vendor\Stripe\Discount)[] $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 \SimplePay\Vendor\Stripe\Collection<\SimplePay\Vendor\Stripe\SubscriptionItem> $items List of subscription items, each with an attached price. * @property null|string|\SimplePay\Vendor\Stripe\Invoice $latest_invoice The most recent invoice this subscription has generated. @@ -46,10 +44,9 @@ * @property null|\SimplePay\Vendor\Stripe\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|string|\SimplePay\Vendor\Stripe\SetupIntent $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|\SimplePay\Vendor\Stripe\StripeObject $pending_update If specified, pending updates that will be applied to the subscription once the latest_invoice has been paid. - * @property null|\SimplePay\Vendor\Stripe\StripeObject $prebilling Time period and invoice for a Subscription billed in advance. * @property null|string|\SimplePay\Vendor\Stripe\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, or unpaid.

For collection_method=charge_automatically a subscription moves into incomplete if the initial payment attempt fails. A subscription in this state can only have metadata and default_source updated. Once the first invoice is paid, the subscription moves into an active state. If the first invoice is not paid within 23 hours, the subscription transitions to incomplete_expired. This is a terminal state, 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.

If subscription collection_method=charge_automatically it becomes past_due when payment to renew it fails and canceled or unpaid (depending on your subscriptions settings) when SimplePay\Vendor\Stripe has exhausted all payment retry attempts.

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.

+ * @property string $status

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

For collection_method=charge_automatically a subscription moves into incomplete if the initial payment attempt fails. A subscription in this state can only have metadata and default_source updated. Once the first invoice is paid, the subscription moves into an active state. If the first invoice is not paid within 23 hours, the subscription transitions to incomplete_expired. This is a terminal state, 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.

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 SimplePay\Vendor\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.

* @property null|string|\SimplePay\Vendor\Stripe\TestHelpers\TestClock $test_clock ID of the test clock this subscription belongs to. * @property null|\SimplePay\Vendor\Stripe\StripeObject $transfer_data The account (if any) the subscription's payments will be attributed to for tax reporting, and where funds from each payment will be transferred to for each of the subscription's invoices. * @property null|int $trial_end If the subscription has a trial, the end of that trial. @@ -66,14 +63,8 @@ class Subscription extends ApiResource use ApiOperations\Search; use ApiOperations\Update; - const PAYMENT_BEHAVIOR_ALLOW_INCOMPLETE = 'allow_incomplete'; - const PAYMENT_BEHAVIOR_DEFAULT_INCOMPLETE = 'default_incomplete'; - const PAYMENT_BEHAVIOR_ERROR_IF_INCOMPLETE = 'error_if_incomplete'; - const PAYMENT_BEHAVIOR_PENDING_IF_INCOMPLETE = 'pending_if_incomplete'; - - const PRORATION_BEHAVIOR_ALWAYS_INVOICE = 'always_invoice'; - const PRORATION_BEHAVIOR_CREATE_PRORATIONS = 'create_prorations'; - const PRORATION_BEHAVIOR_NONE = 'none'; + const COLLECTION_METHOD_CHARGE_AUTOMATICALLY = 'charge_automatically'; + const COLLECTION_METHOD_SEND_INVOICE = 'send_invoice'; const STATUS_ACTIVE = 'active'; const STATUS_CANCELED = 'canceled'; @@ -117,6 +108,15 @@ public function deleteDiscount($params = null, $opts = null) return $this; } + const PAYMENT_BEHAVIOR_ALLOW_INCOMPLETE = 'allow_incomplete'; + const PAYMENT_BEHAVIOR_DEFAULT_INCOMPLETE = 'default_incomplete'; + const PAYMENT_BEHAVIOR_ERROR_IF_INCOMPLETE = 'error_if_incomplete'; + const PAYMENT_BEHAVIOR_PENDING_IF_INCOMPLETE = 'pending_if_incomplete'; + + const PRORATION_BEHAVIOR_ALWAYS_INVOICE = 'always_invoice'; + const PRORATION_BEHAVIOR_CREATE_PRORATIONS = 'create_prorations'; + const PRORATION_BEHAVIOR_NONE = 'none'; + /** * @param null|array $params * @param null|array|string $opts @@ -157,7 +157,7 @@ public function resume($params = null, $opts = null) * * @throws \SimplePay\Vendor\Stripe\Exception\ApiErrorException if the request fails * - * @return \SimplePay\Vendor\Stripe\SearchResult the subscription search results + * @return \SimplePay\Vendor\Stripe\SearchResult<\SimplePay\Vendor\Stripe\Subscription> the subscription search results */ public static function search($params = null, $opts = null) { diff --git a/lib/Stripe/lib/SubscriptionItem.php b/lib/Stripe/lib/SubscriptionItem.php index fa2af77a..a7fa8932 100644 --- a/lib/Stripe/lib/SubscriptionItem.php +++ b/lib/Stripe/lib/SubscriptionItem.php @@ -5,21 +5,19 @@ namespace SimplePay\Vendor\Stripe; /** - * Subscription items allow you to create customer subscriptions with more than one - * plan, making it easy to represent complex billing relationships. + * Subscription items allow you to create customer subscriptions with more than + * one plan, making it easy to represent complex billing relationships. * * @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|\SimplePay\Vendor\Stripe\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 null|(string|\SimplePay\Vendor\Stripe\Discount)[] $discounts The discounts applied to the subscription item. Subscription item discounts are applied before subscription discounts. Use expand[]=discounts to expand each discount. * @property \SimplePay\Vendor\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 \SimplePay\Vendor\Stripe\Plan $plan

You can now model subscriptions more flexibly using the Prices API. It replaces the Plans API and is backwards compatible to simplify your migration.

Plans define the base price, currency, and billing cycle for recurring purchases of products. Products help you track inventory or provisioning, and plans help you track pricing. Different physical goods or levels of service should be represented by products, and pricing options should be represented by plans. This approach lets you change prices without having to change your provisioning scheme.

For example, you might have a single "gold" product that has plans for $10/month, $100/year, €9/month, and €90/year.

Related guides: Set up a subscription and more about products and prices.

* @property \SimplePay\Vendor\Stripe\Price $price

Prices define the unit cost, currency, and (optional) billing cycle for both recurring and one-time purchases of products. Products help you track inventory or provisioning, and prices help you track payment terms. Different physical goods or levels of service should be represented by products, and pricing options should be represented by prices. This approach lets you change prices without having to change your provisioning scheme.

For example, you might have a single "gold" product that has prices for $10/month, $100/year, and €9 once.

Related guides: Set up a subscription, create an invoice, and more about products and prices.

- * @property int $quantity The quantity of the plan to which the customer should be subscribed. + * @property null|int $quantity The quantity of the plan to which the customer should be subscribed. * @property string $subscription The subscription this subscription_item belongs to. * @property null|\SimplePay\Vendor\Stripe\TaxRate[] $tax_rates The tax rates which apply to this subscription_item. When set, the default_tax_rates on the subscription do not apply to this subscription_item. - * @property null|\SimplePay\Vendor\Stripe\StripeObject $trial Options that configure the trial on the subscription item. */ class SubscriptionItem extends ApiResource { @@ -35,7 +33,7 @@ class SubscriptionItem extends ApiResource const PATH_USAGE_RECORDS = '/usage_records'; /** - * @param null|string $id the ID of the subscription item on which to create the usage record + * @param string $id the ID of the subscription item on which to create the usage record * @param null|array $params * @param null|array|string $opts * @@ -47,7 +45,6 @@ public static function createUsageRecord($id, $params = null, $opts = null) { return self::_createNestedResource($id, static::PATH_USAGE_RECORDS, $params, $opts); } - const PATH_USAGE_RECORD_SUMMARIES = '/usage_record_summaries'; /** diff --git a/lib/Stripe/lib/SubscriptionSchedule.php b/lib/Stripe/lib/SubscriptionSchedule.php index 8595a0ea..d8c67472 100644 --- a/lib/Stripe/lib/SubscriptionSchedule.php +++ b/lib/Stripe/lib/SubscriptionSchedule.php @@ -5,18 +5,13 @@ namespace SimplePay\Vendor\Stripe; /** - * A subscription schedule allows you to create and manage the lifecycle of a - * subscription by predefining expected changes. + * A subscription schedule allows you to create and manage the lifecycle of a subscription by predefining expected changes. * - * Related guide: Subscription - * Schedules. + * Related guide: Subscription schedules * * @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|\SimplePay\Vendor\Stripe\StripeObject $application ID of the Connect Application that created the schedule. - * @property null|\SimplePay\Vendor\Stripe\StripeObject $applies_to Details to identify the subscription schedule the quote line applies to. - * @property string $billing_behavior Configures when the subscription schedule generates prorations for phase transitions. Possible values are prorate_on_next_phase or prorate_up_front with the default being prorate_on_next_phase. prorate_on_next_phase will apply phase changes and generate prorations at transition time.prorate_up_front will bill for all phases within the current billing cycle up front. * @property null|int $canceled_at Time at which the subscription schedule was canceled. Measured in seconds since the Unix epoch. * @property null|int $completed_at Time at which the subscription schedule was completed. Measured in seconds since the Unix epoch. * @property int $created Time at which the object was created. Measured in seconds since the Unix epoch. @@ -27,7 +22,6 @@ * @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|\SimplePay\Vendor\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 \SimplePay\Vendor\Stripe\StripeObject[] $phases Configuration for the subscription schedule's phases. - * @property null|\SimplePay\Vendor\Stripe\StripeObject $prebilling Time period and invoice for a Subscription billed in advance. * @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. @@ -43,22 +37,16 @@ class SubscriptionSchedule extends ApiResource use ApiOperations\Retrieve; use ApiOperations\Update; - /** - * @param null|array $params - * @param null|array|string $opts - * - * @throws \SimplePay\Vendor\Stripe\Exception\ApiErrorException if the request fails - * - * @return \SimplePay\Vendor\Stripe\SubscriptionSchedule the amended subscription schedule - */ - public function amend($params = null, $opts = null) - { - $url = $this->instanceUrl() . '/amend'; - list($response, $opts) = $this->_request('post', $url, $params, $opts); - $this->refreshFrom($response, $opts); + const END_BEHAVIOR_CANCEL = 'cancel'; + const END_BEHAVIOR_NONE = 'none'; + const END_BEHAVIOR_RELEASE = 'release'; + const END_BEHAVIOR_RENEW = 'renew'; - return $this; - } + const STATUS_ACTIVE = 'active'; + const STATUS_CANCELED = 'canceled'; + const STATUS_COMPLETED = 'completed'; + const STATUS_NOT_STARTED = 'not_started'; + const STATUS_RELEASED = 'released'; /** * @param null|array $params diff --git a/lib/Stripe/lib/Tax/Calculation.php b/lib/Stripe/lib/Tax/Calculation.php index 1383fc87..d6abbff2 100644 --- a/lib/Stripe/lib/Tax/Calculation.php +++ b/lib/Stripe/lib/Tax/Calculation.php @@ -5,8 +5,9 @@ namespace SimplePay\Vendor\Stripe\Tax; /** - * A Tax Calculation allows you to calculate the tax to collect from - * your customer. + * A Tax Calculation allows you to calculate the tax to collect from your customer. + * + * Related guide: Calculate tax in your custom payment flow * * @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. @@ -14,10 +15,10 @@ * @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 \SimplePay\Vendor\Stripe\StripeObject $customer_details - * @property null|int $expires_at Timestamp of date at which the tax calculation will expire. Empty if the calculation is an unsaved preview. - * @property null|\SimplePay\Vendor\Stripe\Collection<\SimplePay\Vendor\Stripe\LineItem> $line_items The list of items the customer is purchasing. + * @property null|int $expires_at Timestamp of date at which the tax calculation will expire. + * @property null|\SimplePay\Vendor\Stripe\Collection<\SimplePay\Vendor\Stripe\Tax\CalculationLineItem> $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 null|string $reference A custom unique identifier, such as 'myOrder_123'. + * @property null|\SimplePay\Vendor\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 \SimplePay\Vendor\Stripe\StripeObject[] $tax_breakdown Breakdown of individual tax amounts that add up to the total. @@ -36,7 +37,7 @@ class Calculation extends \SimplePay\Vendor\Stripe\ApiResource * * @throws \SimplePay\Vendor\Stripe\Exception\ApiErrorException if the request fails * - * @return \SimplePay\Vendor\Stripe\Collection<\SimplePay\Vendor\Stripe\LineItem> list of TaxProductResourceTaxCalculationLineItems + * @return \SimplePay\Vendor\Stripe\Collection<\SimplePay\Vendor\Stripe\Tax\CalculationLineItem> list of calculation line items */ public static function allLineItems($id, $params = null, $opts = null) { diff --git a/lib/Stripe/lib/Tax/CalculationLineItem.php b/lib/Stripe/lib/Tax/CalculationLineItem.php new file mode 100644 index 00000000..c691e1b8 --- /dev/null +++ b/lib/Stripe/lib/Tax/CalculationLineItem.php @@ -0,0 +1,26 @@ +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 integer cents. + * @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|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. + * @property null|string $reference A custom identifier for this line item. + * @property string $tax_behavior Specifies whether the amount includes taxes. If tax_behavior=inclusive, then the amount includes taxes. + * @property null|\SimplePay\Vendor\Stripe\StripeObject[] $tax_breakdown Detailed account of taxes relevant to this line item. + * @property string $tax_code The tax code ID used for this resource. + */ +class CalculationLineItem extends \SimplePay\Vendor\Stripe\ApiResource +{ + const OBJECT_NAME = 'tax.calculation_line_item'; + + const TAX_BEHAVIOR_EXCLUSIVE = 'exclusive'; + const TAX_BEHAVIOR_INCLUSIVE = 'inclusive'; +} diff --git a/lib/Stripe/lib/Tax/Registration.php b/lib/Stripe/lib/Tax/Registration.php index f0339225..ee41cc4d 100644 --- a/lib/Stripe/lib/Tax/Registration.php +++ b/lib/Stripe/lib/Tax/Registration.php @@ -5,25 +5,21 @@ namespace SimplePay\Vendor\Stripe\Tax; /** - * A Tax Registration lets us know that your business is registered to - * collect tax on payments within a region, enabling you to automatically collect tax. + * A Tax Registration lets us know that your business is registered to collect tax on payments within a region, enabling you to automatically collect tax. * - * SimplePay\Vendor\Stripe will not register on your behalf with the relevant authorities when you - * create a Tax Registration object. For more information on how to - * register to collect tax, see our guide. + * SimplePay\Vendor\Stripe doesn't register on your behalf with the relevant authorities when you create a Tax Registration object. For more information on how to register to collect tax, see our guide. + * + * Related guide: Using the Registrations API * * @property string $id Unique identifier for the object. * @property string $object String representing the object's type. Objects of the same type share the same value. * @property int $active_from Time at which the registration becomes active. Measured in seconds since the Unix epoch. * @property string $country Two-letter country code (ISO 3166-1 alpha-2). + * @property \SimplePay\Vendor\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 null|string $state State, county, province, or region. * @property string $status The status of the registration. This field is present for convenience and can be deduced from active_from and expires_at. - * @property string $type The type of the registration. See our guide for more information about registration types. */ class Registration extends \SimplePay\Vendor\Stripe\ApiResource { @@ -36,10 +32,4 @@ class Registration extends \SimplePay\Vendor\Stripe\ApiResource const STATUS_ACTIVE = 'active'; const STATUS_EXPIRED = 'expired'; const STATUS_SCHEDULED = 'scheduled'; - - const TYPE_DOMESTIC_SMALL_SELLER = 'domestic_small_seller'; - const TYPE_SIMPLIFIED = 'simplified'; - const TYPE_STANDARD = 'standard'; - const TYPE_VAT_OSS_NON_UNION = 'vat_oss_non_union'; - const TYPE_VAT_OSS_UNION = 'vat_oss_union'; } diff --git a/lib/Stripe/lib/Tax/Settings.php b/lib/Stripe/lib/Tax/Settings.php index 5b60dcbe..99c09feb 100644 --- a/lib/Stripe/lib/Tax/Settings.php +++ b/lib/Stripe/lib/Tax/Settings.php @@ -5,16 +5,16 @@ namespace SimplePay\Vendor\Stripe\Tax; /** - * You can use Tax Settings to manage configurations used by SimplePay\Vendor\Stripe - * Tax calculations. + * You can use Tax Settings to manage configurations used by SimplePay\Vendor\Stripe Tax calculations. * - * Related guide: Account - * settings. + * Related guide: Using the Settings API * * @property string $object String representing the object's type. Objects of the same type share the same value. * @property \SimplePay\Vendor\Stripe\StripeObject $defaults + * @property null|\SimplePay\Vendor\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 \SimplePay\Vendor\Stripe\StripeObject[] $locations The places where your business is located. + * @property string $status The active status indicates you have all required settings to calculate tax. A status can transition out of active when new required settings are introduced. + * @property \SimplePay\Vendor\Stripe\StripeObject $status_details */ class Settings extends \SimplePay\Vendor\Stripe\SingletonApiResource { @@ -22,4 +22,7 @@ class Settings extends \SimplePay\Vendor\Stripe\SingletonApiResource use \SimplePay\Vendor\Stripe\ApiOperations\SingletonRetrieve; use \SimplePay\Vendor\Stripe\ApiOperations\Update; + + const STATUS_ACTIVE = 'active'; + const STATUS_PENDING = 'pending'; } diff --git a/lib/Stripe/lib/Tax/Transaction.php b/lib/Stripe/lib/Tax/Transaction.php index 38fa97e5..c51107b5 100644 --- a/lib/Stripe/lib/Tax/Transaction.php +++ b/lib/Stripe/lib/Tax/Transaction.php @@ -5,8 +5,9 @@ namespace SimplePay\Vendor\Stripe\Tax; /** - * A Tax Transaction records the tax collected from or refunded to - * your customer. + * A Tax Transaction records the tax collected from or refunded to your customer. + * + * Related guide: Calculate tax in your custom payment flow * * @property string $id Unique identifier for the transaction. * @property string $object String representing the object's type. Objects of the same type share the same value. @@ -14,11 +15,12 @@ * @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 \SimplePay\Vendor\Stripe\StripeObject $customer_details - * @property null|\SimplePay\Vendor\Stripe\Collection<\SimplePay\Vendor\Stripe\LineItem> $line_items The tax collected or refunded, by line item. + * @property null|\SimplePay\Vendor\Stripe\Collection<\SimplePay\Vendor\Stripe\Tax\TransactionLineItem> $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 null|\SimplePay\Vendor\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 $reference A custom unique identifier, such as 'myOrder_123'. * @property null|\SimplePay\Vendor\Stripe\StripeObject $reversal If type=reversal, contains information about what was reversed. + * @property null|\SimplePay\Vendor\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 string $type If reversal, this transaction reverses an earlier transaction. */ @@ -26,7 +28,6 @@ class Transaction extends \SimplePay\Vendor\Stripe\ApiResource { const OBJECT_NAME = 'tax.transaction'; - use \SimplePay\Vendor\Stripe\ApiOperations\Create; use \SimplePay\Vendor\Stripe\ApiOperations\Retrieve; const TYPE_REVERSAL = 'reversal'; @@ -40,9 +41,9 @@ class Transaction extends \SimplePay\Vendor\Stripe\ApiResource * * @return \SimplePay\Vendor\Stripe\Tax\Transaction the created transaction */ - public static function createReversal($params = null, $opts = null) + public static function createFromCalculation($params = null, $opts = null) { - $url = static::classUrl() . '/create_reversal'; + $url = static::classUrl() . '/create_from_calculation'; list($response, $opts) = static::_staticRequest('post', $url, $params, $opts); $obj = \SimplePay\Vendor\Stripe\Util\Util::convertToStripeObject($response->json, $opts); $obj->setLastResponse($response); @@ -51,18 +52,17 @@ public static function createReversal($params = null, $opts = null) } /** - * @param string $id * @param null|array $params * @param null|array|string $opts * * @throws \SimplePay\Vendor\Stripe\Exception\ApiErrorException if the request fails * - * @return \SimplePay\Vendor\Stripe\Collection<\SimplePay\Vendor\Stripe\LineItem> list of TaxProductResourceTaxTransactionLineItems + * @return \SimplePay\Vendor\Stripe\Tax\Transaction the created transaction */ - public static function allLineItems($id, $params = null, $opts = null) + public static function createReversal($params = null, $opts = null) { - $url = static::resourceUrl($id) . '/line_items'; - list($response, $opts) = static::_staticRequest('get', $url, $params, $opts); + $url = static::classUrl() . '/create_reversal'; + list($response, $opts) = static::_staticRequest('post', $url, $params, $opts); $obj = \SimplePay\Vendor\Stripe\Util\Util::convertToStripeObject($response->json, $opts); $obj->setLastResponse($response); @@ -70,16 +70,17 @@ public static function allLineItems($id, $params = null, $opts = null) } /** + * @param string $id * @param null|array $params * @param null|array|string $opts * * @throws \SimplePay\Vendor\Stripe\Exception\ApiErrorException if the request fails * - * @return \SimplePay\Vendor\Stripe\Collection<\SimplePay\Vendor\Stripe\Tax\Transaction> list of TaxProductResourceTaxTransactions + * @return \SimplePay\Vendor\Stripe\Collection<\SimplePay\Vendor\Stripe\Tax\TransactionLineItem> list of transaction line items */ - public static function allTransactions($params = null, $opts = null) + public static function allLineItems($id, $params = null, $opts = null) { - $url = static::classUrl(); + $url = static::resourceUrl($id) . '/line_items'; list($response, $opts) = static::_staticRequest('get', $url, $params, $opts); $obj = \SimplePay\Vendor\Stripe\Util\Util::convertToStripeObject($response->json, $opts); $obj->setLastResponse($response); diff --git a/lib/Stripe/lib/Tax/TransactionLineItem.php b/lib/Stripe/lib/Tax/TransactionLineItem.php new file mode 100644 index 00000000..2cbf8623 --- /dev/null +++ b/lib/Stripe/lib/Tax/TransactionLineItem.php @@ -0,0 +1,31 @@ +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 integer cents. + * @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|\SimplePay\Vendor\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. + * @property string $reference A custom identifier for this line item in the transaction. + * @property null|\SimplePay\Vendor\Stripe\StripeObject $reversal If type=reversal, contains information about what was reversed. + * @property string $tax_behavior Specifies whether the amount includes taxes. If tax_behavior=inclusive, then the amount includes taxes. + * @property string $tax_code The tax code ID used for this resource. + * @property string $type If reversal, this line item reverses an earlier transaction. + */ +class TransactionLineItem extends \SimplePay\Vendor\Stripe\ApiResource +{ + const OBJECT_NAME = 'tax.transaction_line_item'; + + const TAX_BEHAVIOR_EXCLUSIVE = 'exclusive'; + const TAX_BEHAVIOR_INCLUSIVE = 'inclusive'; + + const TYPE_REVERSAL = 'reversal'; + const TYPE_TRANSACTION = 'transaction'; +} diff --git a/lib/Stripe/lib/TaxCode.php b/lib/Stripe/lib/TaxCode.php index 85b75245..34445ea2 100644 --- a/lib/Stripe/lib/TaxCode.php +++ b/lib/Stripe/lib/TaxCode.php @@ -5,8 +5,7 @@ namespace SimplePay\Vendor\Stripe; /** - * Tax codes classify - * goods and services for tax purposes. + * Tax codes classify goods and services for tax purposes. * * @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. diff --git a/lib/Stripe/lib/TaxId.php b/lib/Stripe/lib/TaxId.php index 40255f17..a9454c51 100644 --- a/lib/Stripe/lib/TaxId.php +++ b/lib/Stripe/lib/TaxId.php @@ -5,12 +5,10 @@ namespace SimplePay\Vendor\Stripe; /** - * You can add one or multiple tax IDs to a customer. A customer's tax IDs - * are displayed on invoices and credit notes issued for the customer. + * You can add one or multiple tax IDs to a customer or account. + * Customer and account tax IDs get displayed on related invoices and credit notes. * - * Related guide: Customer - * Tax Identification Numbers. + * Related guides: Customer tax identification numbers, Account tax IDs * * @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 +16,7 @@ * @property int $created Time at which the object was created. Measured in seconds since the Unix epoch. * @property null|string|\SimplePay\Vendor\Stripe\Customer $customer ID of 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 string $type Type of the tax ID, one of ae_trn, au_abn, au_arn, bg_uic, br_cnpj, br_cpf, ca_bn, ca_gst_hst, ca_pst_bc, ca_pst_mb, ca_pst_sk, ca_qst, ch_vat, cl_tin, eg_tin, es_cif, eu_oss_vat, eu_vat, gb_vat, ge_vat, hk_br, hu_tin, id_npwp, il_vat, in_gst, is_vat, jp_cn, jp_rn, jp_trn, ke_pin, kr_brn, li_uid, mx_rfc, my_frp, my_itn, my_sst, no_vat, nz_gst, ph_tin, ru_inn, ru_kpp, sa_vat, sg_gst, sg_uen, si_tin, th_vat, tr_tin, tw_vat, ua_vat, us_ein, or za_vat. Note that some legacy tax IDs have type unknown + * @property string $type Type of the tax ID, one of ad_nrt, ae_trn, ar_cuit, au_abn, au_arn, bg_uic, bo_tin, br_cnpj, br_cpf, ca_bn, ca_gst_hst, ca_pst_bc, ca_pst_mb, ca_pst_sk, ca_qst, ch_vat, cl_tin, cn_tin, co_nit, cr_tin, do_rcn, ec_ruc, eg_tin, es_cif, eu_oss_vat, eu_vat, gb_vat, ge_vat, hk_br, hu_tin, id_npwp, il_vat, in_gst, is_vat, jp_cn, jp_rn, jp_trn, ke_pin, kr_brn, li_uid, mx_rfc, my_frp, my_itn, my_sst, no_vat, nz_gst, pe_ruc, ph_tin, ro_tin, rs_pib, ru_inn, ru_kpp, sa_vat, sg_gst, sg_uen, si_tin, sv_nit, th_vat, tr_tin, tw_vat, ua_vat, us_ein, uy_ruc, ve_rif, vn_tin, or za_vat. Note that some legacy tax IDs have type unknown * @property string $value Value of the tax ID. * @property null|\SimplePay\Vendor\Stripe\StripeObject $verification Tax ID verification information. */ @@ -28,10 +26,13 @@ class TaxId extends ApiResource use ApiOperations\Delete; + const TYPE_AD_NRT = 'ad_nrt'; const TYPE_AE_TRN = 'ae_trn'; + const TYPE_AR_CUIT = 'ar_cuit'; const TYPE_AU_ABN = 'au_abn'; const TYPE_AU_ARN = 'au_arn'; const TYPE_BG_UIC = 'bg_uic'; + const TYPE_BO_TIN = 'bo_tin'; const TYPE_BR_CNPJ = 'br_cnpj'; const TYPE_BR_CPF = 'br_cpf'; const TYPE_CA_BN = 'ca_bn'; @@ -42,6 +43,11 @@ class TaxId extends ApiResource const TYPE_CA_QST = 'ca_qst'; const TYPE_CH_VAT = 'ch_vat'; const TYPE_CL_TIN = 'cl_tin'; + const TYPE_CN_TIN = 'cn_tin'; + const TYPE_CO_NIT = 'co_nit'; + const TYPE_CR_TIN = 'cr_tin'; + const TYPE_DO_RCN = 'do_rcn'; + const TYPE_EC_RUC = 'ec_ruc'; const TYPE_EG_TIN = 'eg_tin'; const TYPE_ES_CIF = 'es_cif'; const TYPE_EU_OSS_VAT = 'eu_oss_vat'; @@ -66,19 +72,26 @@ class TaxId extends ApiResource const TYPE_MY_SST = 'my_sst'; const TYPE_NO_VAT = 'no_vat'; const TYPE_NZ_GST = 'nz_gst'; + const TYPE_PE_RUC = 'pe_ruc'; const TYPE_PH_TIN = 'ph_tin'; + const TYPE_RO_TIN = 'ro_tin'; + const TYPE_RS_PIB = 'rs_pib'; const TYPE_RU_INN = 'ru_inn'; const TYPE_RU_KPP = 'ru_kpp'; const TYPE_SA_VAT = 'sa_vat'; const TYPE_SG_GST = 'sg_gst'; const TYPE_SG_UEN = 'sg_uen'; const TYPE_SI_TIN = 'si_tin'; + const TYPE_SV_NIT = 'sv_nit'; const TYPE_TH_VAT = 'th_vat'; const TYPE_TR_TIN = 'tr_tin'; const TYPE_TW_VAT = 'tw_vat'; const TYPE_UA_VAT = 'ua_vat'; const TYPE_UNKNOWN = 'unknown'; const TYPE_US_EIN = 'us_ein'; + const TYPE_UY_RUC = 'uy_ruc'; + const TYPE_VE_RIF = 've_rif'; + const TYPE_VN_TIN = 'vn_tin'; const TYPE_ZA_VAT = 'za_vat'; const VERIFICATION_STATUS_PENDING = 'pending'; diff --git a/lib/Stripe/lib/TaxRate.php b/lib/Stripe/lib/TaxRate.php index b6205dc5..669ea5b9 100644 --- a/lib/Stripe/lib/TaxRate.php +++ b/lib/Stripe/lib/TaxRate.php @@ -5,15 +5,9 @@ namespace SimplePay\Vendor\Stripe; /** - * Tax rates can be applied to invoices, subscriptions and - * Checkout - * Sessions to collect tax. + * Tax rates can be applied to invoices, subscriptions and Checkout Sessions to collect tax. * - * Related guide: Tax - * Rates. + * Related guide: Tax rates * * @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. @@ -22,11 +16,12 @@ * @property int $created Time at which the object was created. Measured in seconds since the Unix epoch. * @property null|string $description An arbitrary string attached to the tax rate for your internal use only. It will not be visible to your customers. * @property string $display_name The display name of the tax rates as it will appear to your customer on their receipt email, PDF, and the hosted invoice page. + * @property null|float $effective_percentage Actual/effective tax rate percentage out of 100. For tax calculations with automatic_tax[enabled]=true, this percentage reflects the rate actually used to calculate tax based on the product's taxability and whether the user is registered to collect taxes in the corresponding jurisdiction. * @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 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|\SimplePay\Vendor\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 float $percentage This represents the tax rate percent out of 100. + * @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 $state ISO 3166-2 subdivision code, without country prefix. For example, "NY" for New York, United States. * @property null|string $tax_type The high-level tax type, such as vat or sales_tax. */ @@ -39,12 +34,17 @@ class TaxRate extends ApiResource use ApiOperations\Retrieve; use ApiOperations\Update; + const TAX_TYPE_AMUSEMENT_TAX = 'amusement_tax'; + const TAX_TYPE_COMMUNICATIONS_TAX = 'communications_tax'; const TAX_TYPE_GST = 'gst'; const TAX_TYPE_HST = 'hst'; + const TAX_TYPE_IGST = 'igst'; const TAX_TYPE_JCT = 'jct'; + const TAX_TYPE_LEASE_TAX = 'lease_tax'; const TAX_TYPE_PST = 'pst'; const TAX_TYPE_QST = 'qst'; const TAX_TYPE_RST = 'rst'; const TAX_TYPE_SALES_TAX = 'sales_tax'; + const TAX_TYPE_SERVICE_TAX = 'service_tax'; const TAX_TYPE_VAT = 'vat'; } diff --git a/lib/Stripe/lib/Terminal/Configuration.php b/lib/Stripe/lib/Terminal/Configuration.php index 76534e22..23fe57a9 100644 --- a/lib/Stripe/lib/Terminal/Configuration.php +++ b/lib/Stripe/lib/Terminal/Configuration.php @@ -5,16 +5,16 @@ namespace SimplePay\Vendor\Stripe\Terminal; /** - * A Configurations object represents how features should be configured for - * terminal readers. + * A Configurations object represents how features should be configured for terminal readers. * * @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 \SimplePay\Vendor\Stripe\StripeObject $bbpos_wisepos_e + * @property null|\SimplePay\Vendor\Stripe\StripeObject $bbpos_wisepos_e * @property null|bool $is_account_default Whether this Configuration is the default for your 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 \SimplePay\Vendor\Stripe\StripeObject $tipping - * @property \SimplePay\Vendor\Stripe\StripeObject $verifone_p400 + * @property null|\SimplePay\Vendor\Stripe\StripeObject $offline + * @property null|\SimplePay\Vendor\Stripe\StripeObject $tipping + * @property null|\SimplePay\Vendor\Stripe\StripeObject $verifone_p400 */ class Configuration extends \SimplePay\Vendor\Stripe\ApiResource { diff --git a/lib/Stripe/lib/Terminal/ConnectionToken.php b/lib/Stripe/lib/Terminal/ConnectionToken.php index 59ef9730..3dcf49ed 100644 --- a/lib/Stripe/lib/Terminal/ConnectionToken.php +++ b/lib/Stripe/lib/Terminal/ConnectionToken.php @@ -7,11 +7,10 @@ /** * A Connection Token is used by the SimplePay\Vendor\Stripe Terminal SDK to connect to a reader. * - * Related guide: Fleet - * Management. + * Related guide: Fleet management * * @property string $object String representing the object's type. Objects of the same type share the same value. - * @property string $location The id of the location that this connection token is scoped to. Note that location scoping only applies to internet-connected readers. For more details, see the docs on scoping connection tokens. + * @property null|string $location The id of the location that this connection token is scoped to. Note that location scoping only applies to internet-connected readers. For more details, see the docs on scoping connection tokens. * @property string $secret Your application should pass this token to the SimplePay\Vendor\Stripe Terminal SDK. */ class ConnectionToken extends \SimplePay\Vendor\Stripe\ApiResource diff --git a/lib/Stripe/lib/Terminal/Location.php b/lib/Stripe/lib/Terminal/Location.php index d5e412d1..592240dd 100644 --- a/lib/Stripe/lib/Terminal/Location.php +++ b/lib/Stripe/lib/Terminal/Location.php @@ -7,13 +7,12 @@ /** * A Location represents a grouping of readers. * - * Related guide: Fleet - * Management. + * Related guide: Fleet management * * @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 \SimplePay\Vendor\Stripe\StripeObject $address - * @property string $configuration_overrides The ID of a configuration that will be used to customize all readers in this location. + * @property null|string $configuration_overrides The ID of a configuration that will be used to customize all readers in this location. * @property string $display_name 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 \SimplePay\Vendor\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. diff --git a/lib/Stripe/lib/Terminal/Reader.php b/lib/Stripe/lib/Terminal/Reader.php index 74ce5d91..fd6eeeca 100644 --- a/lib/Stripe/lib/Terminal/Reader.php +++ b/lib/Stripe/lib/Terminal/Reader.php @@ -7,9 +7,7 @@ /** * A Reader represents a physical device for accepting payment details. * - * Related guide: Connecting to a - * Reader. + * Related guide: Connecting to a reader * * @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. @@ -34,6 +32,13 @@ class Reader extends \SimplePay\Vendor\Stripe\ApiResource use \SimplePay\Vendor\Stripe\ApiOperations\Retrieve; use \SimplePay\Vendor\Stripe\ApiOperations\Update; + const DEVICE_TYPE_BBPOS_CHIPPER2X = 'bbpos_chipper2x'; + const DEVICE_TYPE_BBPOS_WISEPAD3 = 'bbpos_wisepad3'; + const DEVICE_TYPE_BBPOS_WISEPOS_E = 'bbpos_wisepos_e'; + const DEVICE_TYPE_SIMULATED_WISEPOS_E = 'simulated_wisepos_e'; + const DEVICE_TYPE_STRIPE_M2 = 'stripe_m2'; + const DEVICE_TYPE_VERIFONE_P400 = 'verifone_P400'; + /** * @param null|array $params * @param null|array|string $opts diff --git a/lib/Stripe/lib/TestHelpers/TestClock.php b/lib/Stripe/lib/TestHelpers/TestClock.php index 877a03b0..075cd88f 100644 --- a/lib/Stripe/lib/TestHelpers/TestClock.php +++ b/lib/Stripe/lib/TestHelpers/TestClock.php @@ -5,12 +5,9 @@ namespace SimplePay\Vendor\Stripe\TestHelpers; /** - * A test clock enables deterministic control over objects in testmode. With a test - * clock, you can create objects at a frozen time in the past or future, and - * advance to a specific future time to observe webhooks and state changes. After - * the clock advances, you can either validate the current state of your scenario - * (and test your assumptions), change the current state of your scenario (and test - * more complex scenarios), or keep advancing forward in time. + * A test clock enables deterministic control over objects in testmode. With a test clock, you can create + * objects at a frozen time in the past or future, and advance to a specific future time to observe webhooks and state changes. After the clock advances, + * you can either validate the current state of your scenario (and test your assumptions), change the current state of your scenario (and test more complex scenarios), or keep advancing forward in time. * * @property string $id Unique identifier for the object. * @property string $object String representing the object's type. Objects of the same type share the same value. diff --git a/lib/Stripe/lib/Token.php b/lib/Stripe/lib/Token.php index 420f198e..9382d9e2 100644 --- a/lib/Stripe/lib/Token.php +++ b/lib/Stripe/lib/Token.php @@ -8,40 +8,33 @@ * Tokenization is the process SimplePay\Vendor\Stripe uses to collect sensitive card or bank * account details, or personally identifiable information (PII), directly from * your customers in a secure manner. A token representing this information is - * returned to your server to use. You should use our recommended payments integrations to - * perform this process client-side. This ensures that no sensitive card data - * touches your server, and allows your integration to operate in a PCI-compliant - * way. + * returned to your server to use. Use our + * recommended payments integrations to perform this process + * on the client-side. This guarantees that no sensitive card data touches your server, + * and allows your integration to operate in a PCI-compliant way. * - * If you cannot use client-side tokenization, you can also create tokens using the - * API with either your publishable or secret API key. Keep in mind that if your - * integration uses this method, you are responsible for any PCI compliance that - * may be required, and you must keep your secret API key safe. Unlike with - * client-side tokenization, your customer's information is not sent directly to - * Stripe, so we cannot determine how it is handled or stored. + * If you can't use client-side tokenization, you can also create tokens using + * the API with either your publishable or secret API key. If + * your integration uses this method, you're responsible for any PCI compliance + * that it might require, and you must keep your secret API key safe. Unlike with + * client-side tokenization, your customer's information isn't sent directly to + * Stripe, so we can't determine how it's handled or stored. * - * Tokens cannot be stored or used more than once. To store card or bank account - * information for later use, you can create Customer objects or Custom accounts. Note - * that Radar, our integrated solution - * for automatic fraud protection, performs best with integrations that use - * client-side tokenization. - * - * Related guide: Accept - * a payment + * You can't store or use tokens more than once. To store card or bank account + * information for later use, create Customer + * objects or Custom accounts. + * Radar, our integrated solution for automatic fraud protection, + * performs best with integrations that use client-side tokenization. * * @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 \SimplePay\Vendor\Stripe\BankAccount $bank_account

These bank accounts are payment methods on Customer objects.

On the other hand External Accounts are transfer destinations on Account objects for Custom accounts. They can be bank accounts or debit cards as well, and are documented in the links above.

Related guide: Bank Debits and Transfers.

- * @property \SimplePay\Vendor\Stripe\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 generated the token. + * @property null|\SimplePay\Vendor\Stripe\BankAccount $bank_account

These bank accounts are payment methods on Customer objects.

On the other hand External Accounts are transfer destinations on Account objects for Custom accounts. They can be bank accounts or debit cards as well, and are documented in the links above.

Related guide: Bank debits and transfers

+ * @property null|\SimplePay\Vendor\Stripe\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 string $type Type of the token: account, bank_account, card, or pii. - * @property bool $used Whether this token has already been used (tokens can be used only once). + * @property bool $used Determines if you have already used this token (you can only use tokens once). */ class Token extends ApiResource { diff --git a/lib/Stripe/lib/Topup.php b/lib/Stripe/lib/Topup.php index a386a338..bc5eb044 100644 --- a/lib/Stripe/lib/Topup.php +++ b/lib/Stripe/lib/Topup.php @@ -9,8 +9,7 @@ * individual top-ups, as well as list all top-ups. Top-ups are identified by a * unique, random ID. * - * Related guide: Topping Up your - * Platform Account. + * Related guide: Topping up your platform account * * @property string $id Unique identifier for the object. * @property string $object String representing the object's type. Objects of the same type share the same value. diff --git a/lib/Stripe/lib/Transfer.php b/lib/Stripe/lib/Transfer.php index f5688807..73f38d7f 100644 --- a/lib/Stripe/lib/Transfer.php +++ b/lib/Stripe/lib/Transfer.php @@ -5,36 +5,34 @@ namespace SimplePay\Vendor\Stripe; /** - * A Transfer object is created when you move funds between SimplePay\Vendor\Stripe - * accounts as part of Connect. + * A Transfer object is created when you move funds between SimplePay\Vendor\Stripe accounts as + * part of Connect. * - * Before April 6, 2017, transfers also represented movement of funds from a SimplePay\Vendor\Stripe - * account to a card or bank account. This behavior has since been split out into a - * Payout object, with - * corresponding payout endpoints. For more information, read about the transfer/payout split. + * Before April 6, 2017, transfers also represented movement of funds from a + * SimplePay\Vendor\Stripe account to a card or bank account. This behavior has since been split + * out into a Payout object, with corresponding payout endpoints. For more + * information, read about the + * transfer/payout split. * - * Related guide: Creating Separate - * Charges and Transfers. + * Related guide: Creating separate charges and transfers * * @property string $id Unique identifier for the object. * @property string $object String representing the object's type. Objects of the same type share the same value. - * @property int $amount Amount in %s to be transferred. - * @property int $amount_reversed Amount in %s reversed (can be less than the amount attribute on the transfer if a partial reversal was issued). + * @property int $amount Amount in cents (or local equivalent) to be transferred. + * @property int $amount_reversed Amount in cents (or local equivalent) reversed (can be less than the amount attribute on the transfer if a partial reversal was issued). * @property null|string|\SimplePay\Vendor\Stripe\BalanceTransaction $balance_transaction Balance transaction that describes the impact of this transfer on your account balance. * @property int $created Time that this record of the transfer was first created. * @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|string|\SimplePay\Vendor\Stripe\Account $destination ID of the SimplePay\Vendor\Stripe account the transfer was sent to. - * @property string|\SimplePay\Vendor\Stripe\Charge $destination_payment If the destination is a SimplePay\Vendor\Stripe account, this will be the ID of the payment that the destination account received for the transfer. + * @property null|string|\SimplePay\Vendor\Stripe\Charge $destination_payment If the destination is a SimplePay\Vendor\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 \SimplePay\Vendor\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 \SimplePay\Vendor\Stripe\Collection<\SimplePay\Vendor\Stripe\TransferReversal> $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. * @property null|string|\SimplePay\Vendor\Stripe\Charge $source_transaction ID of the charge or payment that was used to fund the transfer. If null, the transfer was funded from the available balance. - * @property string $source_type The source balance this transfer came from. One of card, fpx, or bank_account. - * @property null|string $transfer_group A string that identifies this transaction as part of a group. See the Connect documentation for details. + * @property null|string $source_type The source balance this transfer came from. One of card, fpx, or bank_account. + * @property null|string $transfer_group A string that identifies this transaction as part of a group. See the Connect documentation for details. */ class Transfer extends ApiResource { diff --git a/lib/Stripe/lib/TransferReversal.php b/lib/Stripe/lib/TransferReversal.php index 49dac4c5..be088014 100644 --- a/lib/Stripe/lib/TransferReversal.php +++ b/lib/Stripe/lib/TransferReversal.php @@ -5,26 +5,23 @@ namespace SimplePay\Vendor\Stripe; /** - * SimplePay\Vendor\Stripe Connect platforms can - * reverse transfers made to a connected account, either entirely or partially, and - * can also specify whether to refund any related application fees. Transfer - * reversals add to the platform's balance and subtract from the destination - * account's balance. + * SimplePay\Vendor\Stripe Connect platforms can reverse transfers made to a + * connected account, either entirely or partially, and can also specify whether + * to refund any related application fees. Transfer reversals add to the + * platform's balance and subtract from the destination account's balance. * - * Reversing a transfer that was made for a destination charge is allowed only - * up to the amount of the charge. It is possible to reverse a transfer_group + * Reversing a transfer that was made for a destination + * charge is allowed only up to the amount of + * the charge. It is possible to reverse a + * transfer_group * transfer only if the destination account has enough balance to cover the * reversal. * - * Related guide: Reversing - * Transfers. + * Related guide: Reversing transfers * * @property string $id Unique identifier for the object. * @property string $object String representing the object's type. Objects of the same type share the same value. - * @property int $amount Amount, in %s. + * @property int $amount Amount, in cents (or local equivalent). * @property null|string|\SimplePay\Vendor\Stripe\BalanceTransaction $balance_transaction Balance transaction that describes the impact on your account balance. * @property int $created Time at which the object was created. Measured in seconds since the Unix epoch. * @property string $currency Three-letter ISO currency code, in lowercase. Must be a supported currency. diff --git a/lib/Stripe/lib/Treasury/CreditReversal.php b/lib/Stripe/lib/Treasury/CreditReversal.php index 554f4ebe..dea3b86a 100644 --- a/lib/Stripe/lib/Treasury/CreditReversal.php +++ b/lib/Stripe/lib/Treasury/CreditReversal.php @@ -5,10 +5,7 @@ namespace SimplePay\Vendor\Stripe\Treasury; /** - * You can reverse some ReceivedCredits - * depending on their network and source flow. Reversing a ReceivedCredit leads to - * the creation of a new object known as a CreditReversal. + * You can reverse some ReceivedCredits depending on their network and source flow. Reversing a ReceivedCredit leads to the creation of a new object known as a CreditReversal. * * @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. diff --git a/lib/Stripe/lib/Treasury/DebitReversal.php b/lib/Stripe/lib/Treasury/DebitReversal.php index b6b2c5ac..a472c059 100644 --- a/lib/Stripe/lib/Treasury/DebitReversal.php +++ b/lib/Stripe/lib/Treasury/DebitReversal.php @@ -5,10 +5,7 @@ namespace SimplePay\Vendor\Stripe\Treasury; /** - * You can reverse some ReceivedDebits depending - * on their network and source flow. Reversing a ReceivedDebit leads to the - * creation of a new object known as a DebitReversal. + * You can reverse some ReceivedDebits depending on their network and source flow. Reversing a ReceivedDebit leads to the creation of a new object known as a DebitReversal. * * @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. diff --git a/lib/Stripe/lib/Treasury/FinancialAccount.php b/lib/Stripe/lib/Treasury/FinancialAccount.php index 302f23f0..9ac6d0e0 100644 --- a/lib/Stripe/lib/Treasury/FinancialAccount.php +++ b/lib/Stripe/lib/Treasury/FinancialAccount.php @@ -5,23 +5,22 @@ namespace SimplePay\Vendor\Stripe\Treasury; /** - * SimplePay\Vendor\Stripe Treasury provides users with a container for money called a - * FinancialAccount that is separate from their Payments balance. FinancialAccounts - * serve as the source and destination of Treasury’s money movement APIs. + * SimplePay\Vendor\Stripe Treasury provides users with a container for money called a FinancialAccount that is separate from their Payments balance. + * FinancialAccounts serve as the source and destination of Treasury’s money movement APIs. * * @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[] $active_features The array of paths to active Features in the Features hash. + * @property null|string[] $active_features The array of paths to active Features in the Features hash. * @property \SimplePay\Vendor\Stripe\StripeObject $balance Balance information for the FinancialAccount * @property string $country Two-letter country code (ISO 3166-1 alpha-2). * @property int $created Time at which the object was created. Measured in seconds since the Unix epoch. - * @property \SimplePay\Vendor\Stripe\Treasury\FinancialAccountFeatures $features Encodes whether a FinancialAccount has access to a particular Feature, with a status enum and associated status_details. SimplePay\Vendor\Stripe or the platform can control Features via the requested field. + * @property null|\SimplePay\Vendor\Stripe\Treasury\FinancialAccountFeatures $features Encodes whether a FinancialAccount has access to a particular Feature, with a status enum and associated status_details. SimplePay\Vendor\Stripe or the platform can control Features via the requested field. * @property \SimplePay\Vendor\Stripe\StripeObject[] $financial_addresses The set of credentials that resolve to a FinancialAccount. * @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|\SimplePay\Vendor\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[] $pending_features The array of paths to pending Features in the Features hash. + * @property null|string[] $pending_features The array of paths to pending Features in the Features hash. * @property null|\SimplePay\Vendor\Stripe\StripeObject $platform_restrictions The set of functionalities that the platform can restrict on the FinancialAccount. - * @property string[] $restricted_features The array of paths to restricted Features in the Features hash. + * @property null|string[] $restricted_features The array of paths to restricted Features in the Features hash. * @property string $status The enum specifying what state the account is in. * @property \SimplePay\Vendor\Stripe\StripeObject $status_details * @property string[] $supported_currencies The currencies the FinancialAccount can hold a balance in. Three-letter ISO currency code, in lowercase. @@ -44,7 +43,7 @@ class FinancialAccount extends \SimplePay\Vendor\Stripe\ApiResource * * @throws \SimplePay\Vendor\Stripe\Exception\ApiErrorException if the request fails * - * @return \SimplePay\Vendor\Stripe\Treasury\FinancialAccount the retrieved financial account + * @return \SimplePay\Vendor\Stripe\Treasury\FinancialAccountFeatures the retrieved financial account features */ public function retrieveFeatures($params = null, $opts = null) { @@ -62,7 +61,7 @@ public function retrieveFeatures($params = null, $opts = null) * * @throws \SimplePay\Vendor\Stripe\Exception\ApiErrorException if the request fails * - * @return \SimplePay\Vendor\Stripe\Treasury\FinancialAccount the updated financial account + * @return \SimplePay\Vendor\Stripe\Treasury\FinancialAccountFeatures the updated financial account features */ public function updateFeatures($params = null, $opts = null) { diff --git a/lib/Stripe/lib/Treasury/FinancialAccountFeatures.php b/lib/Stripe/lib/Treasury/FinancialAccountFeatures.php index 7110fdb0..041fe4d5 100644 --- a/lib/Stripe/lib/Treasury/FinancialAccountFeatures.php +++ b/lib/Stripe/lib/Treasury/FinancialAccountFeatures.php @@ -5,18 +5,17 @@ namespace SimplePay\Vendor\Stripe\Treasury; /** - * Encodes whether a FinancialAccount has access to a particular Feature, with a - * status enum and associated status_details. SimplePay\Vendor\Stripe or - * the platform can control Features via the requested field. + * Encodes whether a FinancialAccount has access to a particular Feature, with a status enum and associated status_details. + * SimplePay\Vendor\Stripe or the platform can control Features via the requested field. * * @property string $object String representing the object's type. Objects of the same type share the same value. - * @property \SimplePay\Vendor\Stripe\StripeObject $card_issuing Toggle settings for enabling/disabling a feature - * @property \SimplePay\Vendor\Stripe\StripeObject $deposit_insurance Toggle settings for enabling/disabling a feature - * @property \SimplePay\Vendor\Stripe\StripeObject $financial_addresses Settings related to Financial Addresses features on a Financial Account - * @property \SimplePay\Vendor\Stripe\StripeObject $inbound_transfers InboundTransfers contains inbound transfers features for a FinancialAccount. - * @property \SimplePay\Vendor\Stripe\StripeObject $intra_stripe_flows Toggle settings for enabling/disabling a feature - * @property \SimplePay\Vendor\Stripe\StripeObject $outbound_payments Settings related to Outbound Payments features on a Financial Account - * @property \SimplePay\Vendor\Stripe\StripeObject $outbound_transfers OutboundTransfers contains outbound transfers features for a FinancialAccount. + * @property null|\SimplePay\Vendor\Stripe\StripeObject $card_issuing Toggle settings for enabling/disabling a feature + * @property null|\SimplePay\Vendor\Stripe\StripeObject $deposit_insurance Toggle settings for enabling/disabling a feature + * @property null|\SimplePay\Vendor\Stripe\StripeObject $financial_addresses Settings related to Financial Addresses features on a Financial Account + * @property null|\SimplePay\Vendor\Stripe\StripeObject $inbound_transfers InboundTransfers contains inbound transfers features for a FinancialAccount. + * @property null|\SimplePay\Vendor\Stripe\StripeObject $intra_stripe_flows Toggle settings for enabling/disabling a feature + * @property null|\SimplePay\Vendor\Stripe\StripeObject $outbound_payments Settings related to Outbound Payments features on a Financial Account + * @property null|\SimplePay\Vendor\Stripe\StripeObject $outbound_transfers OutboundTransfers contains outbound transfers features for a FinancialAccount. */ class FinancialAccountFeatures extends \SimplePay\Vendor\Stripe\ApiResource { diff --git a/lib/Stripe/lib/Treasury/InboundTransfer.php b/lib/Stripe/lib/Treasury/InboundTransfer.php index f1bdf6c6..2686d692 100644 --- a/lib/Stripe/lib/Treasury/InboundTransfer.php +++ b/lib/Stripe/lib/Treasury/InboundTransfer.php @@ -5,12 +5,7 @@ namespace SimplePay\Vendor\Stripe\Treasury; /** - * Use InboundTransfers - * to add funds to your FinancialAccount via a - * PaymentMethod that is owned by you. The funds will be transferred via an ACH - * debit. + * Use InboundTransfers to add funds to your FinancialAccount via a PaymentMethod that is owned by you. The funds will be transferred via an ACH debit. * * @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. diff --git a/lib/Stripe/lib/Treasury/OutboundPayment.php b/lib/Stripe/lib/Treasury/OutboundPayment.php index 8c3db282..8479a73b 100644 --- a/lib/Stripe/lib/Treasury/OutboundPayment.php +++ b/lib/Stripe/lib/Treasury/OutboundPayment.php @@ -5,14 +5,9 @@ namespace SimplePay\Vendor\Stripe\Treasury; /** - * Use OutboundPayments to send funds to another party's external bank account or - * FinancialAccount. - * To send money to an account belonging to the same user, use an OutboundTransfer. + * Use OutboundPayments to send funds to another party's external bank account or FinancialAccount. To send money to an account belonging to the same user, use an OutboundTransfer. * - * Simulate OutboundPayment state changes with the - * /v1/test_helpers/treasury/outbound_payments endpoints. These - * methods can only be called on test mode objects. + * Simulate OutboundPayment state changes with the /v1/test_helpers/treasury/outbound_payments endpoints. These methods can only be called on test mode objects. * * @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. diff --git a/lib/Stripe/lib/Treasury/OutboundTransfer.php b/lib/Stripe/lib/Treasury/OutboundTransfer.php index 540c8532..a61c7529 100644 --- a/lib/Stripe/lib/Treasury/OutboundTransfer.php +++ b/lib/Stripe/lib/Treasury/OutboundTransfer.php @@ -5,16 +5,9 @@ namespace SimplePay\Vendor\Stripe\Treasury; /** - * Use OutboundTransfers to transfer funds from a FinancialAccount to a - * PaymentMethod belonging to the same entity. To send funds to a different party, - * use OutboundPayments - * instead. You can send funds over ACH rails or through a domestic wire transfer - * to a user's own external bank account. + * Use OutboundTransfers to transfer funds from a FinancialAccount to a PaymentMethod belonging to the same entity. To send funds to a different party, use OutboundPayments instead. You can send funds over ACH rails or through a domestic wire transfer to a user's own external bank account. * - * Simulate OutboundTransfer state changes with the - * /v1/test_helpers/treasury/outbound_transfers endpoints. These - * methods can only be called on test mode objects. + * Simulate OutboundTransfer state changes with the /v1/test_helpers/treasury/outbound_transfers endpoints. These methods can only be called on test mode objects. * * @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. @@ -30,7 +23,6 @@ * @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 \SimplePay\Vendor\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|\SimplePay\Vendor\Stripe\StripeObject $network_details Details about the network used for the OutboundTransfer. * @property null|\SimplePay\Vendor\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. * @property string $status Current status of the OutboundTransfer: processing, failed, canceled, posted, returned. An OutboundTransfer is processing if it has been created and is pending. The status changes to posted once the OutboundTransfer has been "confirmed" and funds have left the account, or to failed or canceled. If an OutboundTransfer fails to arrive at its destination, its status will change to returned. diff --git a/lib/Stripe/lib/Treasury/ReceivedCredit.php b/lib/Stripe/lib/Treasury/ReceivedCredit.php index 70cab553..50108472 100644 --- a/lib/Stripe/lib/Treasury/ReceivedCredit.php +++ b/lib/Stripe/lib/Treasury/ReceivedCredit.php @@ -5,10 +5,7 @@ namespace SimplePay\Vendor\Stripe\Treasury; /** - * ReceivedCredits represent funds sent to a FinancialAccount (for - * example, via ACH or wire). These money movements are not initiated from the - * FinancialAccount. + * ReceivedCredits represent funds sent to a FinancialAccount (for example, via ACH or wire). These money movements are not initiated from the FinancialAccount. * * @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. @@ -23,7 +20,6 @@ * @property \SimplePay\Vendor\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 string $network The rails used to send the funds. - * @property null|\SimplePay\Vendor\Stripe\StripeObject $network_details Details specific to the money movement rails. * @property null|\SimplePay\Vendor\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. * @property null|string|\SimplePay\Vendor\Stripe\Treasury\Transaction $transaction The Transaction associated with this object. diff --git a/lib/Stripe/lib/Treasury/ReceivedDebit.php b/lib/Stripe/lib/Treasury/ReceivedDebit.php index 14b06b8b..a18b8eda 100644 --- a/lib/Stripe/lib/Treasury/ReceivedDebit.php +++ b/lib/Stripe/lib/Treasury/ReceivedDebit.php @@ -5,9 +5,7 @@ namespace SimplePay\Vendor\Stripe\Treasury; /** - * ReceivedDebits represent funds pulled from a FinancialAccount. - * These are not initiated from the FinancialAccount. + * ReceivedDebits represent funds pulled from a FinancialAccount. These are not initiated from the FinancialAccount. * * @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,11 +16,10 @@ * @property null|string $failure_code Reason for the failure. A ReceivedDebit might fail because the FinancialAccount doesn't have sufficient funds, is closed, or is frozen. * @property null|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 \SimplePay\Vendor\Stripe\StripeObject $initiating_payment_method_details + * @property null|\SimplePay\Vendor\Stripe\StripeObject $initiating_payment_method_details * @property \SimplePay\Vendor\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 string $network The network used for the ReceivedDebit. - * @property null|\SimplePay\Vendor\Stripe\StripeObject $network_details Details specific to the money movement rails. * @property null|\SimplePay\Vendor\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. * @property null|string|\SimplePay\Vendor\Stripe\Treasury\Transaction $transaction The Transaction associated with this object. diff --git a/lib/Stripe/lib/Treasury/Transaction.php b/lib/Stripe/lib/Treasury/Transaction.php index 64d0b1ff..cc62c112 100644 --- a/lib/Stripe/lib/Treasury/Transaction.php +++ b/lib/Stripe/lib/Treasury/Transaction.php @@ -5,9 +5,7 @@ namespace SimplePay\Vendor\Stripe\Treasury; /** - * Transactions represent changes to a FinancialAccount's - * balance. + * Transactions represent changes to a FinancialAccount's balance. * * @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. diff --git a/lib/Stripe/lib/Treasury/TransactionEntry.php b/lib/Stripe/lib/Treasury/TransactionEntry.php index dae1978a..80894b83 100644 --- a/lib/Stripe/lib/Treasury/TransactionEntry.php +++ b/lib/Stripe/lib/Treasury/TransactionEntry.php @@ -5,8 +5,7 @@ namespace SimplePay\Vendor\Stripe\Treasury; /** - * TransactionEntries represent individual units of money movements within a single - * Transaction. + * TransactionEntries represent individual units of money movements within a single Transaction. * * @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. diff --git a/lib/Stripe/lib/UsageRecord.php b/lib/Stripe/lib/UsageRecord.php index e34b9cec..efda1b40 100644 --- a/lib/Stripe/lib/UsageRecord.php +++ b/lib/Stripe/lib/UsageRecord.php @@ -8,9 +8,7 @@ * Usage records allow you to report customer usage and metrics to SimplePay\Vendor\Stripe for * metered billing of subscription prices. * - * Related guide: Metered - * Billing. + * Related guide: Metered 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. diff --git a/lib/Stripe/lib/Util/ApiVersion.php b/lib/Stripe/lib/Util/ApiVersion.php index 08503dab..218fbcb0 100644 --- a/lib/Stripe/lib/Util/ApiVersion.php +++ b/lib/Stripe/lib/Util/ApiVersion.php @@ -6,5 +6,5 @@ class ApiVersion { - const CURRENT = '2022-11-15'; + const CURRENT = '2023-10-16'; } diff --git a/lib/Stripe/lib/Util/CaseInsensitiveArray.php b/lib/Stripe/lib/Util/CaseInsensitiveArray.php index 4e49561f..287e86a8 100644 --- a/lib/Stripe/lib/Util/CaseInsensitiveArray.php +++ b/lib/Stripe/lib/Util/CaseInsensitiveArray.php @@ -45,7 +45,7 @@ public function getIterator() #[\ReturnTypeWillChange] public function offsetSet($offset, $value) { - $offset = static::maybeLowercase($offset); + $offset = self::maybeLowercase($offset); if (null === $offset) { $this->container[] = $value; } else { @@ -59,7 +59,7 @@ public function offsetSet($offset, $value) #[\ReturnTypeWillChange] public function offsetExists($offset) { - $offset = static::maybeLowercase($offset); + $offset = self::maybeLowercase($offset); return isset($this->container[$offset]); } @@ -70,7 +70,7 @@ public function offsetExists($offset) #[\ReturnTypeWillChange] public function offsetUnset($offset) { - $offset = static::maybeLowercase($offset); + $offset = self::maybeLowercase($offset); unset($this->container[$offset]); } @@ -80,7 +80,7 @@ public function offsetUnset($offset) #[\ReturnTypeWillChange] public function offsetGet($offset) { - $offset = static::maybeLowercase($offset); + $offset = self::maybeLowercase($offset); return isset($this->container[$offset]) ? $this->container[$offset] : null; } diff --git a/lib/Stripe/lib/Util/ObjectTypes.php b/lib/Stripe/lib/Util/ObjectTypes.php index 12654efc..e3653023 100644 --- a/lib/Stripe/lib/Util/ObjectTypes.php +++ b/lib/Stripe/lib/Util/ObjectTypes.php @@ -1,7 +1,5 @@ \SimplePay\Vendor\Stripe\Account::class, - \SimplePay\Vendor\Stripe\AccountLink::OBJECT_NAME => \SimplePay\Vendor\Stripe\AccountLink::class, - \SimplePay\Vendor\Stripe\AccountSession::OBJECT_NAME => \SimplePay\Vendor\Stripe\AccountSession::class, - \SimplePay\Vendor\Stripe\ApplePayDomain::OBJECT_NAME => \SimplePay\Vendor\Stripe\ApplePayDomain::class, - \SimplePay\Vendor\Stripe\ApplicationFee::OBJECT_NAME => \SimplePay\Vendor\Stripe\ApplicationFee::class, - \SimplePay\Vendor\Stripe\ApplicationFeeRefund::OBJECT_NAME => \SimplePay\Vendor\Stripe\ApplicationFeeRefund::class, - \SimplePay\Vendor\Stripe\Apps\Secret::OBJECT_NAME => \SimplePay\Vendor\Stripe\Apps\Secret::class, - \SimplePay\Vendor\Stripe\Balance::OBJECT_NAME => \SimplePay\Vendor\Stripe\Balance::class, - \SimplePay\Vendor\Stripe\BalanceTransaction::OBJECT_NAME => \SimplePay\Vendor\Stripe\BalanceTransaction::class, - \SimplePay\Vendor\Stripe\BankAccount::OBJECT_NAME => \SimplePay\Vendor\Stripe\BankAccount::class, - \SimplePay\Vendor\Stripe\BillingPortal\Configuration::OBJECT_NAME => \SimplePay\Vendor\Stripe\BillingPortal\Configuration::class, - \SimplePay\Vendor\Stripe\BillingPortal\Session::OBJECT_NAME => \SimplePay\Vendor\Stripe\BillingPortal\Session::class, - \SimplePay\Vendor\Stripe\Capability::OBJECT_NAME => \SimplePay\Vendor\Stripe\Capability::class, - \SimplePay\Vendor\Stripe\Capital\FinancingOffer::OBJECT_NAME => \SimplePay\Vendor\Stripe\Capital\FinancingOffer::class, - \SimplePay\Vendor\Stripe\Capital\FinancingSummary::OBJECT_NAME => \SimplePay\Vendor\Stripe\Capital\FinancingSummary::class, - \SimplePay\Vendor\Stripe\Capital\FinancingTransaction::OBJECT_NAME => \SimplePay\Vendor\Stripe\Capital\FinancingTransaction::class, - \SimplePay\Vendor\Stripe\Card::OBJECT_NAME => \SimplePay\Vendor\Stripe\Card::class, - \SimplePay\Vendor\Stripe\CashBalance::OBJECT_NAME => \SimplePay\Vendor\Stripe\CashBalance::class, - \SimplePay\Vendor\Stripe\Charge::OBJECT_NAME => \SimplePay\Vendor\Stripe\Charge::class, - \SimplePay\Vendor\Stripe\Checkout\Session::OBJECT_NAME => \SimplePay\Vendor\Stripe\Checkout\Session::class, - \SimplePay\Vendor\Stripe\Collection::OBJECT_NAME => \SimplePay\Vendor\Stripe\Collection::class, - \SimplePay\Vendor\Stripe\CountrySpec::OBJECT_NAME => \SimplePay\Vendor\Stripe\CountrySpec::class, - \SimplePay\Vendor\Stripe\Coupon::OBJECT_NAME => \SimplePay\Vendor\Stripe\Coupon::class, - \SimplePay\Vendor\Stripe\CreditNote::OBJECT_NAME => \SimplePay\Vendor\Stripe\CreditNote::class, - \SimplePay\Vendor\Stripe\CreditNoteLineItem::OBJECT_NAME => \SimplePay\Vendor\Stripe\CreditNoteLineItem::class, - \SimplePay\Vendor\Stripe\Customer::OBJECT_NAME => \SimplePay\Vendor\Stripe\Customer::class, - \SimplePay\Vendor\Stripe\CustomerBalanceTransaction::OBJECT_NAME => \SimplePay\Vendor\Stripe\CustomerBalanceTransaction::class, - \SimplePay\Vendor\Stripe\CustomerCashBalanceTransaction::OBJECT_NAME => \SimplePay\Vendor\Stripe\CustomerCashBalanceTransaction::class, - \SimplePay\Vendor\Stripe\Discount::OBJECT_NAME => \SimplePay\Vendor\Stripe\Discount::class, - \SimplePay\Vendor\Stripe\Dispute::OBJECT_NAME => \SimplePay\Vendor\Stripe\Dispute::class, - \SimplePay\Vendor\Stripe\EphemeralKey::OBJECT_NAME => \SimplePay\Vendor\Stripe\EphemeralKey::class, - \SimplePay\Vendor\Stripe\Event::OBJECT_NAME => \SimplePay\Vendor\Stripe\Event::class, - \SimplePay\Vendor\Stripe\ExchangeRate::OBJECT_NAME => \SimplePay\Vendor\Stripe\ExchangeRate::class, - \SimplePay\Vendor\Stripe\File::OBJECT_NAME => \SimplePay\Vendor\Stripe\File::class, - \SimplePay\Vendor\Stripe\File::OBJECT_NAME_ALT => \SimplePay\Vendor\Stripe\File::class, - \SimplePay\Vendor\Stripe\FileLink::OBJECT_NAME => \SimplePay\Vendor\Stripe\FileLink::class, - \SimplePay\Vendor\Stripe\FinancialConnections\Account::OBJECT_NAME => \SimplePay\Vendor\Stripe\FinancialConnections\Account::class, - \SimplePay\Vendor\Stripe\FinancialConnections\AccountOwner::OBJECT_NAME => \SimplePay\Vendor\Stripe\FinancialConnections\AccountOwner::class, - \SimplePay\Vendor\Stripe\FinancialConnections\AccountOwnership::OBJECT_NAME => \SimplePay\Vendor\Stripe\FinancialConnections\AccountOwnership::class, - \SimplePay\Vendor\Stripe\FinancialConnections\InferredBalance::OBJECT_NAME => \SimplePay\Vendor\Stripe\FinancialConnections\InferredBalance::class, - \SimplePay\Vendor\Stripe\FinancialConnections\Session::OBJECT_NAME => \SimplePay\Vendor\Stripe\FinancialConnections\Session::class, - \SimplePay\Vendor\Stripe\FinancialConnections\Transaction::OBJECT_NAME => \SimplePay\Vendor\Stripe\FinancialConnections\Transaction::class, - \SimplePay\Vendor\Stripe\FundingInstructions::OBJECT_NAME => \SimplePay\Vendor\Stripe\FundingInstructions::class, - \SimplePay\Vendor\Stripe\GiftCards\Card::OBJECT_NAME => \SimplePay\Vendor\Stripe\GiftCards\Card::class, - \SimplePay\Vendor\Stripe\GiftCards\Transaction::OBJECT_NAME => \SimplePay\Vendor\Stripe\GiftCards\Transaction::class, - \SimplePay\Vendor\Stripe\Identity\VerificationReport::OBJECT_NAME => \SimplePay\Vendor\Stripe\Identity\VerificationReport::class, - \SimplePay\Vendor\Stripe\Identity\VerificationSession::OBJECT_NAME => \SimplePay\Vendor\Stripe\Identity\VerificationSession::class, - \SimplePay\Vendor\Stripe\Invoice::OBJECT_NAME => \SimplePay\Vendor\Stripe\Invoice::class, - \SimplePay\Vendor\Stripe\InvoiceItem::OBJECT_NAME => \SimplePay\Vendor\Stripe\InvoiceItem::class, - \SimplePay\Vendor\Stripe\InvoiceLineItem::OBJECT_NAME => \SimplePay\Vendor\Stripe\InvoiceLineItem::class, - \SimplePay\Vendor\Stripe\Issuing\Authorization::OBJECT_NAME => \SimplePay\Vendor\Stripe\Issuing\Authorization::class, - \SimplePay\Vendor\Stripe\Issuing\Card::OBJECT_NAME => \SimplePay\Vendor\Stripe\Issuing\Card::class, - \SimplePay\Vendor\Stripe\Issuing\CardDetails::OBJECT_NAME => \SimplePay\Vendor\Stripe\Issuing\CardDetails::class, - \SimplePay\Vendor\Stripe\Issuing\Cardholder::OBJECT_NAME => \SimplePay\Vendor\Stripe\Issuing\Cardholder::class, - \SimplePay\Vendor\Stripe\Issuing\Dispute::OBJECT_NAME => \SimplePay\Vendor\Stripe\Issuing\Dispute::class, - \SimplePay\Vendor\Stripe\Issuing\Transaction::OBJECT_NAME => \SimplePay\Vendor\Stripe\Issuing\Transaction::class, - \SimplePay\Vendor\Stripe\LineItem::OBJECT_NAME => \SimplePay\Vendor\Stripe\LineItem::class, - \SimplePay\Vendor\Stripe\LoginLink::OBJECT_NAME => \SimplePay\Vendor\Stripe\LoginLink::class, - \SimplePay\Vendor\Stripe\Mandate::OBJECT_NAME => \SimplePay\Vendor\Stripe\Mandate::class, - \SimplePay\Vendor\Stripe\Order::OBJECT_NAME => \SimplePay\Vendor\Stripe\Order::class, - \SimplePay\Vendor\Stripe\PaymentIntent::OBJECT_NAME => \SimplePay\Vendor\Stripe\PaymentIntent::class, - \SimplePay\Vendor\Stripe\PaymentLink::OBJECT_NAME => \SimplePay\Vendor\Stripe\PaymentLink::class, - \SimplePay\Vendor\Stripe\PaymentMethod::OBJECT_NAME => \SimplePay\Vendor\Stripe\PaymentMethod::class, - \SimplePay\Vendor\Stripe\Payout::OBJECT_NAME => \SimplePay\Vendor\Stripe\Payout::class, - \SimplePay\Vendor\Stripe\Person::OBJECT_NAME => \SimplePay\Vendor\Stripe\Person::class, - \SimplePay\Vendor\Stripe\Plan::OBJECT_NAME => \SimplePay\Vendor\Stripe\Plan::class, - \SimplePay\Vendor\Stripe\Price::OBJECT_NAME => \SimplePay\Vendor\Stripe\Price::class, - \SimplePay\Vendor\Stripe\Product::OBJECT_NAME => \SimplePay\Vendor\Stripe\Product::class, - \SimplePay\Vendor\Stripe\PromotionCode::OBJECT_NAME => \SimplePay\Vendor\Stripe\PromotionCode::class, - \SimplePay\Vendor\Stripe\Quote::OBJECT_NAME => \SimplePay\Vendor\Stripe\Quote::class, - \SimplePay\Vendor\Stripe\QuotePhase::OBJECT_NAME => \SimplePay\Vendor\Stripe\QuotePhase::class, - \SimplePay\Vendor\Stripe\Radar\EarlyFraudWarning::OBJECT_NAME => \SimplePay\Vendor\Stripe\Radar\EarlyFraudWarning::class, - \SimplePay\Vendor\Stripe\Radar\ValueList::OBJECT_NAME => \SimplePay\Vendor\Stripe\Radar\ValueList::class, - \SimplePay\Vendor\Stripe\Radar\ValueListItem::OBJECT_NAME => \SimplePay\Vendor\Stripe\Radar\ValueListItem::class, - \SimplePay\Vendor\Stripe\Refund::OBJECT_NAME => \SimplePay\Vendor\Stripe\Refund::class, - \SimplePay\Vendor\Stripe\Reporting\ReportRun::OBJECT_NAME => \SimplePay\Vendor\Stripe\Reporting\ReportRun::class, - \SimplePay\Vendor\Stripe\Reporting\ReportType::OBJECT_NAME => \SimplePay\Vendor\Stripe\Reporting\ReportType::class, - \SimplePay\Vendor\Stripe\Review::OBJECT_NAME => \SimplePay\Vendor\Stripe\Review::class, - \SimplePay\Vendor\Stripe\SearchResult::OBJECT_NAME => \SimplePay\Vendor\Stripe\SearchResult::class, - \SimplePay\Vendor\Stripe\SetupAttempt::OBJECT_NAME => \SimplePay\Vendor\Stripe\SetupAttempt::class, - \SimplePay\Vendor\Stripe\SetupIntent::OBJECT_NAME => \SimplePay\Vendor\Stripe\SetupIntent::class, - \SimplePay\Vendor\Stripe\ShippingRate::OBJECT_NAME => \SimplePay\Vendor\Stripe\ShippingRate::class, - \SimplePay\Vendor\Stripe\Sigma\ScheduledQueryRun::OBJECT_NAME => \SimplePay\Vendor\Stripe\Sigma\ScheduledQueryRun::class, - \SimplePay\Vendor\Stripe\Source::OBJECT_NAME => \SimplePay\Vendor\Stripe\Source::class, - \SimplePay\Vendor\Stripe\SourceTransaction::OBJECT_NAME => \SimplePay\Vendor\Stripe\SourceTransaction::class, - \SimplePay\Vendor\Stripe\Subscription::OBJECT_NAME => \SimplePay\Vendor\Stripe\Subscription::class, - \SimplePay\Vendor\Stripe\SubscriptionItem::OBJECT_NAME => \SimplePay\Vendor\Stripe\SubscriptionItem::class, - \SimplePay\Vendor\Stripe\SubscriptionSchedule::OBJECT_NAME => \SimplePay\Vendor\Stripe\SubscriptionSchedule::class, - \SimplePay\Vendor\Stripe\Tax\Calculation::OBJECT_NAME => \SimplePay\Vendor\Stripe\Tax\Calculation::class, - \SimplePay\Vendor\Stripe\Tax\Registration::OBJECT_NAME => \SimplePay\Vendor\Stripe\Tax\Registration::class, - \SimplePay\Vendor\Stripe\Tax\Settings::OBJECT_NAME => \SimplePay\Vendor\Stripe\Tax\Settings::class, - \SimplePay\Vendor\Stripe\Tax\Transaction::OBJECT_NAME => \SimplePay\Vendor\Stripe\Tax\Transaction::class, - \SimplePay\Vendor\Stripe\TaxCode::OBJECT_NAME => \SimplePay\Vendor\Stripe\TaxCode::class, - \SimplePay\Vendor\Stripe\TaxId::OBJECT_NAME => \SimplePay\Vendor\Stripe\TaxId::class, - \SimplePay\Vendor\Stripe\TaxRate::OBJECT_NAME => \SimplePay\Vendor\Stripe\TaxRate::class, - \SimplePay\Vendor\Stripe\Terminal\Configuration::OBJECT_NAME => \SimplePay\Vendor\Stripe\Terminal\Configuration::class, - \SimplePay\Vendor\Stripe\Terminal\ConnectionToken::OBJECT_NAME => \SimplePay\Vendor\Stripe\Terminal\ConnectionToken::class, - \SimplePay\Vendor\Stripe\Terminal\Location::OBJECT_NAME => \SimplePay\Vendor\Stripe\Terminal\Location::class, - \SimplePay\Vendor\Stripe\Terminal\Reader::OBJECT_NAME => \SimplePay\Vendor\Stripe\Terminal\Reader::class, - \SimplePay\Vendor\Stripe\TestHelpers\TestClock::OBJECT_NAME => \SimplePay\Vendor\Stripe\TestHelpers\TestClock::class, - \SimplePay\Vendor\Stripe\Token::OBJECT_NAME => \SimplePay\Vendor\Stripe\Token::class, - \SimplePay\Vendor\Stripe\Topup::OBJECT_NAME => \SimplePay\Vendor\Stripe\Topup::class, - \SimplePay\Vendor\Stripe\Transfer::OBJECT_NAME => \SimplePay\Vendor\Stripe\Transfer::class, - \SimplePay\Vendor\Stripe\TransferReversal::OBJECT_NAME => \SimplePay\Vendor\Stripe\TransferReversal::class, - \SimplePay\Vendor\Stripe\Treasury\CreditReversal::OBJECT_NAME => \SimplePay\Vendor\Stripe\Treasury\CreditReversal::class, - \SimplePay\Vendor\Stripe\Treasury\DebitReversal::OBJECT_NAME => \SimplePay\Vendor\Stripe\Treasury\DebitReversal::class, - \SimplePay\Vendor\Stripe\Treasury\FinancialAccount::OBJECT_NAME => \SimplePay\Vendor\Stripe\Treasury\FinancialAccount::class, - \SimplePay\Vendor\Stripe\Treasury\FinancialAccountFeatures::OBJECT_NAME => \SimplePay\Vendor\Stripe\Treasury\FinancialAccountFeatures::class, - \SimplePay\Vendor\Stripe\Treasury\InboundTransfer::OBJECT_NAME => \SimplePay\Vendor\Stripe\Treasury\InboundTransfer::class, - \SimplePay\Vendor\Stripe\Treasury\OutboundPayment::OBJECT_NAME => \SimplePay\Vendor\Stripe\Treasury\OutboundPayment::class, - \SimplePay\Vendor\Stripe\Treasury\OutboundTransfer::OBJECT_NAME => \SimplePay\Vendor\Stripe\Treasury\OutboundTransfer::class, - \SimplePay\Vendor\Stripe\Treasury\ReceivedCredit::OBJECT_NAME => \SimplePay\Vendor\Stripe\Treasury\ReceivedCredit::class, - \SimplePay\Vendor\Stripe\Treasury\ReceivedDebit::OBJECT_NAME => \SimplePay\Vendor\Stripe\Treasury\ReceivedDebit::class, - \SimplePay\Vendor\Stripe\Treasury\Transaction::OBJECT_NAME => \SimplePay\Vendor\Stripe\Treasury\Transaction::class, - \SimplePay\Vendor\Stripe\Treasury\TransactionEntry::OBJECT_NAME => \SimplePay\Vendor\Stripe\Treasury\TransactionEntry::class, - \SimplePay\Vendor\Stripe\UsageRecord::OBJECT_NAME => \SimplePay\Vendor\Stripe\UsageRecord::class, - \SimplePay\Vendor\Stripe\UsageRecordSummary::OBJECT_NAME => \SimplePay\Vendor\Stripe\UsageRecordSummary::class, - \SimplePay\Vendor\Stripe\WebhookEndpoint::OBJECT_NAME => \SimplePay\Vendor\Stripe\WebhookEndpoint::class, - ]; + const mapping = + [ + \SimplePay\Vendor\Stripe\Collection::OBJECT_NAME => \SimplePay\Vendor\Stripe\Collection::class, + \SimplePay\Vendor\Stripe\Issuing\CardDetails::OBJECT_NAME => \SimplePay\Vendor\Stripe\Issuing\CardDetails::class, + \SimplePay\Vendor\Stripe\SearchResult::OBJECT_NAME => \SimplePay\Vendor\Stripe\SearchResult::class, + \SimplePay\Vendor\Stripe\File::OBJECT_NAME_ALT => \SimplePay\Vendor\Stripe\File::class, + // The beginning of the section generated from our OpenAPI spec + \SimplePay\Vendor\Stripe\Account::OBJECT_NAME => \SimplePay\Vendor\Stripe\Account::class, + \SimplePay\Vendor\Stripe\AccountLink::OBJECT_NAME => \SimplePay\Vendor\Stripe\AccountLink::class, + \SimplePay\Vendor\Stripe\AccountSession::OBJECT_NAME => \SimplePay\Vendor\Stripe\AccountSession::class, + \SimplePay\Vendor\Stripe\ApplePayDomain::OBJECT_NAME => \SimplePay\Vendor\Stripe\ApplePayDomain::class, + \SimplePay\Vendor\Stripe\ApplicationFee::OBJECT_NAME => \SimplePay\Vendor\Stripe\ApplicationFee::class, + \SimplePay\Vendor\Stripe\ApplicationFeeRefund::OBJECT_NAME => \SimplePay\Vendor\Stripe\ApplicationFeeRefund::class, + \SimplePay\Vendor\Stripe\Apps\Secret::OBJECT_NAME => \SimplePay\Vendor\Stripe\Apps\Secret::class, + \SimplePay\Vendor\Stripe\Balance::OBJECT_NAME => \SimplePay\Vendor\Stripe\Balance::class, + \SimplePay\Vendor\Stripe\BalanceTransaction::OBJECT_NAME => \SimplePay\Vendor\Stripe\BalanceTransaction::class, + \SimplePay\Vendor\Stripe\BankAccount::OBJECT_NAME => \SimplePay\Vendor\Stripe\BankAccount::class, + \SimplePay\Vendor\Stripe\BillingPortal\Configuration::OBJECT_NAME => \SimplePay\Vendor\Stripe\BillingPortal\Configuration::class, + \SimplePay\Vendor\Stripe\BillingPortal\Session::OBJECT_NAME => \SimplePay\Vendor\Stripe\BillingPortal\Session::class, + \SimplePay\Vendor\Stripe\Capability::OBJECT_NAME => \SimplePay\Vendor\Stripe\Capability::class, + \SimplePay\Vendor\Stripe\Card::OBJECT_NAME => \SimplePay\Vendor\Stripe\Card::class, + \SimplePay\Vendor\Stripe\CashBalance::OBJECT_NAME => \SimplePay\Vendor\Stripe\CashBalance::class, + \SimplePay\Vendor\Stripe\Charge::OBJECT_NAME => \SimplePay\Vendor\Stripe\Charge::class, + \SimplePay\Vendor\Stripe\Checkout\Session::OBJECT_NAME => \SimplePay\Vendor\Stripe\Checkout\Session::class, + \SimplePay\Vendor\Stripe\CountrySpec::OBJECT_NAME => \SimplePay\Vendor\Stripe\CountrySpec::class, + \SimplePay\Vendor\Stripe\Coupon::OBJECT_NAME => \SimplePay\Vendor\Stripe\Coupon::class, + \SimplePay\Vendor\Stripe\CreditNote::OBJECT_NAME => \SimplePay\Vendor\Stripe\CreditNote::class, + \SimplePay\Vendor\Stripe\CreditNoteLineItem::OBJECT_NAME => \SimplePay\Vendor\Stripe\CreditNoteLineItem::class, + \SimplePay\Vendor\Stripe\Customer::OBJECT_NAME => \SimplePay\Vendor\Stripe\Customer::class, + \SimplePay\Vendor\Stripe\CustomerBalanceTransaction::OBJECT_NAME => \SimplePay\Vendor\Stripe\CustomerBalanceTransaction::class, + \SimplePay\Vendor\Stripe\CustomerCashBalanceTransaction::OBJECT_NAME => \SimplePay\Vendor\Stripe\CustomerCashBalanceTransaction::class, + \SimplePay\Vendor\Stripe\Discount::OBJECT_NAME => \SimplePay\Vendor\Stripe\Discount::class, + \SimplePay\Vendor\Stripe\Dispute::OBJECT_NAME => \SimplePay\Vendor\Stripe\Dispute::class, + \SimplePay\Vendor\Stripe\EphemeralKey::OBJECT_NAME => \SimplePay\Vendor\Stripe\EphemeralKey::class, + \SimplePay\Vendor\Stripe\Event::OBJECT_NAME => \SimplePay\Vendor\Stripe\Event::class, + \SimplePay\Vendor\Stripe\ExchangeRate::OBJECT_NAME => \SimplePay\Vendor\Stripe\ExchangeRate::class, + \SimplePay\Vendor\Stripe\File::OBJECT_NAME => \SimplePay\Vendor\Stripe\File::class, + \SimplePay\Vendor\Stripe\FileLink::OBJECT_NAME => \SimplePay\Vendor\Stripe\FileLink::class, + \SimplePay\Vendor\Stripe\FinancialConnections\Account::OBJECT_NAME => \SimplePay\Vendor\Stripe\FinancialConnections\Account::class, + \SimplePay\Vendor\Stripe\FinancialConnections\AccountOwner::OBJECT_NAME => \SimplePay\Vendor\Stripe\FinancialConnections\AccountOwner::class, + \SimplePay\Vendor\Stripe\FinancialConnections\AccountOwnership::OBJECT_NAME => \SimplePay\Vendor\Stripe\FinancialConnections\AccountOwnership::class, + \SimplePay\Vendor\Stripe\FinancialConnections\Session::OBJECT_NAME => \SimplePay\Vendor\Stripe\FinancialConnections\Session::class, + \SimplePay\Vendor\Stripe\FundingInstructions::OBJECT_NAME => \SimplePay\Vendor\Stripe\FundingInstructions::class, + \SimplePay\Vendor\Stripe\Identity\VerificationReport::OBJECT_NAME => \SimplePay\Vendor\Stripe\Identity\VerificationReport::class, + \SimplePay\Vendor\Stripe\Identity\VerificationSession::OBJECT_NAME => \SimplePay\Vendor\Stripe\Identity\VerificationSession::class, + \SimplePay\Vendor\Stripe\Invoice::OBJECT_NAME => \SimplePay\Vendor\Stripe\Invoice::class, + \SimplePay\Vendor\Stripe\InvoiceItem::OBJECT_NAME => \SimplePay\Vendor\Stripe\InvoiceItem::class, + \SimplePay\Vendor\Stripe\InvoiceLineItem::OBJECT_NAME => \SimplePay\Vendor\Stripe\InvoiceLineItem::class, + \SimplePay\Vendor\Stripe\Issuing\Authorization::OBJECT_NAME => \SimplePay\Vendor\Stripe\Issuing\Authorization::class, + \SimplePay\Vendor\Stripe\Issuing\Card::OBJECT_NAME => \SimplePay\Vendor\Stripe\Issuing\Card::class, + \SimplePay\Vendor\Stripe\Issuing\Cardholder::OBJECT_NAME => \SimplePay\Vendor\Stripe\Issuing\Cardholder::class, + \SimplePay\Vendor\Stripe\Issuing\Dispute::OBJECT_NAME => \SimplePay\Vendor\Stripe\Issuing\Dispute::class, + \SimplePay\Vendor\Stripe\Issuing\Token::OBJECT_NAME => \SimplePay\Vendor\Stripe\Issuing\Token::class, + \SimplePay\Vendor\Stripe\Issuing\Transaction::OBJECT_NAME => \SimplePay\Vendor\Stripe\Issuing\Transaction::class, + \SimplePay\Vendor\Stripe\LineItem::OBJECT_NAME => \SimplePay\Vendor\Stripe\LineItem::class, + \SimplePay\Vendor\Stripe\LoginLink::OBJECT_NAME => \SimplePay\Vendor\Stripe\LoginLink::class, + \SimplePay\Vendor\Stripe\Mandate::OBJECT_NAME => \SimplePay\Vendor\Stripe\Mandate::class, + \SimplePay\Vendor\Stripe\PaymentIntent::OBJECT_NAME => \SimplePay\Vendor\Stripe\PaymentIntent::class, + \SimplePay\Vendor\Stripe\PaymentLink::OBJECT_NAME => \SimplePay\Vendor\Stripe\PaymentLink::class, + \SimplePay\Vendor\Stripe\PaymentMethod::OBJECT_NAME => \SimplePay\Vendor\Stripe\PaymentMethod::class, + \SimplePay\Vendor\Stripe\PaymentMethodConfiguration::OBJECT_NAME => \SimplePay\Vendor\Stripe\PaymentMethodConfiguration::class, + \SimplePay\Vendor\Stripe\PaymentMethodDomain::OBJECT_NAME => \SimplePay\Vendor\Stripe\PaymentMethodDomain::class, + \SimplePay\Vendor\Stripe\Payout::OBJECT_NAME => \SimplePay\Vendor\Stripe\Payout::class, + \SimplePay\Vendor\Stripe\Person::OBJECT_NAME => \SimplePay\Vendor\Stripe\Person::class, + \SimplePay\Vendor\Stripe\Plan::OBJECT_NAME => \SimplePay\Vendor\Stripe\Plan::class, + \SimplePay\Vendor\Stripe\Price::OBJECT_NAME => \SimplePay\Vendor\Stripe\Price::class, + \SimplePay\Vendor\Stripe\Product::OBJECT_NAME => \SimplePay\Vendor\Stripe\Product::class, + \SimplePay\Vendor\Stripe\PromotionCode::OBJECT_NAME => \SimplePay\Vendor\Stripe\PromotionCode::class, + \SimplePay\Vendor\Stripe\Quote::OBJECT_NAME => \SimplePay\Vendor\Stripe\Quote::class, + \SimplePay\Vendor\Stripe\Radar\EarlyFraudWarning::OBJECT_NAME => \SimplePay\Vendor\Stripe\Radar\EarlyFraudWarning::class, + \SimplePay\Vendor\Stripe\Radar\ValueList::OBJECT_NAME => \SimplePay\Vendor\Stripe\Radar\ValueList::class, + \SimplePay\Vendor\Stripe\Radar\ValueListItem::OBJECT_NAME => \SimplePay\Vendor\Stripe\Radar\ValueListItem::class, + \SimplePay\Vendor\Stripe\Refund::OBJECT_NAME => \SimplePay\Vendor\Stripe\Refund::class, + \SimplePay\Vendor\Stripe\Reporting\ReportRun::OBJECT_NAME => \SimplePay\Vendor\Stripe\Reporting\ReportRun::class, + \SimplePay\Vendor\Stripe\Reporting\ReportType::OBJECT_NAME => \SimplePay\Vendor\Stripe\Reporting\ReportType::class, + \SimplePay\Vendor\Stripe\Review::OBJECT_NAME => \SimplePay\Vendor\Stripe\Review::class, + \SimplePay\Vendor\Stripe\SetupAttempt::OBJECT_NAME => \SimplePay\Vendor\Stripe\SetupAttempt::class, + \SimplePay\Vendor\Stripe\SetupIntent::OBJECT_NAME => \SimplePay\Vendor\Stripe\SetupIntent::class, + \SimplePay\Vendor\Stripe\ShippingRate::OBJECT_NAME => \SimplePay\Vendor\Stripe\ShippingRate::class, + \SimplePay\Vendor\Stripe\Sigma\ScheduledQueryRun::OBJECT_NAME => \SimplePay\Vendor\Stripe\Sigma\ScheduledQueryRun::class, + \SimplePay\Vendor\Stripe\Source::OBJECT_NAME => \SimplePay\Vendor\Stripe\Source::class, + \SimplePay\Vendor\Stripe\SourceTransaction::OBJECT_NAME => \SimplePay\Vendor\Stripe\SourceTransaction::class, + \SimplePay\Vendor\Stripe\Subscription::OBJECT_NAME => \SimplePay\Vendor\Stripe\Subscription::class, + \SimplePay\Vendor\Stripe\SubscriptionItem::OBJECT_NAME => \SimplePay\Vendor\Stripe\SubscriptionItem::class, + \SimplePay\Vendor\Stripe\SubscriptionSchedule::OBJECT_NAME => \SimplePay\Vendor\Stripe\SubscriptionSchedule::class, + \SimplePay\Vendor\Stripe\Tax\Calculation::OBJECT_NAME => \SimplePay\Vendor\Stripe\Tax\Calculation::class, + \SimplePay\Vendor\Stripe\Tax\CalculationLineItem::OBJECT_NAME => \SimplePay\Vendor\Stripe\Tax\CalculationLineItem::class, + \SimplePay\Vendor\Stripe\Tax\Registration::OBJECT_NAME => \SimplePay\Vendor\Stripe\Tax\Registration::class, + \SimplePay\Vendor\Stripe\Tax\Settings::OBJECT_NAME => \SimplePay\Vendor\Stripe\Tax\Settings::class, + \SimplePay\Vendor\Stripe\Tax\Transaction::OBJECT_NAME => \SimplePay\Vendor\Stripe\Tax\Transaction::class, + \SimplePay\Vendor\Stripe\Tax\TransactionLineItem::OBJECT_NAME => \SimplePay\Vendor\Stripe\Tax\TransactionLineItem::class, + \SimplePay\Vendor\Stripe\TaxCode::OBJECT_NAME => \SimplePay\Vendor\Stripe\TaxCode::class, + \SimplePay\Vendor\Stripe\TaxId::OBJECT_NAME => \SimplePay\Vendor\Stripe\TaxId::class, + \SimplePay\Vendor\Stripe\TaxRate::OBJECT_NAME => \SimplePay\Vendor\Stripe\TaxRate::class, + \SimplePay\Vendor\Stripe\Terminal\Configuration::OBJECT_NAME => \SimplePay\Vendor\Stripe\Terminal\Configuration::class, + \SimplePay\Vendor\Stripe\Terminal\ConnectionToken::OBJECT_NAME => \SimplePay\Vendor\Stripe\Terminal\ConnectionToken::class, + \SimplePay\Vendor\Stripe\Terminal\Location::OBJECT_NAME => \SimplePay\Vendor\Stripe\Terminal\Location::class, + \SimplePay\Vendor\Stripe\Terminal\Reader::OBJECT_NAME => \SimplePay\Vendor\Stripe\Terminal\Reader::class, + \SimplePay\Vendor\Stripe\TestHelpers\TestClock::OBJECT_NAME => \SimplePay\Vendor\Stripe\TestHelpers\TestClock::class, + \SimplePay\Vendor\Stripe\Token::OBJECT_NAME => \SimplePay\Vendor\Stripe\Token::class, + \SimplePay\Vendor\Stripe\Topup::OBJECT_NAME => \SimplePay\Vendor\Stripe\Topup::class, + \SimplePay\Vendor\Stripe\Transfer::OBJECT_NAME => \SimplePay\Vendor\Stripe\Transfer::class, + \SimplePay\Vendor\Stripe\TransferReversal::OBJECT_NAME => \SimplePay\Vendor\Stripe\TransferReversal::class, + \SimplePay\Vendor\Stripe\Treasury\CreditReversal::OBJECT_NAME => \SimplePay\Vendor\Stripe\Treasury\CreditReversal::class, + \SimplePay\Vendor\Stripe\Treasury\DebitReversal::OBJECT_NAME => \SimplePay\Vendor\Stripe\Treasury\DebitReversal::class, + \SimplePay\Vendor\Stripe\Treasury\FinancialAccount::OBJECT_NAME => \SimplePay\Vendor\Stripe\Treasury\FinancialAccount::class, + \SimplePay\Vendor\Stripe\Treasury\FinancialAccountFeatures::OBJECT_NAME => \SimplePay\Vendor\Stripe\Treasury\FinancialAccountFeatures::class, + \SimplePay\Vendor\Stripe\Treasury\InboundTransfer::OBJECT_NAME => \SimplePay\Vendor\Stripe\Treasury\InboundTransfer::class, + \SimplePay\Vendor\Stripe\Treasury\OutboundPayment::OBJECT_NAME => \SimplePay\Vendor\Stripe\Treasury\OutboundPayment::class, + \SimplePay\Vendor\Stripe\Treasury\OutboundTransfer::OBJECT_NAME => \SimplePay\Vendor\Stripe\Treasury\OutboundTransfer::class, + \SimplePay\Vendor\Stripe\Treasury\ReceivedCredit::OBJECT_NAME => \SimplePay\Vendor\Stripe\Treasury\ReceivedCredit::class, + \SimplePay\Vendor\Stripe\Treasury\ReceivedDebit::OBJECT_NAME => \SimplePay\Vendor\Stripe\Treasury\ReceivedDebit::class, + \SimplePay\Vendor\Stripe\Treasury\Transaction::OBJECT_NAME => \SimplePay\Vendor\Stripe\Treasury\Transaction::class, + \SimplePay\Vendor\Stripe\Treasury\TransactionEntry::OBJECT_NAME => \SimplePay\Vendor\Stripe\Treasury\TransactionEntry::class, + \SimplePay\Vendor\Stripe\UsageRecord::OBJECT_NAME => \SimplePay\Vendor\Stripe\UsageRecord::class, + \SimplePay\Vendor\Stripe\UsageRecordSummary::OBJECT_NAME => \SimplePay\Vendor\Stripe\UsageRecordSummary::class, + \SimplePay\Vendor\Stripe\WebhookEndpoint::OBJECT_NAME => \SimplePay\Vendor\Stripe\WebhookEndpoint::class, + // The end of the section generated from our OpenAPI spec + ]; } diff --git a/lib/Stripe/lib/Util/Util.php b/lib/Stripe/lib/Util/Util.php index 53eed108..6b7fb660 100644 --- a/lib/Stripe/lib/Util/Util.php +++ b/lib/Stripe/lib/Util/Util.php @@ -243,6 +243,10 @@ public static function urlEncode($key) public static function normalizeId($id) { if (\is_array($id)) { + // see https://github.com/stripe/stripe-php/pull/1602 + if (!isset($id['id'])) { + return [null, $id]; + } $params = $id; $id = $params['id']; unset($params['id']); diff --git a/lib/Stripe/lib/WebhookEndpoint.php b/lib/Stripe/lib/WebhookEndpoint.php index 3a6ec306..f5abd886 100644 --- a/lib/Stripe/lib/WebhookEndpoint.php +++ b/lib/Stripe/lib/WebhookEndpoint.php @@ -5,16 +5,13 @@ namespace SimplePay\Vendor\Stripe; /** - * You can configure webhook - * endpoints via the API to be notified about events that happen in your SimplePay\Vendor\Stripe - * account or connected accounts. + * You can configure webhook endpoints via the API to be + * notified about events that happen in your SimplePay\Vendor\Stripe account or connected + * accounts. * - * Most users configure webhooks from the dashboard, which provides a - * user interface for registering and testing your webhook endpoints. + * Most users configure webhooks from the dashboard, which provides a user interface for registering and testing your webhook endpoints. * - * Related guide: Setting up - * Webhooks. + * Related guide: Setting up webhooks * * @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. @@ -25,7 +22,7 @@ * @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 \SimplePay\Vendor\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 $secret The endpoint's secret, used to generate webhook signatures. Only returned at creation. + * @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. * @property string $url The URL of the webhook endpoint. */ diff --git a/lib/Stripe/phpdoc.dist.xml b/lib/Stripe/phpdoc.dist.xml deleted file mode 100644 index b1ea92fa..00000000 --- a/lib/Stripe/phpdoc.dist.xml +++ /dev/null @@ -1,31 +0,0 @@ - - - - build/phpdoc - - - latest - - - lib - - api - - - php - - stripe-php - - -