-
Notifications
You must be signed in to change notification settings - Fork 8
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
Request money on Sandbox if balance zero. (bunq/tinker_php#14) #15
Request money on Sandbox if balance zero. (bunq/tinker_php#14) #15
Conversation
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.
Some minor changes.
src/BunqLib.php
Outdated
@@ -19,6 +19,7 @@ | |||
use bunq\Model\Generated\Object\Pointer; | |||
use bunq\Util\BunqEnumApiEnvironmentType; | |||
use bunq\Util\InstallationUtil; | |||
use Habitat\Environment\Environment; |
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.
This can be removed right ? :P
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.
Ja
@@ -85,6 +97,7 @@ public function __construct(BunqEnumApiEnvironmentType $bunqEnumApiEnvironmentTy | |||
$this->environment = $bunqEnumApiEnvironmentType; | |||
$this->setupContext(); | |||
$this->setupCurrentUser(); | |||
$this->requestSpendingMoneyIfNeeded(); |
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.
TODO: bunq/sdk_php#122
After sdk update.
src/BunqLib.php
Outdated
*/ | ||
private function requestSpendingMoneyIfNeeded() | ||
{ | ||
if (BunqEnumApiEnvironmentType::SANDBOX()->equals($this->environment) |
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.
This logic can be extracted in its own separate method.
@OGKevin moving UserContext refresh to new issue. Implemented comments. |
#14