-
Notifications
You must be signed in to change notification settings - Fork 106
/
POSTerminalManagementApi.php
116 lines (106 loc) · 5.22 KB
/
POSTerminalManagementApi.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
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
<?php
/**
* POS Terminal Management API
*
* The version of the OpenAPI document: 1
* 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;
use Adyen\AdyenException;
use Adyen\Client;
use Adyen\Service;
use Adyen\Model\POSTerminalManagement\ObjectSerializer;
class POSTerminalManagementApi extends Service
{
/**
* @var array|string|string[]
*/
private $baseURL;
/**
* POSTerminalManagementApi 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://postfmapi-test.adyen.com/postfmapi/terminal/v1");
}
/**
* Assign terminals
*
* @param \Adyen\Model\POSTerminalManagement\AssignTerminalsRequest $assignTerminalsRequest
* @param array|null $requestOptions
* @return \Adyen\Model\POSTerminalManagement\AssignTerminalsResponse
* @throws AdyenException
*/
public function assignTerminals(\Adyen\Model\POSTerminalManagement\AssignTerminalsRequest $assignTerminalsRequest, array $requestOptions = null): \Adyen\Model\POSTerminalManagement\AssignTerminalsResponse
{
$endpoint = $this->baseURL . "/assignTerminals";
$response = $this->requestHttp($endpoint, strtolower('POST'), (array) $assignTerminalsRequest->jsonSerialize(), $requestOptions);
return ObjectSerializer::deserialize($response, \Adyen\Model\POSTerminalManagement\AssignTerminalsResponse::class);
}
/**
* Get the account or store of a terminal
*
* @param \Adyen\Model\POSTerminalManagement\FindTerminalRequest $findTerminalRequest
* @param array|null $requestOptions
* @return \Adyen\Model\POSTerminalManagement\FindTerminalResponse
* @throws AdyenException
*/
public function findTerminal(\Adyen\Model\POSTerminalManagement\FindTerminalRequest $findTerminalRequest, array $requestOptions = null): \Adyen\Model\POSTerminalManagement\FindTerminalResponse
{
$endpoint = $this->baseURL . "/findTerminal";
$response = $this->requestHttp($endpoint, strtolower('POST'), (array) $findTerminalRequest->jsonSerialize(), $requestOptions);
return ObjectSerializer::deserialize($response, \Adyen\Model\POSTerminalManagement\FindTerminalResponse::class);
}
/**
* Get the stores of an account
*
* @param \Adyen\Model\POSTerminalManagement\GetStoresUnderAccountRequest $getStoresUnderAccountRequest
* @param array|null $requestOptions
* @return \Adyen\Model\POSTerminalManagement\GetStoresUnderAccountResponse
* @throws AdyenException
*/
public function getStoresUnderAccount(\Adyen\Model\POSTerminalManagement\GetStoresUnderAccountRequest $getStoresUnderAccountRequest, array $requestOptions = null): \Adyen\Model\POSTerminalManagement\GetStoresUnderAccountResponse
{
$endpoint = $this->baseURL . "/getStoresUnderAccount";
$response = $this->requestHttp($endpoint, strtolower('POST'), (array) $getStoresUnderAccountRequest->jsonSerialize(), $requestOptions);
return ObjectSerializer::deserialize($response, \Adyen\Model\POSTerminalManagement\GetStoresUnderAccountResponse::class);
}
/**
* Get the details of a terminal
*
* @param \Adyen\Model\POSTerminalManagement\GetTerminalDetailsRequest $getTerminalDetailsRequest
* @param array|null $requestOptions
* @return \Adyen\Model\POSTerminalManagement\GetTerminalDetailsResponse
* @throws AdyenException
*/
public function getTerminalDetails(\Adyen\Model\POSTerminalManagement\GetTerminalDetailsRequest $getTerminalDetailsRequest, array $requestOptions = null): \Adyen\Model\POSTerminalManagement\GetTerminalDetailsResponse
{
$endpoint = $this->baseURL . "/getTerminalDetails";
$response = $this->requestHttp($endpoint, strtolower('POST'), (array) $getTerminalDetailsRequest->jsonSerialize(), $requestOptions);
return ObjectSerializer::deserialize($response, \Adyen\Model\POSTerminalManagement\GetTerminalDetailsResponse::class);
}
/**
* Get the list of terminals
*
* @param \Adyen\Model\POSTerminalManagement\GetTerminalsUnderAccountRequest $getTerminalsUnderAccountRequest
* @param array|null $requestOptions
* @return \Adyen\Model\POSTerminalManagement\GetTerminalsUnderAccountResponse
* @throws AdyenException
*/
public function getTerminalsUnderAccount(\Adyen\Model\POSTerminalManagement\GetTerminalsUnderAccountRequest $getTerminalsUnderAccountRequest, array $requestOptions = null): \Adyen\Model\POSTerminalManagement\GetTerminalsUnderAccountResponse
{
$endpoint = $this->baseURL . "/getTerminalsUnderAccount";
$response = $this->requestHttp($endpoint, strtolower('POST'), (array) $getTerminalsUnderAccountRequest->jsonSerialize(), $requestOptions);
return ObjectSerializer::deserialize($response, \Adyen\Model\POSTerminalManagement\GetTerminalsUnderAccountResponse::class);
}
}