Skip to content

Commit

Permalink
Codegen for openapi v176
Browse files Browse the repository at this point in the history
  • Loading branch information
pakrym-stripe committed Aug 5, 2022
1 parent e405c17 commit b60fc97
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 71 deletions.
2 changes: 1 addition & 1 deletion OPENAPI_VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
v174
v176
1 change: 1 addition & 0 deletions lib/Apps/Secret.php
Original file line number Diff line number Diff line change
Expand Up @@ -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 <code>true</code> if the object exists in live mode or the value <code>false</code> 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.
Expand Down
70 changes: 0 additions & 70 deletions tests/Stripe/GeneratedExamplesTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -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');
Expand Down Expand Up @@ -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');
Expand Down

0 comments on commit b60fc97

Please sign in to comment.