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 #1512

Merged
merged 6 commits into from
Jun 13, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion OPENAPI_VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
v376
v385
2 changes: 1 addition & 1 deletion lib/Checkout/Session.php
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@
* @property null|string $status The status of the Checkout Session, one of <code>open</code>, <code>complete</code>, or <code>expired</code>.
* @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. <code>submit_type</code> can only be specified on Checkout Sessions in <code>payment</code> mode, but not Checkout Sessions in <code>subscription</code> or <code>setup</code> mode.
* @property null|string|\Stripe\Subscription $subscription The ID of the subscription for Checkout Sessions in <code>subscription</code> mode.
* @property string $success_url The URL the customer will be directed to after the payment or subscription creation is successful.
* @property null|string $success_url The URL the customer will be directed to after the payment or subscription creation is successful.
* @property null|\Stripe\StripeObject $tax_id_collection
* @property null|\Stripe\StripeObject $total_details Tax and discount details for the computed total amount.
* @property null|string $url The URL to the Checkout Session. Redirect customers to this URL to take them to Checkout. If you’re using <a href="https://stripe.com/docs/payments/checkout/custom-domains">Custom Domains</a>, the URL will use your subdomain. Otherwise, it’ll use <code>checkout.stripe.com.</code> This value is only present when the session is active.
Expand Down
4 changes: 2 additions & 2 deletions lib/Invoice.php
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
* If your invoice is configured to be billed through automatic charges,
* Stripe automatically finalizes your invoice and attempts payment. Note
* that finalizing the invoice,
* <a href="https://stripe.com/docs/billing/invoices/workflow/#auto_advance">when automatic</a>, does
* <a href="https://stripe.com/docs/invoicing/integration/automatic-advancement-collection">when automatic</a>, does
* not happen immediately as the invoice is created. 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
Expand Down Expand Up @@ -51,7 +51,7 @@
* @property null|int $application_fee_amount The fee in %s that will be applied to the invoice and transferred to the application owner's 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 <code>invoice.created</code> webhook, for example, so you might not want to display that invoice as unpaid to your users.
* @property null|bool $auto_advance Controls whether Stripe will perform <a href="https://stripe.com/docs/billing/invoices/workflow/#auto_advance">automatic collection</a> of the invoice. When <code>false</code>, the invoice's state will not automatically advance without an explicit action.
* @property null|bool $auto_advance Controls whether Stripe performs <a href="https://stripe.com/docs/invoicing/integration/automatic-advancement-collection">automatic collection</a> of the invoice. If <code>false</code>, the invoice's state doesn't automatically advance without an explicit action.
* @property \Stripe\StripeObject $automatic_tax
* @property null|string $billing_reason Indicates the reason why the invoice was created. <code>subscription_cycle</code> indicates an invoice created by a subscription advancing into a new period. <code>subscription_create</code> indicates an invoice created due to creating a subscription. <code>subscription_update</code> indicates an invoice created due to updating a subscription. <code>subscription</code> is set for all old invoices to indicate either a change to a subscription or a period advancement. <code>manual</code> is set for all invoices unrelated to a subscription (for example: created via the invoice editor). The <code>upcoming</code> value is reserved for simulated invoices per the upcoming invoice endpoint. <code>subscription_threshold</code> indicates an invoice created due to a billing threshold being reached.
* @property null|string|\Stripe\Charge $charge ID of the latest charge generated for this invoice, if any.
Expand Down
4 changes: 2 additions & 2 deletions lib/Service/Issuing/AuthorizationService.php
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ public function all($params = null, $opts = null)
* href="/docs/issuing/controls/real-time-authorizations">real-time
* authorization</a> flow. You can also respond directly to the webhook request to
* approve an authorization (preferred). More details can be found <a
* href="https://site-admin.stripe.com/docs/issuing/controls/real-time-authorizations#authorization-handling">here</a>.
* href="/docs/issuing/controls/real-time-authorizations#authorization-handling">here</a>.
*
* @param string $id
* @param null|array $params
Expand All @@ -50,7 +50,7 @@ public function approve($id, $params = null, $opts = null)
* href="/docs/issuing/controls/real-time-authorizations">real time
* authorization</a> flow. You can also respond directly to the webhook request to
* decline an authorization (preferred). More details can be found <a
* href="https://site-admin.stripe.com/docs/issuing/controls/real-time-authorizations#authorization-handling">here</a>.
* href="/docs/issuing/controls/real-time-authorizations#authorization-handling">here</a>.
*
* @param string $id
* @param null|array $params
Expand Down
5 changes: 3 additions & 2 deletions lib/Service/PaymentIntentService.php
Original file line number Diff line number Diff line change
Expand Up @@ -94,8 +94,9 @@ public function capture($id, $params = null, $opts = null)
* If the selected payment method requires additional authentication steps, the
* PaymentIntent will transition to the <code>requires_action</code> status and
* suggest additional actions via <code>next_action</code>. If payment fails, the
* PaymentIntent will transition to the <code>requires_payment_method</code>
* status. If payment succeeds, the PaymentIntent will transition to the
* PaymentIntent transitions to the <code>requires_payment_method</code> status or
* the <code>canceled</code> status if the confirmation limit is reached. If
* payment succeeds, the PaymentIntent will transition to the
* <code>succeeded</code> status (or <code>requires_capture</code>, if
* <code>capture_method</code> is set to <code>manual</code>). If the
* <code>confirmation_method</code> is <code>automatic</code>, payment may be
Expand Down
3 changes: 2 additions & 1 deletion lib/Service/SetupIntentService.php
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,8 @@ public function cancel($id, $params = null, $opts = null)
*
* Otherwise, it will transition to the <code>requires_action</code> status and
* suggest additional actions via <code>next_action</code>. If setup fails, the
* SetupIntent will transition to the <code>requires_payment_method</code> status.
* SetupIntent will transition to the <code>requires_payment_method</code> status
* or the <code>canceled</code> status if the confirmation limit is reached.
*
* @param string $id
* @param null|array $params
Expand Down
11 changes: 11 additions & 0 deletions tests/Stripe/GeneratedExamplesTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -4082,4 +4082,15 @@ public function testCreateCalculation()
]);
static::assertInstanceOf(\Stripe\Tax\Calculation::class, $result);
}

public function testPreviewLinesCreditNote()
{
$this->expectsRequest('get', '/v1/credit_notes/preview/lines');
$result = $this->client->creditNotes->previewLines([
'limit' => 3,
'invoice' => 'in_xxxxxxxxxxxxx',
]);
static::assertInstanceOf(\Stripe\Collection::class, $result);
static::assertInstanceOf(\Stripe\CreditNoteLineItem::class, $result->data[0]);
}
}