From e4ef61b72ff898fa4520003cc41f0030e99efbd3 Mon Sep 17 00:00:00 2001 From: Stripe OpenAPI <105521251+stripe-openapi[bot]@users.noreply.github.com> Date: Thu, 23 Mar 2023 21:45:48 +0000 Subject: [PATCH] Update generated code for v277 --- OPENAPI_VERSION | 2 +- tests/Stripe/GeneratedExamplesTest.php | 20 ++++++++++++++++++++ 2 files changed, 21 insertions(+), 1 deletion(-) diff --git a/OPENAPI_VERSION b/OPENAPI_VERSION index bf758c50a..ccddf6542 100644 --- a/OPENAPI_VERSION +++ b/OPENAPI_VERSION @@ -1 +1 @@ -v276 \ No newline at end of file +v277 \ No newline at end of file diff --git a/tests/Stripe/GeneratedExamplesTest.php b/tests/Stripe/GeneratedExamplesTest.php index 06101c289..279be6135 100644 --- a/tests/Stripe/GeneratedExamplesTest.php +++ b/tests/Stripe/GeneratedExamplesTest.php @@ -4010,4 +4010,24 @@ public function testUpdateWebhookEndpoint() ); static::assertInstanceOf(\Stripe\WebhookEndpoint::class, $result); } + + public function testCreateFromCalculationTransaction() + { + $this->expectsRequest( + 'post', + '/v1/tax/transactions/create_from_calculation' + ); + $result = $this->client->tax->transactions->createFromCalculation( + ['calculation' => 'xxx', 'reference' => 'yyy'] + ); + static::assertInstanceOf(\Stripe\Tax\Transaction::class, $result); + } + + public function testListLineItemsCalculation() + { + $this->expectsRequest('get', '/v1/tax/calculations/xxx/line_items'); + $result = $this->client->tax->calculations->allLineItems('xxx', []); + static::assertInstanceOf(\Stripe\Collection::class, $result); + static::assertInstanceOf(\Stripe\Tax\CalculationLineItem::class, $result->data[0]); + } }