1: <?php
2: /*
3: * This file was automatically generated.
4: */
5: namespace Worldline\Acquiring\Sdk;
6:
7: use Worldline\Acquiring\Sdk\Logging\CommunicatorLogger;
8: use Worldline\Acquiring\Sdk\V1\V1Client;
9:
10: /**
11: * Worldline Acquiring platform client.
12: */
13: class Client extends ApiResource
14: {
15: /** @var Communicator */
16: private $communicator;
17:
18: /**
19: * Construct a new Worldline Acquiring platform API client.
20: *
21: * @param Communicator $communicator
22: */
23: public function __construct(Communicator $communicator)
24: {
25: parent::__construct();
26: $this->communicator = $communicator;
27: $this->context = array();
28: }
29:
30: /**
31: * @return Communicator
32: */
33: protected function getCommunicator()
34: {
35: return $this->communicator;
36: }
37:
38: /**
39: * @param CommunicatorLogger $communicatorLogger
40: */
41: public function enableLogging(CommunicatorLogger $communicatorLogger)
42: {
43: $this->getCommunicator()->enableLogging($communicatorLogger);
44: }
45:
46: /**
47: *
48: */
49: public function disableLogging()
50: {
51: $this->getCommunicator()->disableLogging();
52: }
53:
54: public function v1()
55: {
56: return new V1Client($this, $this->context);
57: }
58: }
59: