Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

API Updates #1346

Merged
merged 1 commit into from
Aug 5, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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