From 6713cc7a39b0eb1c2bc4a6f9ad99e478ad607067 Mon Sep 17 00:00:00 2001 From: Richard Marmorstein Date: Mon, 11 Oct 2021 11:56:41 -0400 Subject: [PATCH 1/2] Codegen for openapi ef061d9 --- lib/PaymentMethod.php | 1 + tests/Stripe/GeneratedExamplesTest.php | 11 ----------- 2 files changed, 1 insertion(+), 11 deletions(-) diff --git a/lib/PaymentMethod.php b/lib/PaymentMethod.php index 36a01d3b3..b4ecd0556 100644 --- a/lib/PaymentMethod.php +++ b/lib/PaymentMethod.php @@ -36,6 +36,7 @@ * @property \Stripe\StripeObject $grabpay * @property \Stripe\StripeObject $ideal * @property \Stripe\StripeObject $interac_present + * @property \Stripe\StripeObject $klarna * @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 null|\Stripe\StripeObject $metadata Set of key-value pairs that you can attach to an object. This can be useful for storing additional information about the object in a structured format. * @property \Stripe\StripeObject $oxxo diff --git a/tests/Stripe/GeneratedExamplesTest.php b/tests/Stripe/GeneratedExamplesTest.php index 22c291cf6..afff1d1c5 100644 --- a/tests/Stripe/GeneratedExamplesTest.php +++ b/tests/Stripe/GeneratedExamplesTest.php @@ -2491,15 +2491,4 @@ public function testDeleteWebhookEndpoint() $result = $this->client->webhookEndpoints->delete('we_xxxxxxxxxxxxx', []); static::assertInstanceOf(\Stripe\WebhookEndpoint::class, $result); } - - public function testListPaymentMethodsCustomer() - { - $this->expectsRequest('get', '/v1/customers/cus_xyz/payment_methods'); - $result = $this->client->customers->allPaymentMethods( - 'cus_xyz', - ['type' => 'card'] - ); - static::assertInstanceOf(\Stripe\Collection::class, $result); - static::assertInstanceOf(\Stripe\PaymentMethod::class, $result->data[0]); - } } From 509f285e0927bf32e952b7388aee25ca22456746 Mon Sep 17 00:00:00 2001 From: Richard Marmorstein Date: Mon, 11 Oct 2021 12:00:40 -0400 Subject: [PATCH 2/2] Revert test change --- tests/Stripe/GeneratedExamplesTest.php | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/tests/Stripe/GeneratedExamplesTest.php b/tests/Stripe/GeneratedExamplesTest.php index afff1d1c5..22c291cf6 100644 --- a/tests/Stripe/GeneratedExamplesTest.php +++ b/tests/Stripe/GeneratedExamplesTest.php @@ -2491,4 +2491,15 @@ public function testDeleteWebhookEndpoint() $result = $this->client->webhookEndpoints->delete('we_xxxxxxxxxxxxx', []); static::assertInstanceOf(\Stripe\WebhookEndpoint::class, $result); } + + public function testListPaymentMethodsCustomer() + { + $this->expectsRequest('get', '/v1/customers/cus_xyz/payment_methods'); + $result = $this->client->customers->allPaymentMethods( + 'cus_xyz', + ['type' => 'card'] + ); + static::assertInstanceOf(\Stripe\Collection::class, $result); + static::assertInstanceOf(\Stripe\PaymentMethod::class, $result->data[0]); + } }