@@ -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 );
0 commit comments