Skip to content

Commit

Permalink
Update generated code (#1737)
Browse files Browse the repository at this point in the history
* Update generated code for v1232

* Update generated code for v1233

* Update generated code for v1235

* Update generated code for v1238

* Update generated code for v1243

* Update generated code for v1244

* Update generated code for v1246

* Update generated code for v1252

* Update generated code for v1255

* Update generated code for v1260

---------

Co-authored-by: Stripe OpenAPI <105521251+stripe-openapi[bot]@users.noreply.github.com>
  • Loading branch information
stripe-openapi[bot] authored Sep 12, 2024
1 parent 5ed133f commit 2bb84be
Show file tree
Hide file tree
Showing 12 changed files with 194 additions and 7 deletions.
2 changes: 1 addition & 1 deletion OPENAPI_VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
v1230
v1260
2 changes: 2 additions & 0 deletions init.php
Original file line number Diff line number Diff line change
Expand Up @@ -140,6 +140,7 @@
require __DIR__ . '/lib/Invoice.php';
require __DIR__ . '/lib/InvoiceItem.php';
require __DIR__ . '/lib/InvoiceLineItem.php';
require __DIR__ . '/lib/InvoiceRenderingTemplate.php';
require __DIR__ . '/lib/Issuing/Authorization.php';
require __DIR__ . '/lib/Issuing/Card.php';
require __DIR__ . '/lib/Issuing/Cardholder.php';
Expand Down Expand Up @@ -222,6 +223,7 @@
require __DIR__ . '/lib/Service/Identity/VerificationReportService.php';
require __DIR__ . '/lib/Service/Identity/VerificationSessionService.php';
require __DIR__ . '/lib/Service/InvoiceItemService.php';
require __DIR__ . '/lib/Service/InvoiceRenderingTemplateService.php';
require __DIR__ . '/lib/Service/InvoiceService.php';
require __DIR__ . '/lib/Service/Issuing/AuthorizationService.php';
require __DIR__ . '/lib/Service/Issuing/CardService.php';
Expand Down
2 changes: 1 addition & 1 deletion lib/Checkout/Session.php
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@
* @property string $payment_status The payment status of the Checkout Session, one of <code>paid</code>, <code>unpaid</code>, or <code>no_payment_required</code>. You can use this value to decide when to fulfill your customer's order.
* @property null|\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 This parameter applies to <code>ui_mode: embedded</code>. Learn more about the <a href="https://stripe.com/docs/payments/checkout/custom-redirect-behavior">redirect behavior</a> of embedded sessions. Defaults to <code>always</code>.
* @property null|string $redirect_on_completion This parameter applies to <code>ui_mode: embedded</code>. Learn more about the <a href="https://stripe.com/docs/payments/checkout/custom-success-page?payment-ui=embedded-form">redirect behavior</a> of embedded sessions. Defaults to <code>always</code>.
* @property null|string $return_url Applies to Checkout Sessions with <code>ui_mode: embedded</code>. 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|\Stripe\StripeObject $saved_payment_method_options Controls saved payment method settings for the session. Only available in <code>payment</code> and <code>subscription</code> mode.
* @property null|string|\Stripe\SetupIntent $setup_intent The ID of the SetupIntent for Checkout Sessions in <code>setup</code> mode. You can't confirm or cancel the SetupIntent for a Checkout Session. To cancel, <a href="https://stripe.com/docs/api/checkout/sessions/expire">expire the Checkout Session</a> instead.
Expand Down
4 changes: 2 additions & 2 deletions lib/InvoiceLineItem.php
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,8 @@
* @property null|int $quantity The quantity of the subscription, if the line item is a subscription or a proration.
* @property null|string|\Stripe\Subscription $subscription The subscription that the invoice item pertains to, if any.
* @property null|string|\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|\Stripe\StripeObject[] $tax_amounts The amount of tax calculated per tax rate for this line item
* @property null|\Stripe\TaxRate[] $tax_rates The tax rates which apply to the line item.
* @property \Stripe\StripeObject[] $tax_amounts The amount of tax calculated per tax rate for this line item
* @property \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 <code>invoiceitem</code> or a <code>subscription</code>.
* @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.
*/
Expand Down
96 changes: 96 additions & 0 deletions lib/InvoiceRenderingTemplate.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,96 @@
<?php

// File generated from our OpenAPI spec

namespace 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 int $created Time at which the object was created. Measured in seconds since the Unix epoch.
* @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.
* @property null|\Stripe\StripeObject $metadata Set of <a href="https://stripe.com/docs/api/metadata">key-value pairs</a> 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 template, hidden from customers
* @property string $status The status of the template, one of <code>active</code> or <code>archived</code>.
* @property int $version Version of this template; version increases by one when an update on the template changes any field that controls invoice rendering
*/
class InvoiceRenderingTemplate extends ApiResource
{
const OBJECT_NAME = 'invoice_rendering_template';

const STATUS_ACTIVE = 'active';
const STATUS_ARCHIVED = 'archived';

/**
* List all templates, ordered by creation date, with the most recently created
* template appearing first.
*
* @param null|array $params
* @param null|array|string $opts
*
* @throws \Stripe\Exception\ApiErrorException if the request fails
*
* @return \Stripe\Collection<\Stripe\InvoiceRenderingTemplate> of ApiResources
*/
public static function all($params = null, $opts = null)
{
$url = static::classUrl();

return static::_requestPage($url, \Stripe\Collection::class, $params, $opts);
}

/**
* Retrieves an invoice rendering template with the given ID. It by default returns
* the latest version of the template. Optionally, specify a version to see
* previous versions.
*
* @param array|string $id the ID of the API resource to retrieve, or an options array containing an `id` key
* @param null|array|string $opts
*
* @throws \Stripe\Exception\ApiErrorException if the request fails
*
* @return \Stripe\InvoiceRenderingTemplate
*/
public static function retrieve($id, $opts = null)
{
$opts = \Stripe\Util\RequestOptions::parse($opts);
$instance = new static($id, $opts);
$instance->refresh();

return $instance;
}

/**
* @param null|array $params
* @param null|array|string $opts
*
* @throws \Stripe\Exception\ApiErrorException if the request fails
*
* @return \Stripe\InvoiceRenderingTemplate the archived invoice rendering template
*/
public function archive($params = null, $opts = null)
{
$url = $this->instanceUrl() . '/archive';
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 \Stripe\Exception\ApiErrorException if the request fails
*
* @return \Stripe\InvoiceRenderingTemplate the unarchived invoice rendering template
*/
public function unarchive($params = null, $opts = null)
{
$url = $this->instanceUrl() . '/unarchive';
list($response, $opts) = $this->_request('post', $url, $params, $opts);
$this->refreshFrom($response, $opts);

return $this;
}
}
2 changes: 2 additions & 0 deletions lib/Service/CoreServiceFactory.php
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@
* @property Forwarding\ForwardingServiceFactory $forwarding
* @property Identity\IdentityServiceFactory $identity
* @property InvoiceItemService $invoiceItems
* @property InvoiceRenderingTemplateService $invoiceRenderingTemplates
* @property InvoiceService $invoices
* @property Issuing\IssuingServiceFactory $issuing
* @property MandateService $mandates
Expand Down Expand Up @@ -114,6 +115,7 @@ class CoreServiceFactory extends \Stripe\Service\AbstractServiceFactory
'forwarding' => Forwarding\ForwardingServiceFactory::class,
'identity' => Identity\IdentityServiceFactory::class,
'invoiceItems' => InvoiceItemService::class,
'invoiceRenderingTemplates' => InvoiceRenderingTemplateService::class,
'invoices' => InvoiceService::class,
'issuing' => Issuing\IssuingServiceFactory::class,
'mandates' => MandateService::class,
Expand Down
82 changes: 82 additions & 0 deletions lib/Service/InvoiceRenderingTemplateService.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,82 @@
<?php

// File generated from our OpenAPI spec

namespace Stripe\Service;

/**
* @phpstan-import-type RequestOptionsArray from \Stripe\Util\RequestOptions
* @psalm-import-type RequestOptionsArray from \Stripe\Util\RequestOptions
*/
class InvoiceRenderingTemplateService extends \Stripe\Service\AbstractService
{
/**
* List all templates, ordered by creation date, with the most recently created
* template appearing first.
*
* @param null|array $params
* @param null|RequestOptionsArray|\Stripe\Util\RequestOptions $opts
*
* @throws \Stripe\Exception\ApiErrorException if the request fails
*
* @return \Stripe\Collection<\Stripe\InvoiceRenderingTemplate>
*/
public function all($params = null, $opts = null)
{
return $this->requestCollection('get', '/v1/invoice_rendering_templates', $params, $opts);
}

/**
* Updates the status of an invoice rendering template to ‘archived’ so no new
* Stripe objects (customers, invoices, etc.) can reference it. The template can
* also no longer be updated. However, if the template is already set on a Stripe
* object, it will continue to be applied on invoices generated by it.
*
* @param string $id
* @param null|array $params
* @param null|RequestOptionsArray|\Stripe\Util\RequestOptions $opts
*
* @throws \Stripe\Exception\ApiErrorException if the request fails
*
* @return \Stripe\InvoiceRenderingTemplate
*/
public function archive($id, $params = null, $opts = null)
{
return $this->request('post', $this->buildPath('/v1/invoice_rendering_templates/%s/archive', $id), $params, $opts);
}

/**
* Retrieves an invoice rendering template with the given ID. It by default returns
* the latest version of the template. Optionally, specify a version to see
* previous versions.
*
* @param string $id
* @param null|array $params
* @param null|RequestOptionsArray|\Stripe\Util\RequestOptions $opts
*
* @throws \Stripe\Exception\ApiErrorException if the request fails
*
* @return \Stripe\InvoiceRenderingTemplate
*/
public function retrieve($id, $params = null, $opts = null)
{
return $this->request('get', $this->buildPath('/v1/invoice_rendering_templates/%s', $id), $params, $opts);
}

/**
* Unarchive an invoice rendering template so it can be used on new Stripe objects
* again.
*
* @param string $id
* @param null|array $params
* @param null|RequestOptionsArray|\Stripe\Util\RequestOptions $opts
*
* @throws \Stripe\Exception\ApiErrorException if the request fails
*
* @return \Stripe\InvoiceRenderingTemplate
*/
public function unarchive($id, $params = null, $opts = null)
{
return $this->request('post', $this->buildPath('/v1/invoice_rendering_templates/%s/unarchive', $id), $params, $opts);
}
}
5 changes: 4 additions & 1 deletion lib/Service/PaymentIntentService.php
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,10 @@ public function capture($id, $params = null, $opts = null)
* If any actions are required for the payment, the PaymentIntent will return to
* the <code>requires_confirmation</code> state after those actions are completed.
* Your server needs to then explicitly re-confirm the PaymentIntent to initiate
* the next payment attempt.
* the next payment attempt. There is a variable upper limit on how many times a
* PaymentIntent can be confirmed. After this limit is reached, any further calls
* to this endpoint will transition the PaymentIntent to the <code>canceled</code>
* state.
*
* @param string $id
* @param null|array $params
Expand Down
1 change: 1 addition & 0 deletions lib/StripeClient.php
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@
* @property \Stripe\Service\Forwarding\ForwardingServiceFactory $forwarding
* @property \Stripe\Service\Identity\IdentityServiceFactory $identity
* @property \Stripe\Service\InvoiceItemService $invoiceItems
* @property \Stripe\Service\InvoiceRenderingTemplateService $invoiceRenderingTemplates
* @property \Stripe\Service\InvoiceService $invoices
* @property \Stripe\Service\Issuing\IssuingServiceFactory $issuing
* @property \Stripe\Service\MandateService $mandates
Expand Down
2 changes: 1 addition & 1 deletion lib/TestHelpers/TestClock.php
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
* @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.
* @property null|string $name The custom name supplied at creation.
* @property string $status The status of the Test Clock.
* @property null|\Stripe\StripeObject $status_details
* @property \Stripe\StripeObject $status_details
*/
class TestClock extends \Stripe\ApiResource
{
Expand Down
2 changes: 1 addition & 1 deletion lib/Transfer.php
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@
* @property \Stripe\StripeObject $metadata Set of <a href="https://stripe.com/docs/api/metadata">key-value pairs</a> that you can attach to an object. This can be useful for storing additional information about the object in a structured format.
* @property \Stripe\Collection<\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|\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 null|string|\Stripe\Charge $source_transaction ID of the charge that was used to fund the transfer. If null, the transfer was funded from the available balance.
* @property null|string $source_type The source balance this transfer came from. One of <code>card</code>, <code>fpx</code>, or <code>bank_account</code>.
* @property null|string $transfer_group A string that identifies this transaction as part of a group. See the <a href="https://stripe.com/docs/connect/separate-charges-and-transfers#transfer-options">Connect documentation</a> for details.
*/
Expand Down
1 change: 1 addition & 0 deletions lib/Util/ObjectTypes.php
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,7 @@ class ObjectTypes
\Stripe\Invoice::OBJECT_NAME => \Stripe\Invoice::class,
\Stripe\InvoiceItem::OBJECT_NAME => \Stripe\InvoiceItem::class,
\Stripe\InvoiceLineItem::OBJECT_NAME => \Stripe\InvoiceLineItem::class,
\Stripe\InvoiceRenderingTemplate::OBJECT_NAME => \Stripe\InvoiceRenderingTemplate::class,
\Stripe\Issuing\Authorization::OBJECT_NAME => \Stripe\Issuing\Authorization::class,
\Stripe\Issuing\Card::OBJECT_NAME => \Stripe\Issuing\Card::class,
\Stripe\Issuing\Cardholder::OBJECT_NAME => \Stripe\Issuing\Cardholder::class,
Expand Down

0 comments on commit 2bb84be

Please sign in to comment.