File tree Expand file tree Collapse file tree 1 file changed +38
-0
lines changed
Expand file tree Collapse file tree 1 file changed +38
-0
lines changed Original file line number Diff line number Diff line change 1+ <?php
2+
3+ declare (strict_types=1 );
4+
5+ /**
6+ * This file is part of the CsasWebApi package
7+ *
8+ * https://github.com/Spoje-NET/php-csas-webapi
9+ *
10+ * (c) SpojeNetIT <http://spoje.net/>
11+ *
12+ * For the full copyright and license information, please view the LICENSE
13+ * file that was distributed with this source code.
14+ */
15+ use Ease \Shared as Shr ;
16+
17+ require_once \dirname (__DIR__ ) . '/vendor/autoload.php ' ;
18+
19+ Shr::init ([], \dirname (__DIR__ ) . '/.env ' );
20+
21+ $ apiInstance = new \SpojeNET \Csas \Accounts \DefaultApi (new SpojeNET \Csas \ApiClient (
22+ [
23+ 'apikey ' => Shr::cfg ('API_KEY ' ),
24+ 'token ' => Shr::cfg ('ACCESS_TOKEN ' ),
25+ 'debug ' => Shr::cfg ('API_DEBUG ' , false ),
26+ 'sandbox ' => Shr::cfg ('SANDBOX_MODE ' ),
27+ ],
28+ ));
29+
30+ try {
31+ $ toDate = new \DateTime ();
32+ $ fromDate = (clone $ toDate )->modify ('-1 month ' );
33+ $ result = $ apiInstance ->getStatements ('AA195E7DB499B4D9F48D46C208625FF53F2245F7 ' , $ fromDate ->format ('Y-m-d ' ), $ toDate ->format ('Y-m-d ' ));
34+
35+ print_r ($ result );
36+ } catch (Exception $ e ) {
37+ echo 'Exception when calling DefaultApi->getStatements: ' , $ e ->getMessage (), \PHP_EOL ;
38+ }
You can’t perform that action at this time.
0 commit comments