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

Add support for listing source_transactions #385

Merged
merged 1 commit into from
Oct 27, 2017

Conversation

ob-stripe
Copy link
Contributor

r? @brandur-stripe
cc @stripe/api-libraries @stan-stripe

Adds support for the /v1/sources/src_.../source_transactions endpoint.

lib/Source.php Outdated
$url = $this->instanceUrl() . '/source_transactions';
list($response, $opts) = $this->_request('get', $url, $params, $options);
$this->refreshFrom($response, $opts);
return $this;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is this supposed to mutate the source object?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Oops! Absolutely not -- this endpoint returns a collection of source_transaction objects, not the source object itself. This is now fixed.

@brandur-stripe
Copy link
Contributor

Nice OB! Left a comment on here. Can you also take a look at the test suite?

...............................................................  63 / 194 ( 32%)
............................................................... 126 / 194 ( 64%)
.......................F....................................... 189 / 194 ( 97%)
.....
Time: 3.18 minutes, Memory: 36.67MB
There was 1 failure:
1) Stripe\SourceTest::testVerify
Failed asserting that two strings are identical.
--- Expected
+++ Actual
@@ @@
-pending
+succeeded
/home/travis/build/stripe/stripe-php/tests/SourceTest.php:210

@ob-stripe ob-stripe force-pushed the ob-source-transactions branch 2 times, most recently from f30cd47 to f4edc46 Compare October 26, 2017 15:24
@ob-stripe
Copy link
Contributor Author

I broke a few things after rebasing, but tests should be passing now!

@brandur-stripe
Copy link
Contributor

Thanks for the quick fixes!

@brandur-stripe brandur-stripe merged commit b0d03d3 into master Oct 27, 2017
@brandur-stripe brandur-stripe deleted the ob-source-transactions branch October 27, 2017 16:17
@brandur-stripe
Copy link
Contributor

Released as 5.5.0.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants