From b60fc97aad3e5ba2a9a341843e69496d17c4ac76 Mon Sep 17 00:00:00 2001 From: Pavel Krymets Date: Fri, 5 Aug 2022 07:36:47 -0700 Subject: [PATCH] Codegen for openapi v176 --- OPENAPI_VERSION | 2 +- lib/Apps/Secret.php | 1 + tests/Stripe/GeneratedExamplesTest.php | 70 -------------------------- 3 files changed, 2 insertions(+), 71 deletions(-) diff --git a/OPENAPI_VERSION b/OPENAPI_VERSION index 714ead978..3d5e0744c 100644 --- a/OPENAPI_VERSION +++ b/OPENAPI_VERSION @@ -1 +1 @@ -v174 \ No newline at end of file +v176 \ No newline at end of file diff --git a/lib/Apps/Secret.php b/lib/Apps/Secret.php index dfcc36b85..bd0d777f4 100644 --- a/lib/Apps/Secret.php +++ b/lib/Apps/Secret.php @@ -28,6 +28,7 @@ * @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 null|int $expires_at The Unix timestamp for the expiry time of the secret, after which the secret deletes. * @property bool $livemode Has the value true if the object exists in live mode or the value false if the object exists in test mode. * @property string $name A name for the secret that's unique within the scope. * @property null|string $payload The plaintext secret value to be stored. diff --git a/tests/Stripe/GeneratedExamplesTest.php b/tests/Stripe/GeneratedExamplesTest.php index cd78e002c..d457906fb 100644 --- a/tests/Stripe/GeneratedExamplesTest.php +++ b/tests/Stripe/GeneratedExamplesTest.php @@ -228,68 +228,6 @@ public function testUpcomingInvoice() static::assertInstanceOf(\Stripe\Invoice::class, $result); } - public function testCreateOrder() - { - $this->expectsRequest('post', '/v1/orders'); - $result = $this->client->orders->create( - [ - 'description' => 'description', - 'currency' => 'usd', - 'line_items' => [['description' => 'my line item']], - ] - ); - static::assertInstanceOf(\Stripe\Order::class, $result); - } - - public function testRetrieveOrder() - { - $this->expectsRequest('get', '/v1/orders/order_xyz'); - $result = $this->client->orders->retrieve('order_xyz', []); - static::assertInstanceOf(\Stripe\Order::class, $result); - } - - public function testUpdateOrder() - { - $this->expectsRequest('post', '/v1/orders/order_xyz'); - $result = $this->client->orders->update( - 'order_xyz', - ['metadata' => ['reference_number' => '123'], 'ip_address' => '0.0.0.0'] - ); - static::assertInstanceOf(\Stripe\Order::class, $result); - } - - public function testCancelOrder() - { - $this->expectsRequest('post', '/v1/orders/order_xyz/cancel'); - $result = $this->client->orders->cancel('order_xyz', []); - static::assertInstanceOf(\Stripe\Order::class, $result); - } - - public function testListLineItemsOrder() - { - $this->expectsRequest('get', '/v1/orders/order_xyz/line_items'); - $result = $this->client->orders->allLineItems('order_xyz', []); - static::assertInstanceOf(\Stripe\Collection::class, $result); - static::assertInstanceOf(\Stripe\LineItem::class, $result->data[0]); - } - - public function testReopenOrder() - { - $this->expectsRequest('post', '/v1/orders/order_xyz/reopen'); - $result = $this->client->orders->reopen('order_xyz', []); - static::assertInstanceOf(\Stripe\Order::class, $result); - } - - public function testSubmitOrder() - { - $this->expectsRequest('post', '/v1/orders/order_xyz/submit'); - $result = $this->client->orders->submit( - 'order_xyz', - ['expected_total' => 100] - ); - static::assertInstanceOf(\Stripe\Order::class, $result); - } - public function testCreatePaymentIntent() { $this->expectsRequest('post', '/v1/payment_intents'); @@ -2024,14 +1962,6 @@ public function testRetrieveMandate() static::assertInstanceOf(\Stripe\Mandate::class, $result); } - public function testListOrder() - { - $this->expectsRequest('get', '/v1/orders'); - $result = $this->client->orders->all(['limit' => 3]); - static::assertInstanceOf(\Stripe\Collection::class, $result); - static::assertInstanceOf(\Stripe\Order::class, $result->data[0]); - } - public function testListPaymentIntent() { $this->expectsRequest('get', '/v1/payment_intents');