-
Notifications
You must be signed in to change notification settings - Fork 55
/
CustomerStatementExportContent.php
69 lines (63 loc) · 1.9 KB
/
CustomerStatementExportContent.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
<?php
namespace bunq\Model\Generated\Endpoint;
use bunq\Http\ApiClient;
use bunq\Http\BunqResponse;
use bunq\Model\Core\BunqModel;
/**
* Fetch the raw content of a statement export. The returned file format
* could be MT940, CSV or PDF depending on the statement format specified
* during the statement creation. The doc won't display the response of a
* request to get the content of a statement export.
*
* @generated
*/
class CustomerStatementExportContent extends BunqModel
{
/**
* Endpoint constants.
*/
const ENDPOINT_URL_LISTING = 'user/%s/monetary-account/%s/customer-statement/%s/content';
/**
* Object type.
*/
const OBJECT_TYPE_GET = 'CustomerStatementExportContent';
/**
* This method is called "listing" because "list" is a restricted PHP word
* and cannot be used as constants, class names, function or method names.
*
* @param int $customerStatementId
* @param int|null $monetaryAccountId
* @param string[] $customHeaders
*
* @return BunqResponseString
*/
public static function listing(
int $customerStatementId,
int $monetaryAccountId = null,
array $customHeaders = []
): BunqResponseString {
$apiClient = new ApiClient(static::getApiContext());
$responseRaw = $apiClient->get(
vsprintf(
self::ENDPOINT_URL_LISTING,
[
static::determineUserId(),
static::determineMonetaryAccountId($monetaryAccountId),
$customerStatementId,
]
),
[],
$customHeaders
);
return BunqResponseString::castFromBunqResponse(
new BunqResponse($responseRaw->getBodyString(), $responseRaw->getHeaders())
);
}
/**
* @return bool
*/
public function isAllFieldNull()
{
return true;
}
}