PHP code example of spojenet / csas-accountsapi

1. Go to this page and download the library: Download spojenet/csas-accountsapi library. Choose the download type require.

2. Extract the ZIP file and open the index.php.

3. Add this code to the index.php.
    
        
<?php
require_once('vendor/autoload.php');

/* Start to develop here. Best regards https://php-download.com/ */

    

spojenet / csas-accountsapi example snippets





 Configure API key authorization: ApiKeyAuth
$config = SpojeNet\CSas\Configuration::getDefaultConfiguration()->setApiKey('WEB-API-key', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// $config = SpojeNet\CSas\Configuration::getDefaultConfiguration()->setApiKeyPrefix('WEB-API-key', 'Bearer');

// Configure Bearer (JWT) authorization: bearerAuth
$config = SpojeNet\CSas\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');


$apiInstance = new SpojeNet\CSas\Api\DefaultApi(
    // If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`.
    // This is optional, `GuzzleHttp\Client` will be used as default.
    new GuzzleHttp\Client(),
    $config
);
$id = D2C8C1DCC51A3738538A40A4863CA288E0225E52; // string | Unique system identification of the client account
$accountStatementId = 002498aa881201c7; // string | Unique identifier of the account statement
$format = pdf; // string | Selected statement format

try {
    $result = $apiInstance->downloadAccountStatement($id, $accountStatementId, $format);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling DefaultApi->downloadAccountStatement: ', $e->getMessage(), PHP_EOL;
}

json
{
  "repositories": [
    {
      "type": "vcs",
      "url": "https://github.com/Spoje-NET/php-csas-webapi.git"
    }
  ],
  "