From f1d08edc78daefc8f5af15fb95698b337e5cc5ff Mon Sep 17 00:00:00 2001 From: Stripe OpenAPI <105521251+stripe-openapi[bot]@users.noreply.github.com> Date: Wed, 15 Mar 2023 17:53:02 +0000 Subject: [PATCH 1/5] Update generated code for v259 --- OPENAPI_VERSION | 2 +- init.php | 4 -- lib/Capital/FinancingOffer.php | 70 ------------------- lib/Capital/FinancingSummary.php | 25 ------- lib/Event.php | 1 + lib/InvoiceLineItem.php | 1 - lib/PaymentLink.php | 4 +- lib/Product.php | 5 +- lib/Quote.php | 5 +- lib/Service/Capital/CapitalServiceFactory.php | 4 -- lib/Service/Capital/FinancingOfferService.php | 58 --------------- .../Capital/FinancingSummaryService.php | 24 ------- lib/Service/QuoteService.php | 5 +- lib/StripeClient.php | 7 +- lib/Util/ObjectTypes.php | 2 - 15 files changed, 18 insertions(+), 199 deletions(-) delete mode 100644 lib/Capital/FinancingOffer.php delete mode 100644 lib/Capital/FinancingSummary.php delete mode 100644 lib/Service/Capital/FinancingOfferService.php delete mode 100644 lib/Service/Capital/FinancingSummaryService.php diff --git a/OPENAPI_VERSION b/OPENAPI_VERSION index f93f657af..bd5433530 100644 --- a/OPENAPI_VERSION +++ b/OPENAPI_VERSION @@ -1 +1 @@ -v249 \ No newline at end of file +v259 \ No newline at end of file diff --git a/init.php b/init.php index 2659b9109..292424ce8 100644 --- a/init.php +++ b/init.php @@ -91,8 +91,6 @@ require __DIR__ . '/lib/BillingPortal/Configuration.php'; require __DIR__ . '/lib/BillingPortal/Session.php'; require __DIR__ . '/lib/Capability.php'; -require __DIR__ . '/lib/Capital/FinancingOffer.php'; -require __DIR__ . '/lib/Capital/FinancingSummary.php'; require __DIR__ . '/lib/Capital/FinancingTransaction.php'; require __DIR__ . '/lib/Card.php'; require __DIR__ . '/lib/CashBalance.php'; @@ -210,8 +208,6 @@ require __DIR__ . '/lib/Service/BalanceTransactionService.php'; require __DIR__ . '/lib/Service/BillingPortal/ConfigurationService.php'; require __DIR__ . '/lib/Service/BillingPortal/SessionService.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/SessionService.php'; diff --git a/lib/Capital/FinancingOffer.php b/lib/Capital/FinancingOffer.php deleted file mode 100644 index 569db7e1e..000000000 --- a/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 null|\Stripe\StripeObject $metadata Set of key-value pairs that you can attach to an object. This can be useful for storing additional information about the object in a structured format. - * @property null|\Stripe\StripeObject $offered_terms This is an object representing the terms of an offer of financing from Stripe Capital to a Connected account. This resource represents both the terms offered to the Connected account. - * @property null|string $product_type Financing product identifier. - * @property null|string $replacement The ID of the financing offer that replaced this offer. - * @property null|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 null|string $type See financing_type. - */ -class FinancingOffer extends \Stripe\ApiResource -{ - const OBJECT_NAME = 'capital.financing_offer'; - - use \Stripe\ApiOperations\All; - use \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 \Stripe\Exception\ApiErrorException if the request fails - * - * @return \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/Capital/FinancingSummary.php b/lib/Capital/FinancingSummary.php deleted file mode 100644 index dc72b61d6..000000000 --- a/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 \Stripe\SingletonApiResource -{ - const OBJECT_NAME = 'capital.financing_summary'; - - use \Stripe\ApiOperations\SingletonRetrieve; - - const STATUS_ACCEPTED = 'accepted'; - const STATUS_DELIVERED = 'delivered'; - const STATUS_NONE = 'none'; -} diff --git a/lib/Event.php b/lib/Event.php index b86be8dda..d7a8c1538 100644 --- a/lib/Event.php +++ b/lib/Event.php @@ -198,6 +198,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'; diff --git a/lib/InvoiceLineItem.php b/lib/InvoiceLineItem.php index 5a588c895..d70b18b10 100644 --- a/lib/InvoiceLineItem.php +++ b/lib/InvoiceLineItem.php @@ -9,7 +9,6 @@ * @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|\Stripe\StripeObject $applies_to * @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|\Stripe\StripeObject[] $discount_amounts The amount of discount calculated per discount for this line item. diff --git a/lib/PaymentLink.php b/lib/PaymentLink.php index d8a1f3f68..316d5494f 100644 --- a/lib/PaymentLink.php +++ b/lib/PaymentLink.php @@ -14,8 +14,8 @@ * href="https://stripe.com/docs/api/events/types#event_types-checkout.session.completed">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. diff --git a/lib/Product.php b/lib/Product.php index e7f71266a..8ec9ff485 100644 --- a/lib/Product.php +++ b/lib/Product.php @@ -13,9 +13,8 @@ * * Related guides: Set up - * a subscription, share a Payment - * Link, , share a + * Payment Link, accept * payments with Checkout, and more about Products and Prices diff --git a/lib/Quote.php b/lib/Quote.php index f54e65d31..ee8e51710 100644 --- a/lib/Quote.php +++ b/lib/Quote.php @@ -230,6 +230,7 @@ public function markStaleQuote($params = null, $opts = null) /** * @param string $id + * @param string $preview_invoice * @param null|array $params * @param null|array|string $opts * @@ -237,9 +238,9 @@ public function markStaleQuote($params = null, $opts = null) * * @return \Stripe\Collection<\Stripe\InvoiceLineItem> list of InvoiceLineItems */ - public static function previewInvoiceLines($id, $params = null, $opts = null) + public static function previewInvoiceLines($id, $preview_invoice, $params = null, $opts = null) { - $url = static::resourceUrl($id) . '/preview_invoice_lines'; + $url = static::resourceUrl($id) . '/preview_invoices/' . $preview_invoice . '/lines'; list($response, $opts) = static::_staticRequest('get', $url, $params, $opts); $obj = \Stripe\Util\Util::convertToStripeObject($response->json, $opts); $obj->setLastResponse($response); diff --git a/lib/Service/Capital/CapitalServiceFactory.php b/lib/Service/Capital/CapitalServiceFactory.php index a213a3f04..94eae064c 100644 --- a/lib/Service/Capital/CapitalServiceFactory.php +++ b/lib/Service/Capital/CapitalServiceFactory.php @@ -7,8 +7,6 @@ /** * Service factory class for API resources in the Capital namespace. * - * @property FinancingOfferService $financingOffers - * @property FinancingSummaryService $financingSummary * @property FinancingTransactionService $financingTransactions */ class CapitalServiceFactory extends \Stripe\Service\AbstractServiceFactory @@ -17,8 +15,6 @@ class CapitalServiceFactory extends \Stripe\Service\AbstractServiceFactory * @var array */ private static $classMap = [ - 'financingOffers' => FinancingOfferService::class, - 'financingSummary' => FinancingSummaryService::class, 'financingTransactions' => FinancingTransactionService::class, ]; diff --git a/lib/Service/Capital/FinancingOfferService.php b/lib/Service/Capital/FinancingOfferService.php deleted file mode 100644 index f06f1f536..000000000 --- a/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|\Stripe\Util\RequestOptions $opts - * - * @throws \Stripe\Exception\ApiErrorException if the request fails - * - * @return \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|\Stripe\Util\RequestOptions $opts - * - * @throws \Stripe\Exception\ApiErrorException if the request fails - * - * @return \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/Service/Capital/FinancingSummaryService.php b/lib/Service/Capital/FinancingSummaryService.php deleted file mode 100644 index 2b8ac73f5..000000000 --- a/lib/Service/Capital/FinancingSummaryService.php +++ /dev/null @@ -1,24 +0,0 @@ -request('get', '/v1/capital/financing_summary', $params, $opts); - } -} diff --git a/lib/Service/QuoteService.php b/lib/Service/QuoteService.php index f1aa9b333..59e2ff209 100644 --- a/lib/Service/QuoteService.php +++ b/lib/Service/QuoteService.php @@ -177,6 +177,7 @@ public function markStaleQuote($id, $params = null, $opts = null) /** * Preview the invoice line items that would be generated by accepting the quote. * + * @param string $parentId * @param string $id * @param null|array $params * @param null|array|\Stripe\Util\RequestOptions $opts @@ -185,9 +186,9 @@ public function markStaleQuote($id, $params = null, $opts = null) * * @return \Stripe\Collection<\Stripe\InvoiceLineItem> */ - public function previewInvoiceLines($id, $params = null, $opts = null) + public function previewInvoiceLines($parentId, $id, $params = null, $opts = null) { - return $this->requestCollection('get', $this->buildPath('/v1/quotes/%s/preview_invoice_lines', $id), $params, $opts); + return $this->requestCollection('get', $this->buildPath('/v1/quotes/%s/preview_invoices/%s/lines', $parentId, $id), $params, $opts); } /** diff --git a/lib/StripeClient.php b/lib/StripeClient.php index 0acc96e6c..1647ea175 100644 --- a/lib/StripeClient.php +++ b/lib/StripeClient.php @@ -79,11 +79,16 @@ class StripeClient extends BaseStripeClient private $coreServiceFactory; public function __get($name) + { + return $this->getService($name); + } + + public function getService($name) { if (null === $this->coreServiceFactory) { $this->coreServiceFactory = new \Stripe\Service\CoreServiceFactory($this); } - return $this->coreServiceFactory->__get($name); + return $this->coreServiceFactory->getService($name); } } diff --git a/lib/Util/ObjectTypes.php b/lib/Util/ObjectTypes.php index ba403033e..134f11a36 100644 --- a/lib/Util/ObjectTypes.php +++ b/lib/Util/ObjectTypes.php @@ -23,8 +23,6 @@ class ObjectTypes \Stripe\BillingPortal\Configuration::OBJECT_NAME => \Stripe\BillingPortal\Configuration::class, \Stripe\BillingPortal\Session::OBJECT_NAME => \Stripe\BillingPortal\Session::class, \Stripe\Capability::OBJECT_NAME => \Stripe\Capability::class, - \Stripe\Capital\FinancingOffer::OBJECT_NAME => \Stripe\Capital\FinancingOffer::class, - \Stripe\Capital\FinancingSummary::OBJECT_NAME => \Stripe\Capital\FinancingSummary::class, \Stripe\Capital\FinancingTransaction::OBJECT_NAME => \Stripe\Capital\FinancingTransaction::class, \Stripe\Card::OBJECT_NAME => \Stripe\Card::class, \Stripe\CashBalance::OBJECT_NAME => \Stripe\CashBalance::class, From 4391926dabebd9d8b89441e0b1ce2500040c3260 Mon Sep 17 00:00:00 2001 From: Stripe OpenAPI <105521251+stripe-openapi[bot]@users.noreply.github.com> Date: Wed, 15 Mar 2023 21:20:39 +0000 Subject: [PATCH 2/5] Update generated code for v260 --- OPENAPI_VERSION | 2 +- init.php | 4 ++ lib/Capital/FinancingOffer.php | 70 +++++++++++++++++++ lib/Capital/FinancingSummary.php | 25 +++++++ lib/Service/Capital/CapitalServiceFactory.php | 4 ++ lib/Service/Capital/FinancingOfferService.php | 58 +++++++++++++++ .../Capital/FinancingSummaryService.php | 24 +++++++ lib/Util/ObjectTypes.php | 2 + 8 files changed, 188 insertions(+), 1 deletion(-) create mode 100644 lib/Capital/FinancingOffer.php create mode 100644 lib/Capital/FinancingSummary.php create mode 100644 lib/Service/Capital/FinancingOfferService.php create mode 100644 lib/Service/Capital/FinancingSummaryService.php diff --git a/OPENAPI_VERSION b/OPENAPI_VERSION index bd5433530..a1b1e1359 100644 --- a/OPENAPI_VERSION +++ b/OPENAPI_VERSION @@ -1 +1 @@ -v259 \ No newline at end of file +v260 \ No newline at end of file diff --git a/init.php b/init.php index 292424ce8..2659b9109 100644 --- a/init.php +++ b/init.php @@ -91,6 +91,8 @@ require __DIR__ . '/lib/BillingPortal/Configuration.php'; require __DIR__ . '/lib/BillingPortal/Session.php'; require __DIR__ . '/lib/Capability.php'; +require __DIR__ . '/lib/Capital/FinancingOffer.php'; +require __DIR__ . '/lib/Capital/FinancingSummary.php'; require __DIR__ . '/lib/Capital/FinancingTransaction.php'; require __DIR__ . '/lib/Card.php'; require __DIR__ . '/lib/CashBalance.php'; @@ -208,6 +210,8 @@ require __DIR__ . '/lib/Service/BalanceTransactionService.php'; require __DIR__ . '/lib/Service/BillingPortal/ConfigurationService.php'; require __DIR__ . '/lib/Service/BillingPortal/SessionService.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/SessionService.php'; diff --git a/lib/Capital/FinancingOffer.php b/lib/Capital/FinancingOffer.php new file mode 100644 index 000000000..569db7e1e --- /dev/null +++ b/lib/Capital/FinancingOffer.php @@ -0,0 +1,70 @@ +true if the object exists in live mode or the value false if the object exists in test mode. + * @property null|\Stripe\StripeObject $metadata Set of key-value pairs that you can attach to an object. This can be useful for storing additional information about the object in a structured format. + * @property null|\Stripe\StripeObject $offered_terms This is an object representing the terms of an offer of financing from Stripe Capital to a Connected account. This resource represents both the terms offered to the Connected account. + * @property null|string $product_type Financing product identifier. + * @property null|string $replacement The ID of the financing offer that replaced this offer. + * @property null|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 null|string $type See financing_type. + */ +class FinancingOffer extends \Stripe\ApiResource +{ + const OBJECT_NAME = 'capital.financing_offer'; + + use \Stripe\ApiOperations\All; + use \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 \Stripe\Exception\ApiErrorException if the request fails + * + * @return \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/Capital/FinancingSummary.php b/lib/Capital/FinancingSummary.php new file mode 100644 index 000000000..dc72b61d6 --- /dev/null +++ b/lib/Capital/FinancingSummary.php @@ -0,0 +1,25 @@ +/v1/capital/financing_summary will only return details for paid_out financing. + */ +class FinancingSummary extends \Stripe\SingletonApiResource +{ + const OBJECT_NAME = 'capital.financing_summary'; + + use \Stripe\ApiOperations\SingletonRetrieve; + + const STATUS_ACCEPTED = 'accepted'; + const STATUS_DELIVERED = 'delivered'; + const STATUS_NONE = 'none'; +} diff --git a/lib/Service/Capital/CapitalServiceFactory.php b/lib/Service/Capital/CapitalServiceFactory.php index 94eae064c..a213a3f04 100644 --- a/lib/Service/Capital/CapitalServiceFactory.php +++ b/lib/Service/Capital/CapitalServiceFactory.php @@ -7,6 +7,8 @@ /** * Service factory class for API resources in the Capital namespace. * + * @property FinancingOfferService $financingOffers + * @property FinancingSummaryService $financingSummary * @property FinancingTransactionService $financingTransactions */ class CapitalServiceFactory extends \Stripe\Service\AbstractServiceFactory @@ -15,6 +17,8 @@ class CapitalServiceFactory extends \Stripe\Service\AbstractServiceFactory * @var array */ private static $classMap = [ + 'financingOffers' => FinancingOfferService::class, + 'financingSummary' => FinancingSummaryService::class, 'financingTransactions' => FinancingTransactionService::class, ]; diff --git a/lib/Service/Capital/FinancingOfferService.php b/lib/Service/Capital/FinancingOfferService.php new file mode 100644 index 000000000..f06f1f536 --- /dev/null +++ b/lib/Service/Capital/FinancingOfferService.php @@ -0,0 +1,58 @@ + + */ + 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|\Stripe\Util\RequestOptions $opts + * + * @throws \Stripe\Exception\ApiErrorException if the request fails + * + * @return \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|\Stripe\Util\RequestOptions $opts + * + * @throws \Stripe\Exception\ApiErrorException if the request fails + * + * @return \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/Service/Capital/FinancingSummaryService.php b/lib/Service/Capital/FinancingSummaryService.php new file mode 100644 index 000000000..2b8ac73f5 --- /dev/null +++ b/lib/Service/Capital/FinancingSummaryService.php @@ -0,0 +1,24 @@ +request('get', '/v1/capital/financing_summary', $params, $opts); + } +} diff --git a/lib/Util/ObjectTypes.php b/lib/Util/ObjectTypes.php index 134f11a36..ba403033e 100644 --- a/lib/Util/ObjectTypes.php +++ b/lib/Util/ObjectTypes.php @@ -23,6 +23,8 @@ class ObjectTypes \Stripe\BillingPortal\Configuration::OBJECT_NAME => \Stripe\BillingPortal\Configuration::class, \Stripe\BillingPortal\Session::OBJECT_NAME => \Stripe\BillingPortal\Session::class, \Stripe\Capability::OBJECT_NAME => \Stripe\Capability::class, + \Stripe\Capital\FinancingOffer::OBJECT_NAME => \Stripe\Capital\FinancingOffer::class, + \Stripe\Capital\FinancingSummary::OBJECT_NAME => \Stripe\Capital\FinancingSummary::class, \Stripe\Capital\FinancingTransaction::OBJECT_NAME => \Stripe\Capital\FinancingTransaction::class, \Stripe\Card::OBJECT_NAME => \Stripe\Card::class, \Stripe\CashBalance::OBJECT_NAME => \Stripe\CashBalance::class, From 1aba05fb8c267630e1a2f6bf80248ce323633cca Mon Sep 17 00:00:00 2001 From: Stripe OpenAPI <105521251+stripe-openapi[bot]@users.noreply.github.com> Date: Thu, 16 Mar 2023 01:36:09 +0000 Subject: [PATCH 3/5] Update generated code for v261 --- OPENAPI_VERSION | 2 +- lib/BankAccount.php | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/OPENAPI_VERSION b/OPENAPI_VERSION index a1b1e1359..23ee098c2 100644 --- a/OPENAPI_VERSION +++ b/OPENAPI_VERSION @@ -1 +1 @@ -v260 \ No newline at end of file +v261 \ No newline at end of file diff --git a/lib/BankAccount.php b/lib/BankAccount.php index 57fd19be5..5203cdf33 100644 --- a/lib/BankAccount.php +++ b/lib/BankAccount.php @@ -31,8 +31,10 @@ * @property null|string|\Stripe\Customer $customer The ID of the customer that the bank account is associated with. * @property null|bool $default_for_currency Whether this bank account is the default external account for its currency. * @property null|string $fingerprint Uniquely identifies this particular bank account. You can use this attribute to check whether two bank accounts are the same. + * @property null|\Stripe\StripeObject $future_requirements Information about upcoming new requirements for the bank account, including what information needs to be collected. * @property string $last4 The last four digits of the bank account number. * @property null|\Stripe\StripeObject $metadata Set of key-value pairs that you can attach to an object. This can be useful for storing additional information about the object in a structured format. + * @property null|\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 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.

*/ From 07af6c8781463795f3e565d5f84ad5ccf4490826 Mon Sep 17 00:00:00 2001 From: Stripe OpenAPI <105521251+stripe-openapi[bot]@users.noreply.github.com> Date: Thu, 16 Mar 2023 20:08:39 +0000 Subject: [PATCH 4/5] Update generated code for v262 --- OPENAPI_VERSION | 2 +- lib/Service/Tax/TransactionService.php | 15 +++++++++++++++ lib/Tax/Calculation.php | 1 + lib/Tax/Transaction.php | 19 +++++++++++++++++++ 4 files changed, 36 insertions(+), 1 deletion(-) diff --git a/OPENAPI_VERSION b/OPENAPI_VERSION index 23ee098c2..8c736d3f5 100644 --- a/OPENAPI_VERSION +++ b/OPENAPI_VERSION @@ -1 +1 @@ -v261 \ No newline at end of file +v262 \ No newline at end of file diff --git a/lib/Service/Tax/TransactionService.php b/lib/Service/Tax/TransactionService.php index 3148049bd..b4b865fa1 100644 --- a/lib/Service/Tax/TransactionService.php +++ b/lib/Service/Tax/TransactionService.php @@ -37,6 +37,21 @@ public function create($params = null, $opts = null) return $this->request('post', '/v1/tax/transactions', $params, $opts); } + /** + * Creates a Tax Transaction from a calculation. + * + * @param null|array $params + * @param null|array|\Stripe\Util\RequestOptions $opts + * + * @throws \Stripe\Exception\ApiErrorException if the request fails + * + * @return \Stripe\Tax\Transaction + */ + public function createFromCalculation($params = null, $opts = null) + { + return $this->request('post', '/v1/tax/transactions/create_from_calculation', $params, $opts); + } + /** * Partially or fully reverses a previously created Transaction. * diff --git a/lib/Tax/Calculation.php b/lib/Tax/Calculation.php index def80b97a..28155b25d 100644 --- a/lib/Tax/Calculation.php +++ b/lib/Tax/Calculation.php @@ -17,6 +17,7 @@ * @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|\Stripe\Collection<\Stripe\LineItem> $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|\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 int $tax_date Timestamp of date at which the tax rules and rates in effect applies for the calculation. diff --git a/lib/Tax/Transaction.php b/lib/Tax/Transaction.php index f392b316f..536b9197f 100644 --- a/lib/Tax/Transaction.php +++ b/lib/Tax/Transaction.php @@ -19,6 +19,7 @@ * @property null|\Stripe\StripeObject $metadata Set of key-value pairs that you can attach to an object. This can be useful for storing additional information about the object in a structured format. * @property string $reference A custom unique identifier, such as 'myOrder_123'. * @property null|\Stripe\StripeObject $reversal If type=reversal, contains information about what was reversed. + * @property null|\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. */ @@ -32,6 +33,24 @@ class Transaction extends \Stripe\ApiResource const TYPE_REVERSAL = 'reversal'; const TYPE_TRANSACTION = 'transaction'; + /** + * @param null|array $params + * @param null|array|string $opts + * + * @throws \Stripe\Exception\ApiErrorException if the request fails + * + * @return \Stripe\Tax\Transaction the created transaction + */ + public static function createFromCalculation($params = null, $opts = null) + { + $url = static::classUrl() . '/create_from_calculation'; + list($response, $opts) = static::_staticRequest('post', $url, $params, $opts); + $obj = \Stripe\Util\Util::convertToStripeObject($response->json, $opts); + $obj->setLastResponse($response); + + return $obj; + } + /** * @param null|array $params * @param null|array|string $opts From 3ec605d8f82a0be58e51ce92d0f0a972c8d0cd68 Mon Sep 17 00:00:00 2001 From: Stripe OpenAPI <105521251+stripe-openapi[bot]@users.noreply.github.com> Date: Thu, 16 Mar 2023 22:40:01 +0000 Subject: [PATCH 5/5] Update generated code for v264 --- OPENAPI_VERSION | 2 +- lib/Tax/Calculation.php | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/OPENAPI_VERSION b/OPENAPI_VERSION index 8c736d3f5..d077c8303 100644 --- a/OPENAPI_VERSION +++ b/OPENAPI_VERSION @@ -1 +1 @@ -v262 \ No newline at end of file +v264 \ No newline at end of file diff --git a/lib/Tax/Calculation.php b/lib/Tax/Calculation.php index 28155b25d..392be6298 100644 --- a/lib/Tax/Calculation.php +++ b/lib/Tax/Calculation.php @@ -20,8 +20,8 @@ * @property null|\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 \Stripe\StripeObject[] $tax_breakdown Breakdown of individual tax amounts that add up to the total. * @property int $tax_date Timestamp of date at which the tax rules and rates in effect applies for the calculation. - * @property \Stripe\StripeObject[] $tax_summary Summary of individual tax amounts that add up to the total. */ class Calculation extends \Stripe\ApiResource {