-
Notifications
You must be signed in to change notification settings - Fork 850
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 exchange_rates API requests #386
Conversation
I hate to ask, but mind bumping this one so |
8045b3c
to
77ffb5b
Compare
Done, ptal @brandur-stripe |
tests/ExchangeRateTest.php
Outdated
array(), | ||
array( | ||
'id' => 'usd', | ||
'object' => 'exchange_rates', |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe switch this over to exchange_rate
(and there are three other instances below to replace in this file as well).
Minor comment, but otherwise looks good. Thanks OB! ptal @ob-stripe |
77ffb5b
to
79fbdbd
Compare
Oops! Should be fixed now. |
|
||
$currency = "usd"; | ||
$rates = ExchangeRate::retrieve($currency); | ||
$this->assertEquals('exchange_rate', $rates->object); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I really wish we could do $this->assertInstanceOf(ExchangeRate::class, $rates);
here instead, but unfortunately that doesn't fly with PHP <= 5.4 😢
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ugh ...
Well, it's worth noting that 5.4 has been EOLed for more than two years (since mid-2015) and hasn't even been receiving security fixes for more than a year, which means that it's not safe to use. This approach works fine for now, but it's totally plausible to drop support for it at this point. (If you're not updating off of PHP 5.4, you're also probably not bothering to update your version of stripe-php.)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actually, I misread that. It's 5.5 has been EOLed for two years and hasn't been receiving updates for a year.
5.4 has been EOLed for three years (mid-2014) and hasn't been receiving updates for two years!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
http://php.net/supported-versions.php
Version specific notes
PHP 5.6
As it is the final PHP 5 release, support for PHP 5.6 has been extended: active support will run for an additional four months, and the security fix period has been doubled from one to two years. Other releases are unaffected.
Released as 5.6.0. |
r? @brandur-stripe
cc @stripe/api-libraries @alixander-stripe
Adds support for the new
/v1/exchange_rates
endpoints.