forked from Adyen/adyen-php-api-library
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathDataProtectionApi.php
56 lines (50 loc) · 1.84 KB
/
DataProtectionApi.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
<?php
/**
* Adyen Data Protection 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\DataProtection\ObjectSerializer;
class DataProtectionApi extends Service
{
/**
* @var array|string|string[]
*/
private $baseURL;
/**
* DataProtectionApi 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://ca-test.adyen.com/ca/services/DataProtectionService/v1");
}
/**
* Submit a Subject Erasure Request.
*
* @param \Adyen\Model\DataProtection\SubjectErasureByPspReferenceRequest $subjectErasureByPspReferenceRequest
* @param array|null $requestOptions
* @return \Adyen\Model\DataProtection\SubjectErasureResponse
* @throws AdyenException
*/
public function requestSubjectErasure(\Adyen\Model\DataProtection\SubjectErasureByPspReferenceRequest $subjectErasureByPspReferenceRequest, array $requestOptions = null): \Adyen\Model\DataProtection\SubjectErasureResponse
{
$endpoint = $this->baseURL . "/requestSubjectErasure";
$response = $this->requestHttp($endpoint, strtolower('POST'), (array) $subjectErasureByPspReferenceRequest->jsonSerialize(), $requestOptions);
return ObjectSerializer::deserialize($response, \Adyen\Model\DataProtection\SubjectErasureResponse::class);
}
}