Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update generated code for beta #1519

Merged
merged 10 commits into from
Jul 6, 2023
10 changes: 10 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,15 @@
# Changelog

## 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.16.0-beta.1 - 2023-06-22
* [#1515](https://github.com/stripe/stripe-php/pull/1515) Update generated code for beta
* Add support for new resource `CustomerSession`
Expand Down
2 changes: 1 addition & 1 deletion OPENAPI_VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
v393
v406
145 changes: 70 additions & 75 deletions init.php
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,6 @@
require __DIR__ . '/lib/BaseStripeClient.php';
require __DIR__ . '/lib/StripeClient.php';

// Stripe API Resources
require __DIR__ . '/lib/Account.php';
require __DIR__ . '/lib/AccountLink.php';
require __DIR__ . '/lib/AccountSession.php';
Expand Down Expand Up @@ -162,64 +161,26 @@
require __DIR__ . '/lib/Reporting/ReportType.php';
require __DIR__ . '/lib/Review.php';
require __DIR__ . '/lib/SearchResult.php';
require __DIR__ . '/lib/SetupAttempt.php';
require __DIR__ . '/lib/SetupIntent.php';
require __DIR__ . '/lib/ShippingRate.php';
require __DIR__ . '/lib/Sigma/ScheduledQueryRun.php';
require __DIR__ . '/lib/Source.php';
require __DIR__ . '/lib/SourceTransaction.php';
require __DIR__ . '/lib/Subscription.php';
require __DIR__ . '/lib/SubscriptionItem.php';
require __DIR__ . '/lib/SubscriptionSchedule.php';
require __DIR__ . '/lib/Tax/Calculation.php';
require __DIR__ . '/lib/Tax/CalculationLineItem.php';
require __DIR__ . '/lib/Tax/Registration.php';
require __DIR__ . '/lib/Tax/Settings.php';
require __DIR__ . '/lib/Tax/Transaction.php';
require __DIR__ . '/lib/Tax/TransactionLineItem.php';
require __DIR__ . '/lib/TaxCode.php';
require __DIR__ . '/lib/TaxId.php';
require __DIR__ . '/lib/TaxRate.php';
require __DIR__ . '/lib/Terminal/Configuration.php';
require __DIR__ . '/lib/Terminal/ConnectionToken.php';
require __DIR__ . '/lib/Terminal/Location.php';
require __DIR__ . '/lib/Terminal/Reader.php';
require __DIR__ . '/lib/TestHelpers/TestClock.php';
require __DIR__ . '/lib/Token.php';
require __DIR__ . '/lib/Topup.php';
require __DIR__ . '/lib/Transfer.php';
require __DIR__ . '/lib/TransferReversal.php';
require __DIR__ . '/lib/Treasury/CreditReversal.php';
require __DIR__ . '/lib/Treasury/DebitReversal.php';
require __DIR__ . '/lib/Treasury/FinancialAccount.php';
require __DIR__ . '/lib/Treasury/FinancialAccountFeatures.php';
require __DIR__ . '/lib/Treasury/InboundTransfer.php';
require __DIR__ . '/lib/Treasury/OutboundPayment.php';
require __DIR__ . '/lib/Treasury/OutboundTransfer.php';
require __DIR__ . '/lib/Treasury/ReceivedCredit.php';
require __DIR__ . '/lib/Treasury/ReceivedDebit.php';
require __DIR__ . '/lib/Treasury/Transaction.php';
require __DIR__ . '/lib/Treasury/TransactionEntry.php';
require __DIR__ . '/lib/UsageRecord.php';
require __DIR__ . '/lib/UsageRecordSummary.php';
require __DIR__ . '/lib/WebhookEndpoint.php';

// Services
require __DIR__ . '/lib/Service/AccountService.php';
require __DIR__ . '/lib/Service/AccountLinkService.php';
require __DIR__ . '/lib/Service/AccountService.php';
require __DIR__ . '/lib/Service/AccountSessionService.php';
require __DIR__ . '/lib/Service/ApplePayDomainService.php';
require __DIR__ . '/lib/Service/ApplicationFeeService.php';
require __DIR__ . '/lib/Service/Apps/AppsServiceFactory.php';
require __DIR__ . '/lib/Service/Apps/SecretService.php';
require __DIR__ . '/lib/Service/BalanceService.php';
require __DIR__ . '/lib/Service/BalanceTransactionService.php';
require __DIR__ . '/lib/Service/BillingPortal/BillingPortalServiceFactory.php';
require __DIR__ . '/lib/Service/BillingPortal/ConfigurationService.php';
require __DIR__ . '/lib/Service/BillingPortal/SessionService.php';
require __DIR__ . '/lib/Service/Capital/CapitalServiceFactory.php';
require __DIR__ . '/lib/Service/Capital/FinancingOfferService.php';
require __DIR__ . '/lib/Service/Capital/FinancingSummaryService.php';
require __DIR__ . '/lib/Service/Capital/FinancingTransactionService.php';
require __DIR__ . '/lib/Service/ChargeService.php';
require __DIR__ . '/lib/Service/Checkout/CheckoutServiceFactory.php';
require __DIR__ . '/lib/Service/Checkout/SessionService.php';
require __DIR__ . '/lib/Service/CoreServiceFactory.php';
require __DIR__ . '/lib/Service/CountrySpecService.php';
require __DIR__ . '/lib/Service/CouponService.php';
require __DIR__ . '/lib/Service/CreditNoteService.php';
Expand All @@ -229,23 +190,27 @@
require __DIR__ . '/lib/Service/EphemeralKeyService.php';
require __DIR__ . '/lib/Service/EventService.php';
require __DIR__ . '/lib/Service/ExchangeRateService.php';
require __DIR__ . '/lib/Service/FileService.php';
require __DIR__ . '/lib/Service/FileLinkService.php';
require __DIR__ . '/lib/Service/FileService.php';
require __DIR__ . '/lib/Service/FinancialConnections/AccountService.php';
require __DIR__ . '/lib/Service/FinancialConnections/FinancialConnectionsServiceFactory.php';
require __DIR__ . '/lib/Service/FinancialConnections/SessionService.php';
require __DIR__ . '/lib/Service/FinancialConnections/TransactionService.php';
require __DIR__ . '/lib/Service/GiftCards/CardService.php';
require __DIR__ . '/lib/Service/GiftCards/GiftCardsServiceFactory.php';
require __DIR__ . '/lib/Service/GiftCards/TransactionService.php';
require __DIR__ . '/lib/Service/Identity/IdentityServiceFactory.php';
require __DIR__ . '/lib/Service/Identity/VerificationReportService.php';
require __DIR__ . '/lib/Service/Identity/VerificationSessionService.php';
require __DIR__ . '/lib/Service/InvoiceService.php';
require __DIR__ . '/lib/Service/InvoiceItemService.php';
require __DIR__ . '/lib/Service/InvoiceService.php';
require __DIR__ . '/lib/Service/Issuing/AuthorizationService.php';
require __DIR__ . '/lib/Service/Issuing/CardService.php';
require __DIR__ . '/lib/Service/Issuing/CardBundleService.php';
require __DIR__ . '/lib/Service/Issuing/CardDesignService.php';
require __DIR__ . '/lib/Service/Issuing/CardService.php';
require __DIR__ . '/lib/Service/Issuing/CardholderService.php';
require __DIR__ . '/lib/Service/Issuing/DisputeService.php';
require __DIR__ . '/lib/Service/Issuing/IssuingServiceFactory.php';
require __DIR__ . '/lib/Service/Issuing/TransactionService.php';
require __DIR__ . '/lib/Service/MandateService.php';
require __DIR__ . '/lib/Service/OrderService.php';
Expand All @@ -257,44 +222,53 @@
require __DIR__ . '/lib/Service/PriceService.php';
require __DIR__ . '/lib/Service/ProductService.php';
require __DIR__ . '/lib/Service/PromotionCodeService.php';
require __DIR__ . '/lib/Service/QuoteService.php';
require __DIR__ . '/lib/Service/QuotePhaseService.php';
require __DIR__ . '/lib/Service/QuoteService.php';
require __DIR__ . '/lib/Service/Radar/EarlyFraudWarningService.php';
require __DIR__ . '/lib/Service/Radar/ValueListService.php';
require __DIR__ . '/lib/Service/Radar/RadarServiceFactory.php';
require __DIR__ . '/lib/Service/Radar/ValueListItemService.php';
require __DIR__ . '/lib/Service/Radar/ValueListService.php';
require __DIR__ . '/lib/Service/RefundService.php';
require __DIR__ . '/lib/Service/Reporting/ReportRunService.php';
require __DIR__ . '/lib/Service/Reporting/ReportTypeService.php';
require __DIR__ . '/lib/Service/Reporting/ReportingServiceFactory.php';
require __DIR__ . '/lib/Service/ReviewService.php';
require __DIR__ . '/lib/Service/SetupAttemptService.php';
require __DIR__ . '/lib/Service/SetupIntentService.php';
require __DIR__ . '/lib/Service/ShippingRateService.php';
require __DIR__ . '/lib/Service/Sigma/ScheduledQueryRunService.php';
require __DIR__ . '/lib/Service/Sigma/SigmaServiceFactory.php';
require __DIR__ . '/lib/Service/SourceService.php';
require __DIR__ . '/lib/Service/SubscriptionService.php';
require __DIR__ . '/lib/Service/SubscriptionItemService.php';
require __DIR__ . '/lib/Service/SubscriptionScheduleService.php';
require __DIR__ . '/lib/Service/SubscriptionService.php';
require __DIR__ . '/lib/Service/Tax/CalculationService.php';
require __DIR__ . '/lib/Service/Tax/RegistrationService.php';
require __DIR__ . '/lib/Service/Tax/SettingsService.php';
require __DIR__ . '/lib/Service/Tax/SettingService.php';
require __DIR__ . '/lib/Service/Tax/TaxServiceFactory.php';
require __DIR__ . '/lib/Service/Tax/TransactionService.php';
require __DIR__ . '/lib/Service/TaxCodeService.php';
require __DIR__ . '/lib/Service/TaxRateService.php';
require __DIR__ . '/lib/Service/Terminal/ConfigurationService.php';
require __DIR__ . '/lib/Service/Terminal/ConnectionTokenService.php';
require __DIR__ . '/lib/Service/Terminal/LocationService.php';
require __DIR__ . '/lib/Service/Terminal/ReaderService.php';
require __DIR__ . '/lib/Service/Terminal/TerminalServiceFactory.php';
require __DIR__ . '/lib/Service/TestHelpers/CustomerService.php';
require __DIR__ . '/lib/Service/TestHelpers/Issuing/CardService.php';
require __DIR__ . '/lib/Service/TestHelpers/Issuing/CardDesignService.php';
require __DIR__ . '/lib/Service/TestHelpers/Issuing/CardService.php';
require __DIR__ . '/lib/Service/TestHelpers/Issuing/IssuingServiceFactory.php';
require __DIR__ . '/lib/Service/TestHelpers/RefundService.php';
require __DIR__ . '/lib/Service/TestHelpers/Terminal/ReaderService.php';
require __DIR__ . '/lib/Service/TestHelpers/Terminal/TerminalServiceFactory.php';
require __DIR__ . '/lib/Service/TestHelpers/TestClockService.php';
require __DIR__ . '/lib/Service/TestHelpers/TestHelpersServiceFactory.php';
require __DIR__ . '/lib/Service/TestHelpers/Treasury/InboundTransferService.php';
require __DIR__ . '/lib/Service/TestHelpers/Treasury/OutboundPaymentService.php';
require __DIR__ . '/lib/Service/TestHelpers/Treasury/OutboundTransferService.php';
require __DIR__ . '/lib/Service/TestHelpers/Treasury/ReceivedCreditService.php';
require __DIR__ . '/lib/Service/TestHelpers/Treasury/ReceivedDebitService.php';
require __DIR__ . '/lib/Service/TestHelpers/Treasury/TreasuryServiceFactory.php';
require __DIR__ . '/lib/Service/TokenService.php';
require __DIR__ . '/lib/Service/TopupService.php';
require __DIR__ . '/lib/Service/TransferService.php';
Expand All @@ -306,30 +280,51 @@
require __DIR__ . '/lib/Service/Treasury/OutboundTransferService.php';
require __DIR__ . '/lib/Service/Treasury/ReceivedCreditService.php';
require __DIR__ . '/lib/Service/Treasury/ReceivedDebitService.php';
require __DIR__ . '/lib/Service/Treasury/TransactionService.php';
require __DIR__ . '/lib/Service/Treasury/TransactionEntryService.php';
require __DIR__ . '/lib/Service/WebhookEndpointService.php';

// Service factories
require __DIR__ . '/lib/Service/Apps/AppsServiceFactory.php';
require __DIR__ . '/lib/Service/BillingPortal/BillingPortalServiceFactory.php';
require __DIR__ . '/lib/Service/Capital/CapitalServiceFactory.php';
require __DIR__ . '/lib/Service/Checkout/CheckoutServiceFactory.php';
require __DIR__ . '/lib/Service/CoreServiceFactory.php';
require __DIR__ . '/lib/Service/FinancialConnections/FinancialConnectionsServiceFactory.php';
require __DIR__ . '/lib/Service/GiftCards/GiftCardsServiceFactory.php';
require __DIR__ . '/lib/Service/Identity/IdentityServiceFactory.php';
require __DIR__ . '/lib/Service/Issuing/IssuingServiceFactory.php';
require __DIR__ . '/lib/Service/Radar/RadarServiceFactory.php';
require __DIR__ . '/lib/Service/Reporting/ReportingServiceFactory.php';
require __DIR__ . '/lib/Service/Sigma/SigmaServiceFactory.php';
require __DIR__ . '/lib/Service/Tax/TaxServiceFactory.php';
require __DIR__ . '/lib/Service/Terminal/TerminalServiceFactory.php';
require __DIR__ . '/lib/Service/TestHelpers/Issuing/IssuingServiceFactory.php';
require __DIR__ . '/lib/Service/TestHelpers/Terminal/TerminalServiceFactory.php';
require __DIR__ . '/lib/Service/TestHelpers/TestHelpersServiceFactory.php';
require __DIR__ . '/lib/Service/TestHelpers/Treasury/TreasuryServiceFactory.php';
require __DIR__ . '/lib/Service/Treasury/TransactionService.php';
require __DIR__ . '/lib/Service/Treasury/TreasuryServiceFactory.php';
require __DIR__ . '/lib/Service/WebhookEndpointService.php';
require __DIR__ . '/lib/SetupAttempt.php';
require __DIR__ . '/lib/SetupIntent.php';
require __DIR__ . '/lib/ShippingRate.php';
require __DIR__ . '/lib/Sigma/ScheduledQueryRun.php';
require __DIR__ . '/lib/Source.php';
require __DIR__ . '/lib/SourceTransaction.php';
require __DIR__ . '/lib/Subscription.php';
require __DIR__ . '/lib/SubscriptionItem.php';
require __DIR__ . '/lib/SubscriptionSchedule.php';
require __DIR__ . '/lib/Tax/Calculation.php';
require __DIR__ . '/lib/Tax/CalculationLineItem.php';
require __DIR__ . '/lib/Tax/Registration.php';
require __DIR__ . '/lib/Tax/Settings.php';
require __DIR__ . '/lib/Tax/Transaction.php';
require __DIR__ . '/lib/Tax/TransactionLineItem.php';
require __DIR__ . '/lib/TaxCode.php';
require __DIR__ . '/lib/TaxId.php';
require __DIR__ . '/lib/TaxRate.php';
require __DIR__ . '/lib/Terminal/Configuration.php';
require __DIR__ . '/lib/Terminal/ConnectionToken.php';
require __DIR__ . '/lib/Terminal/Location.php';
require __DIR__ . '/lib/Terminal/Reader.php';
require __DIR__ . '/lib/TestHelpers/TestClock.php';
require __DIR__ . '/lib/Token.php';
require __DIR__ . '/lib/Topup.php';
require __DIR__ . '/lib/Transfer.php';
require __DIR__ . '/lib/TransferReversal.php';
require __DIR__ . '/lib/Treasury/CreditReversal.php';
require __DIR__ . '/lib/Treasury/DebitReversal.php';
require __DIR__ . '/lib/Treasury/FinancialAccount.php';
require __DIR__ . '/lib/Treasury/FinancialAccountFeatures.php';
require __DIR__ . '/lib/Treasury/InboundTransfer.php';
require __DIR__ . '/lib/Treasury/OutboundPayment.php';
require __DIR__ . '/lib/Treasury/OutboundTransfer.php';
require __DIR__ . '/lib/Treasury/ReceivedCredit.php';
require __DIR__ . '/lib/Treasury/ReceivedDebit.php';
require __DIR__ . '/lib/Treasury/Transaction.php';
require __DIR__ . '/lib/Treasury/TransactionEntry.php';
require __DIR__ . '/lib/UsageRecord.php';
require __DIR__ . '/lib/UsageRecordSummary.php';
require __DIR__ . '/lib/WebhookEndpoint.php';

// OAuth
require __DIR__ . '/lib/OAuth.php';
Expand Down
1 change: 1 addition & 0 deletions lib/CreditNote.php
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@
* @property null|string|\Stripe\CustomerBalanceTransaction $customer_balance_transaction Customer balance transaction related to this credit note.
* @property int $discount_amount The integer amount in %s representing the total amount of discount that was credited.
* @property \Stripe\StripeObject[] $discount_amounts The aggregate amounts calculated per discount for all line items.
* @property null|int $effective_at The date when this credit note is in effect. Same as <code>created</code> unless overwritten. When defined, this value replaces the system-generated 'Date of issue' printed on the credit note PDF.
* @property string|\Stripe\Invoice $invoice ID of the invoice.
* @property \Stripe\Collection<\Stripe\CreditNoteLineItem> $lines Line items that make up the credit note
* @property bool $livemode Has the value <code>true</code> if the object exists in live mode or the value <code>false</code> if the object exists in test mode.
Expand Down
2 changes: 1 addition & 1 deletion lib/CustomerSession.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
namespace Stripe;

/**
* A customer session allows you to grant client access to Stripe's frontend SDKs (like BillingJs)
* A customer session allows you to grant client access to Stripe's frontend SDKs (like StripeJs)
* control over a customer.
*
* @property string $object String representing the object's type. Objects of the same type share the same value.
Expand Down
1 change: 1 addition & 0 deletions lib/ErrorObject.php
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,7 @@ 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_BANK_ACCOUNT_BAD_ROUTING_NUMBERS = 'bank_account_bad_routing_numbers';
Expand Down
2 changes: 2 additions & 0 deletions lib/FinancialConnections/AccountOwner.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@
namespace 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.
Expand Down
1 change: 1 addition & 0 deletions lib/Invoice.php
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,7 @@
* @property null|\Stripe\Discount $discount Describes the current discount applied to this invoice, if there is one. Not populated if there are multiple discounts.
* @property null|(string|\Stripe\Discount)[] $discounts The discounts applied to the invoice. Line item discounts are applied before invoice discounts. Use <code>expand[]=discounts</code> to expand each discount.
* @property null|int $due_date The date on which payment for this invoice is due. This value will be <code>null</code> for invoices where <code>collection_method=charge_automatically</code>.
* @property null|int $effective_at The date when this invoice is in effect. Same as <code>finalized_at</code> 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|\Stripe\StripeObject $from_invoice Details of the invoice that was cloned. See the <a href="https://stripe.com/docs/invoicing/invoice-revisions">revision documentation</a> for more details.
Expand Down
6 changes: 3 additions & 3 deletions lib/Service/CustomerService.php
Original file line number Diff line number Diff line change
Expand Up @@ -235,7 +235,7 @@ public function deleteDiscount($id, $params = null, $opts = null)
*
* @throws \Stripe\Exception\ApiErrorException if the request fails
*
* @return \Stripe\BankAccount|\Stripe\Card|\Stripe\Source
* @return \Stripe\Account|\Stripe\BankAccount|\Stripe\Card|\Stripe\Source
*/
public function deleteSource($parentId, $id, $params = null, $opts = null)
{
Expand Down Expand Up @@ -468,7 +468,7 @@ public function updateCashBalance($parentId, $params = null, $opts = null)
*
* @throws \Stripe\Exception\ApiErrorException if the request fails
*
* @return \Stripe\BankAccount|\Stripe\Card|\Stripe\Source
* @return \Stripe\Account|\Stripe\BankAccount|\Stripe\Card|\Stripe\Source
*/
public function updateSource($parentId, $id, $params = null, $opts = null)
{
Expand All @@ -483,7 +483,7 @@ public function updateSource($parentId, $id, $params = null, $opts = null)
*
* @throws \Stripe\Exception\ApiErrorException if the request fails
*
* @return \Stripe\BankAccount|\Stripe\Card|\Stripe\Source
* @return \Stripe\Account|\Stripe\BankAccount|\Stripe\Card|\Stripe\Source
*/
public function verifySource($parentId, $id, $params = null, $opts = null)
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

namespace Stripe\Service\Tax;

class SettingsService extends \Stripe\Service\AbstractService
class SettingService extends \Stripe\Service\AbstractService
{
/**
* Retrieves Tax <code>Settings</code> for a merchant.
Expand Down
4 changes: 2 additions & 2 deletions lib/Service/Tax/TaxServiceFactory.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
*
* @property CalculationService $calculations
* @property RegistrationService $registrations
* @property SettingsService $settings
* @property SettingService $settings
* @property TransactionService $transactions
*/
class TaxServiceFactory extends \Stripe\Service\AbstractServiceFactory
Expand All @@ -20,7 +20,7 @@ class TaxServiceFactory extends \Stripe\Service\AbstractServiceFactory
private static $classMap = [
'calculations' => CalculationService::class,
'registrations' => RegistrationService::class,
'settings' => SettingsService::class,
'settings' => SettingService::class,
pakrym-stripe marked this conversation as resolved.
Show resolved Hide resolved
'transactions' => TransactionService::class,
];

Expand Down
Loading