Skip to content

Commit

Permalink
Update generated code for v259
Browse files Browse the repository at this point in the history
  • Loading branch information
stripe-openapi[bot] committed Mar 15, 2023
1 parent 63f7abe commit f1d08ed
Show file tree
Hide file tree
Showing 15 changed files with 18 additions and 199 deletions.
2 changes: 1 addition & 1 deletion OPENAPI_VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
v249
v259
4 changes: 0 additions & 4 deletions init.php
Original file line number Diff line number Diff line change
Expand Up @@ -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';
Expand Down Expand Up @@ -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';
Expand Down
70 changes: 0 additions & 70 deletions lib/Capital/FinancingOffer.php

This file was deleted.

25 changes: 0 additions & 25 deletions lib/Capital/FinancingSummary.php

This file was deleted.

1 change: 1 addition & 0 deletions lib/Event.php
Original file line number Diff line number Diff line change
Expand Up @@ -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';
Expand Down
1 change: 0 additions & 1 deletion lib/InvoiceLineItem.php
Original file line number Diff line number Diff line change
Expand Up @@ -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 <a href="https://www.iso.org/iso-4217-currency-codes.html">ISO currency code</a>, in lowercase. Must be a <a href="https://stripe.com/docs/currencies">supported currency</a>.
* @property null|string $description An arbitrary string attached to the object. Often useful for displaying to users.
* @property null|\Stripe\StripeObject[] $discount_amounts The amount of discount calculated per discount for this line item.
Expand Down
4 changes: 2 additions & 2 deletions lib/PaymentLink.php
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,8 @@
* href="https://stripe.com/docs/api/events/types#event_types-checkout.session.completed">checkout
* session events</a> to track payments through payment links.
*
* Related guide: <a
* href="https://stripe.com/docs/payments/payment-links/api">Payment Links API</a>
* Related guide: <a href="https://stripe.com/docs/payment-links">Payment Links
* API</a>
*
* @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.
Expand Down
5 changes: 2 additions & 3 deletions lib/Product.php
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,8 @@
*
* Related guides: <a
* href="https://stripe.com/docs/billing/subscriptions/set-up-subscription">Set up
* a subscription</a>, <a
* href="https://stripe.com/docs/payments/payment-links/overview">share a Payment
* Link</a>, <a
* a subscription</a>, <a href="https://stripe.com/docs/payment-links">share a
* Payment Link</a>, <a
* href="https://stripe.com/docs/payments/accept-a-payment#create-product-prices-upfront">accept
* payments with Checkout</a>, and more about <a
* href="https://stripe.com/docs/products-prices/overview">Products and Prices</a>
Expand Down
5 changes: 3 additions & 2 deletions lib/Quote.php
Original file line number Diff line number Diff line change
Expand Up @@ -230,16 +230,17 @@ public function markStaleQuote($params = null, $opts = null)

/**
* @param string $id
* @param string $preview_invoice
* @param null|array $params
* @param null|array|string $opts
*
* @throws \Stripe\Exception\ApiErrorException if the request fails
*
* @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);
Expand Down
4 changes: 0 additions & 4 deletions lib/Service/Capital/CapitalServiceFactory.php
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -17,8 +15,6 @@ class CapitalServiceFactory extends \Stripe\Service\AbstractServiceFactory
* @var array<string, string>
*/
private static $classMap = [
'financingOffers' => FinancingOfferService::class,
'financingSummary' => FinancingSummaryService::class,
'financingTransactions' => FinancingTransactionService::class,
];

Expand Down
58 changes: 0 additions & 58 deletions lib/Service/Capital/FinancingOfferService.php

This file was deleted.

24 changes: 0 additions & 24 deletions lib/Service/Capital/FinancingSummaryService.php

This file was deleted.

5 changes: 3 additions & 2 deletions lib/Service/QuoteService.php
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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);
}

/**
Expand Down
7 changes: 6 additions & 1 deletion lib/StripeClient.php
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}
}
2 changes: 0 additions & 2 deletions lib/Util/ObjectTypes.php
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down

0 comments on commit f1d08ed

Please sign in to comment.