-
Notifications
You must be signed in to change notification settings - Fork 101
/
CardOrdersApi.php
70 lines (63 loc) · 2.57 KB
/
CardOrdersApi.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
70
<?php
/**
* Configuration API
*
* The version of the OpenAPI document: 2
* Generated by: https://openapi-generator.tech
* OpenAPI Generator version: 6.0.1
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
namespace Adyen\Service\BalancePlatform;
use Adyen\AdyenException;
use Adyen\Client;
use Adyen\Service;
use Adyen\Model\BalancePlatform\ObjectSerializer;
class CardOrdersApi extends Service
{
/**
* @var array|string|string[]
*/
private $baseURL;
/**
* CardOrdersApi constructor.
*
* @param \Adyen\Client $client
* @throws AdyenException
*/
public function __construct(Client $client)
{
parent::__construct($client);
// Create the baseUrl based on live/test and optional live-url-prefix
$this->baseURL = $this->createBaseUrl("https://balanceplatform-api-test.adyen.com/bcl/v2");
}
/**
* Get card order items
*
* @param string $id
* @param array|null $requestOptions ['queryParams' => ['offset'=> int, 'limit'=> int]]
* @return \Adyen\Model\BalancePlatform\PaginatedGetCardOrderItemResponse
* @throws AdyenException
*/
public function getCardOrderItems(string $id, array $requestOptions = null): \Adyen\Model\BalancePlatform\PaginatedGetCardOrderItemResponse
{
$endpoint = $this->baseURL . str_replace(['{id}'], [$id], "/cardorders/{id}/items");
$response = $this->requestHttp($endpoint, strtolower('GET'), null, $requestOptions);
return ObjectSerializer::deserialize($response, \Adyen\Model\BalancePlatform\PaginatedGetCardOrderItemResponse::class);
}
/**
* Get a list of card orders
*
* @param array|null $requestOptions ['queryParams' => ['id'=> string, 'cardManufacturingProfileId'=> string, 'status'=> string, 'txVariantCode'=> string, 'createdSince'=> \DateTime, 'createdUntil'=> \DateTime, 'lockedSince'=> \DateTime, 'lockedUntil'=> \DateTime, 'serviceCenter'=> string, 'offset'=> int, 'limit'=> int]]
* @return \Adyen\Model\BalancePlatform\PaginatedGetCardOrderResponse
* @throws AdyenException
*/
public function listCardOrders(array $requestOptions = null): \Adyen\Model\BalancePlatform\PaginatedGetCardOrderResponse
{
$endpoint = $this->baseURL . "/cardorders";
$response = $this->requestHttp($endpoint, strtolower('GET'), null, $requestOptions);
return ObjectSerializer::deserialize($response, \Adyen\Model\BalancePlatform\PaginatedGetCardOrderResponse::class);
}
}