Skip to content

Commit caa7945

Browse files
committed
Merge branch 'main' of github.com:Spoje-NET/php-csas-webapi
2 parents fd2fcdd + a993491 commit caa7945

5 files changed

Lines changed: 37 additions & 5 deletions

File tree

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
lib/*.php /usr/share/php/CSas/
2-
lib/Accounts/*.php /usr/share/php/CSas/Accounts/
3-
lib/Model/*.php /usr/share/php/CSas/Model/
4-
debian/composer.json /usr/share/php/CSas/
1+
lib/*.php /usr/share/php/CSasAccounts/
2+
lib/Accounts/*.php /usr/share/php/CSasAccounts/Accounts/
3+
lib/Model/*.php /usr/share/php/CSasAccounts/Model/
4+
debian/composer.json /usr/share/php/CSasAccounts/

debian/rules

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,4 +16,4 @@
1616

1717
override_dh_install:
1818
dh_install
19-
jq '.version = "'`dpkg-parsechangelog | sed -n 's/^Version: //p'| sed 's/~.*//'`'"' debian/composer.json |sponge debian/php-spojenet-csas-accountsapi/usr/share/php/CSas/composer.json
19+
jq '.version = "'`dpkg-parsechangelog | sed -n 's/^Version: //p'| sed 's/~.*//'`'"' debian/composer.json |sponge debian/php-spojenet-csas-accountsapi/usr/share/php/CSasAccounts/composer.json

lib/Accounts/DefaultApi.php

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -73,6 +73,9 @@ class DefaultApi
7373
'application/json',
7474
],
7575
];
76+
protected ClientInterface $client;
77+
protected Configuration $config;
78+
protected HeaderSelector $headerSelector;
7679

7780
protected ClientInterface $client;
7881

lib/ApiClient.php

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,10 @@ class ApiClient extends \GuzzleHttp\Client
3737
* ClientID obtained from Developer Portal - when you registered your app with us.
3838
*/
3939
protected string $apiKey;
40+
<<<<<<< HEAD
4041

42+
=======
43+
>>>>>>> a993491f1bca20d2887d0d97ad7a7b4de7de8162
4144
protected string $token;
4245

4346
/**
@@ -52,31 +55,54 @@ class ApiClient extends \GuzzleHttp\Client
5255
* $config['token'] - your access token
5356
* $config['sandbox'] = true to use //api/csas/public/sandbox/v3/* endpoints
5457
*
58+
<<<<<<< HEAD
5559
* @throws \Exception CSAS_ACCESS_TOKEN is not set
5660
* @throws \Exception CSAS_API_KEY is not set
61+
=======
62+
* @throws \Exception ACCESS_TOKEN is not set
63+
* @throws \Exception API_KEY is not set
64+
>>>>>>> a993491f1bca20d2887d0d97ad7a7b4de7de8162
5765
*/
5866
public function __construct(array $config = [])
5967
{
6068
if (\array_key_exists('apikey', $config) === false) {
69+
<<<<<<< HEAD
6170
$this->apiKey = \Ease\Shared::cfg('CSAS_API_KEY');
71+
=======
72+
$this->apiKey = \Ease\Shared::cfg('API_KEY');
73+
>>>>>>> a993491f1bca20d2887d0d97ad7a7b4de7de8162
6274
} else {
6375
$this->apiKey = $config['apikey'];
6476
}
6577

6678
if (\array_key_exists('token', $config) === false) {
79+
<<<<<<< HEAD
6780
$this->token = \Ease\Shared::cfg('CSAS_API_TOKEN');
81+
=======
82+
$this->token = \Ease\Shared::cfg('API_TOKEN');
83+
>>>>>>> a993491f1bca20d2887d0d97ad7a7b4de7de8162
6884
} else {
6985
$this->token = $config['token'];
7086
}
7187

7288
if (\array_key_exists('debug', $config) === false) {
89+
<<<<<<< HEAD
7390
$config['debug'] = \Ease\Shared::cfg('CSAS_API_DEBUG', false);
7491
}
7592

7693
if (\array_key_exists('sandbox', $config)) {
7794
$this->sandBoxMode = strtolower((string) $config['sandbox']) === 'true';
7895
} else {
7996
$this->token = strtolower((string) \Ease\Shared::cfg('CSAS_SANDBOX_MODE', 'false')) === 'true';
97+
=======
98+
$config['debug'] = \Ease\Shared::cfg('API_DEBUG', false);
99+
}
100+
101+
if (\array_key_exists('sandbox', $config)) {
102+
$this->sandBoxMode = (bool) $config['sandbox'];
103+
} else {
104+
$this->token = (bool) \Ease\Shared::cfg('SANDBOX_MODE');
105+
>>>>>>> a993491f1bca20d2887d0d97ad7a7b4de7de8162
80106
}
81107

82108
parent::__construct($config);

lib/Configuration.php

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -105,7 +105,10 @@ class Configuration
105105
* Debug file location (log to STDOUT by default).
106106
*/
107107
protected string $tempFolderPath;
108+
<<<<<<< HEAD
108109

110+
=======
111+
>>>>>>> a993491f1bca20d2887d0d97ad7a7b4de7de8162
109112
private static Configuration $defaultConfiguration;
110113

111114
/**

0 commit comments

Comments
 (0)