Skip to content

Commit

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

* Update generated code for v309

* Update generated code for v311

* Update generated code for v313

---------

Co-authored-by: Stripe OpenAPI <105521251+stripe-openapi[bot]@users.noreply.github.com>
  • Loading branch information
stripe-openapi[bot] committed Apr 27, 2023
1 parent ca6e69d commit 5a4acd3
Show file tree
Hide file tree
Showing 5 changed files with 20 additions and 6 deletions.
2 changes: 1 addition & 1 deletion OPENAPI_VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
v301
v313
6 changes: 3 additions & 3 deletions lib/InvoiceLineItem.php
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
* @property null|\Stripe\StripeObject[] $discount_amounts The amount of discount calculated per discount for this line item.
* @property bool $discountable If true, discounts will apply to this line item. Always false for prorations.
* @property null|(string|\Stripe\Discount)[] $discounts The discounts applied to the invoice line item. Line item discounts are applied before invoice discounts. Use <code>expand[]=discounts</code> to expand each discount.
* @property null|string $invoice_item The ID of the <a href="https://stripe.com/docs/api/invoiceitems">invoice item</a> associated with this line item if any.
* @property null|string|\Stripe\InvoiceItem $invoice_item The ID of the <a href="https://stripe.com/docs/api/invoiceitems">invoice item</a> associated with this line item if any.
* @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 \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. Note that for line items with <code>type=subscription</code> this will reflect the metadata of the subscription that caused the line item to be created.
* @property \Stripe\StripeObject $period
Expand All @@ -23,8 +23,8 @@
* @property bool $proration Whether this is a proration.
* @property null|\Stripe\StripeObject $proration_details Additional details for proration line items
* @property null|int $quantity The quantity of the subscription, if the line item is a subscription or a proration.
* @property null|string $subscription The subscription that the invoice item pertains to, if any.
* @property null|string $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|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 string $type A string identifying the type of the source of this line item, either an <code>invoiceitem</code> or a <code>subscription</code>.
Expand Down
2 changes: 1 addition & 1 deletion lib/Service/PaymentIntentService.php
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ public function applyCustomerBalance($id, $params = null, $opts = null)
*
* Once canceled, no additional charges will be made by the PaymentIntent and any
* operations on the PaymentIntent will fail with an error. For PaymentIntents with
* <code>status=’requires_capture</code>, the remaining
* a <code>status</code> of <code>requires_capture</code>, the remaining
* <code>amount_capturable</code> will automatically be refunded.
*
* You cannot cancel the PaymentIntent for a Checkout Session. <a
Expand Down
2 changes: 1 addition & 1 deletion lib/TaxRate.php
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
* @property null|string $jurisdiction The jurisdiction for the tax rate. You can use this label field for tax reporting purposes. It also appears on your customer’s invoice.
* @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 float $percentage This represents the tax rate percent out of 100.
* @property float $percentage Tax rate percentage out of 100. For tax calculations with automatic_tax[enabled]=true, this percentage includes the statutory tax rate of non-taxable jurisdictions.
* @property null|string $state <a href="https://en.wikipedia.org/wiki/ISO_3166-2:US">ISO 3166-2 subdivision code</a>, without country prefix. For example, &quot;NY&quot; for New York, United States.
* @property null|string $tax_type The high-level tax type, such as <code>vat</code> or <code>sales_tax</code>.
*/
Expand Down
14 changes: 14 additions & 0 deletions tests/Stripe/GeneratedExamplesTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -2291,6 +2291,20 @@ public function testCreatePlan()
static::assertInstanceOf(\Stripe\Plan::class, $result);
}

public function testCreatePlan2()
{
$this->expectsRequest('post', '/v1/plans');
$result = $this->client->plans->create(
[
'amount' => 2000,
'currency' => 'usd',
'interval' => 'month',
'product' => ['name' => 'My product'],
]
);
static::assertInstanceOf(\Stripe\Plan::class, $result);
}

public function testDeletePlan()
{
$this->expectsRequest('delete', '/v1/plans/price_xxxxxxxxxxxxx');
Expand Down

0 comments on commit 5a4acd3

Please sign in to comment.