|
12 | 12 | //Always provide the closest IP address to the real end-user possible. |
13 | 13 |
|
14 | 14 | $request_body = new Model\GetStatementsRequest(['account_number' => '1899297002', 'currency' => 'CZK', 'statementLine' => 'MAIN']); |
15 | | -$page = 56; // int | Number of the requested page. Default is 1. |
16 | | -$size = 56; // int | Number of items on the page. Default is 15. |
| 15 | +$page = 1; // int | Number of the requested page. Default is 1. |
| 16 | +$size = 80; // int | Number of items on the page. Default is 15. |
17 | 17 |
|
18 | 18 | $apiInstance = new PremiumAPI\GetStatementListApi(new ApiClient([ |
19 | 19 | 'clientpubip' => $psu_ip_address, |
20 | | - 'clientid' => $x_ibm_client_id |
| 20 | + 'clientid' => $x_ibm_client_id, |
| 21 | + 'mocking' => true |
21 | 22 | ])); |
22 | 23 | try { |
23 | 24 | $result = $apiInstance->getStatements($x_request_id, $request_body, $page, $size); |
24 | 25 | print_r($result); |
25 | 26 | } catch (\Ease\Exception $e) { |
26 | 27 | echo 'Exception when calling GetStatementListApi->getStatements: ', $e->getMessage(), PHP_EOL; |
27 | 28 | } |
| 29 | + |
| 30 | + |
| 31 | +/** |
| 32 | +
|
| 33 | +
|
| 34 | +"/usr/bin/php" "/home/vitex/Projects/VitexSoftware/php-vitexsoftware-rbczpremiumapi/examples/getstatements.php" |
| 35 | +* Trying 82.99.167.1:443... |
| 36 | +* Connected to api.rb.cz (82.99.167.1) port 443 (#0) |
| 37 | +* ALPN, offering http/1.1 |
| 38 | +* successfully set certificate verify locations: |
| 39 | +* CAfile: /etc/ssl/certs/ca-certificates.crt |
| 40 | +* CApath: /etc/ssl/certs |
| 41 | +* SSL connection using TLSv1.2 / ECDHE-RSA-AES128-GCM-SHA256 |
| 42 | +* ALPN, server accepted to use http/1.1 |
| 43 | +* Server certificate: |
| 44 | +* subject: C=CZ; L=Praha; O=Raiffeisenbank a.s.; CN=api.rb.cz |
| 45 | +* start date: May 4 00:00:00 2022 GMT |
| 46 | +* expire date: May 4 23:59:59 2023 GMT |
| 47 | +* subjectAltName: host "api.rb.cz" matched cert's "api.rb.cz" |
| 48 | +* issuer: C=US; O=DigiCert Inc; CN=DigiCert TLS RSA SHA256 2020 CA1 |
| 49 | +* SSL certificate verify ok. |
| 50 | +> POST /rbcz/premium/mock/accounts/statements?page=1&size=80 HTTP/1.1 |
| 51 | +Host: api.rb.cz |
| 52 | +User-Agent: VitexSoftware/RBCZPremiumAPI/0.1.0/PHP |
| 53 | +X-IBM-Client-Id: FbboLD2r1WHDRcuKS4wWUbSRHxlDloWL |
| 54 | +X-Request-Id: 1682458803 |
| 55 | +Accept: application/json |
| 56 | +Content-Type: application/json |
| 57 | +Content-Length: 41 |
| 58 | +
|
| 59 | +* upload completely sent off: 41 out of 41 bytes |
| 60 | +* old SSL session ID is stale, removing |
| 61 | +* Mark bundle as not supporting multiuse |
| 62 | +< HTTP/1.1 200 OK |
| 63 | +< Date: Tue, 25 Apr 2023 21:40:46 GMT |
| 64 | +< Server: RBCZ |
| 65 | +< content-type: application/json; charset=utf-8 |
| 66 | +< content-length: 1313 |
| 67 | +< x-ratelimit-limit-second: 5 |
| 68 | +< x-ratelimit-remaining-second: 4 |
| 69 | +< x-ratelimit-limit-day: 1000 |
| 70 | +< x-ratelimit-remaining-day: 999 |
| 71 | +< ratelimit-limit: 5 |
| 72 | +< ratelimit-remaining: 4 |
| 73 | +< ratelimit-reset: 1 |
| 74 | +< x-kong-upstream-latency: 6 |
| 75 | +< x-kong-proxy-latency: 6 |
| 76 | +< via: kong/2.8.1.1-enterprise-edition |
| 77 | +< set-cookie: 00cdf75109dda7379df35556e601cac3=bf1c63b65fd3d882f20faa636a31ad8b; path=/; HttpOnly; Secure; SameSite=None |
| 78 | +< X-Correlation-Id: 1682458803 |
| 79 | +< |
| 80 | +* Connection #0 to host api.rb.cz left intact |
| 81 | +Array |
| 82 | +( |
| 83 | + [statements] => Array |
| 84 | + ( |
| 85 | + [0] => stdClass Object |
| 86 | + ( |
| 87 | + [statementId] => ab0cb1e8-1926-4c8c-b51e-66f0781f302c |
| 88 | + [accountId] => 3 |
| 89 | + [statementNumber] => 06/2015 |
| 90 | + [dateFrom] => 2015-06-01 |
| 91 | + [dateTo] => 2015-06-30 |
| 92 | + [statementFormats] => Array |
| 93 | + ( |
| 94 | + [0] => pdf |
| 95 | + ) |
| 96 | +
|
| 97 | + ) |
| 98 | +
|
| 99 | + [1] => stdClass Object |
| 100 | + ( |
| 101 | + [statementId] => f729e637-acf9-4261-8200-8a4e83421759 |
| 102 | + [accountId] => 3 |
| 103 | + [statementNumber] => 07/2015 |
| 104 | + [dateFrom] => 2015-07-01 |
| 105 | + [dateTo] => 2015-07-31 |
| 106 | + [statementFormats] => Array |
| 107 | + ( |
| 108 | + [0] => xml |
| 109 | + ) |
| 110 | +
|
| 111 | + ) |
| 112 | +
|
| 113 | + [2] => stdClass Object |
| 114 | + ( |
| 115 | + [statementId] => 940bc713-919e-4a32-81b8-3be7927081f0 |
| 116 | + [accountId] => 3 |
| 117 | + [statementNumber] => 08/2015 |
| 118 | + [dateFrom] => 2015-08-01 |
| 119 | + [dateTo] => 2015-08-31 |
| 120 | + [statementFormats] => Array |
| 121 | + ( |
| 122 | + [0] => MT940 |
| 123 | + ) |
| 124 | +
|
| 125 | + ) |
| 126 | +
|
| 127 | + [3] => stdClass Object |
| 128 | + ( |
| 129 | + [statementId] => 911f1790-1f78-4881-af50-f46054a82698 |
| 130 | + [accountId] => 3 |
| 131 | + [statementNumber] => 09/2015 |
| 132 | + [dateFrom] => 2015-08-01 |
| 133 | + [dateTo] => 2015-08-31 |
| 134 | + [statementFormats] => Array |
| 135 | + ( |
| 136 | + ) |
| 137 | +
|
| 138 | + ) |
| 139 | +
|
| 140 | + ) |
| 141 | +
|
| 142 | + [page] => 1 |
| 143 | + [size] => 10 |
| 144 | + [first] => 1 |
| 145 | + [last] => 1 |
| 146 | + [totalSize] => 4 |
| 147 | + [totalPages] => 1 |
| 148 | +) |
| 149 | +Done. |
| 150 | +
|
| 151 | +*/ |
0 commit comments