From ef4a71c2f8849175229fc48df4d528e150a37e14 Mon Sep 17 00:00:00 2001 From: Remi Jannel Date: Mon, 29 Jul 2019 22:19:39 -0700 Subject: [PATCH] Move Balance History endpoint to /v1/balance_transactions --- .travis.yml | 3 +-- lib/BalanceTransaction.php | 9 --------- tests/Stripe/BalanceTransactionTest.php | 4 ++-- tests/bootstrap.php | 2 +- 4 files changed, 4 insertions(+), 14 deletions(-) diff --git a/.travis.yml b/.travis.yml index 014729479..80752d966 100644 --- a/.travis.yml +++ b/.travis.yml @@ -41,8 +41,7 @@ matrix: env: global: - - STRIPE_MOCK_VERSION=0.60.0 - + - STRIPE_MOCK_VERSION=0.63.0 cache: directories: - $HOME/.composer/cache/files diff --git a/lib/BalanceTransaction.php b/lib/BalanceTransaction.php index c306ab067..403c4aa17 100644 --- a/lib/BalanceTransaction.php +++ b/lib/BalanceTransaction.php @@ -63,13 +63,4 @@ class BalanceTransaction extends ApiResource const TYPE_TRANSFER_CANCEL = 'transfer_cancel'; const TYPE_TRANSFER_FAILURE = 'transfer_failure'; const TYPE_TRANSFER_REFUND = 'transfer_refund'; - - /** - * @return string The class URL for this resource. It needs to be special - * cased because it doesn't fit into the standard resource pattern. - */ - public static function classUrl() - { - return "/v1/balance/history"; - } } diff --git a/tests/Stripe/BalanceTransactionTest.php b/tests/Stripe/BalanceTransactionTest.php index 8785e8591..ed5be3e1b 100644 --- a/tests/Stripe/BalanceTransactionTest.php +++ b/tests/Stripe/BalanceTransactionTest.php @@ -10,7 +10,7 @@ public function testIsListable() { $this->expectsRequest( 'get', - '/v1/balance/history' + '/v1/balance_transactions' ); $resources = BalanceTransaction::all(); $this->assertTrue(is_array($resources->data)); @@ -21,7 +21,7 @@ public function testIsRetrievable() { $this->expectsRequest( 'get', - '/v1/balance/history/' . self::TEST_RESOURCE_ID + '/v1/balance_transactions/' . self::TEST_RESOURCE_ID ); $resource = BalanceTransaction::retrieve(self::TEST_RESOURCE_ID); $this->assertInstanceOf("Stripe\\BalanceTransaction", $resource); diff --git a/tests/bootstrap.php b/tests/bootstrap.php index 4318bf904..a9aec7fad 100644 --- a/tests/bootstrap.php +++ b/tests/bootstrap.php @@ -2,7 +2,7 @@ require_once(__DIR__ . '/StripeMock.php'); -define("MOCK_MINIMUM_VERSION", "0.60.0"); +define("MOCK_MINIMUM_VERSION", "0.63.0"); if (\Stripe\StripeMock::start()) { register_shutdown_function('\Stripe\StripeMock::stop');