Created
November 20, 2020 13:25
-
-
Save basst85/e661f6d9ad3929138308080f1abb7e4e to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <?php | |
| use bunq\Context\ApiContext; | |
| use bunq\Context\BunqContext; | |
| use bunq\Model\Generated\Endpoint\Insight; | |
| use bunq\Util\BunqEnumApiEnvironmentType; | |
| require_once(__DIR__ . '/vendor/autoload.php'); | |
| $environmentType = BunqEnumApiEnvironmentType::PRODUCTION(); | |
| $apiKey = 'YOUR_ARI_KEY'; // Replace with your APIk-key | |
| $deviceDescription = 'TestDevice'; // Replace with your device description | |
| $permittedIps = []; // List the real expected IPs of this device or leave empty to use the current IP | |
| $apiContext = ApiContext::create( | |
| $environmentType, | |
| $apiKey, | |
| $deviceDescription, | |
| $permittedIps | |
| ); | |
| BunqContext::loadApiContext($apiContext); | |
| $user = BunqContext::getUserContext()->getUserPerson(); | |
| $primaryMonetaryAccount = BunqContext::getUserContext()->getPrimaryMonetaryAccount(); | |
| $time_start = '01-09-2020'; | |
| $time_end = '09-10-2020'; | |
| // List Insights | |
| $paymentResponse = Insight::listing(['monetary_account_id' => $primaryMonetaryAccount, 'time_start' => $time_start, 'time_end' => $time_end]); | |
| $allPayment = $paymentResponse->getValue(); | |
| print_r($allPayment); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment