1 | <?php |
||
5 | class Vindi |
||
|
|||
6 | { |
||
7 | |||
8 | /** |
||
9 | * API KEY to be set on instances |
||
10 | * |
||
11 | * @var string |
||
12 | */ |
||
13 | private static $vindi_api_key; |
||
14 | |||
15 | /** |
||
16 | * URI to be set on instances |
||
17 | * Ex.: 'https://sandbox-app.vindi.com.br/api/v1/' |
||
18 | * |
||
19 | * @var string; |
||
20 | */ |
||
21 | private static $vindi_api_uri; |
||
22 | |||
23 | /** |
||
24 | * This Package SDK Version. |
||
25 | * |
||
26 | * @var string |
||
27 | */ |
||
28 | public static $sdkVersion = '1.1.0'; |
||
29 | |||
30 | /** |
||
31 | * The Environment variable name for API URI. |
||
32 | * |
||
33 | * @var string |
||
34 | */ |
||
35 | public static $apiUriEnvVar = 'VINDI_API_URI'; |
||
36 | |||
37 | /** |
||
38 | * The Environment variable name for API Key. |
||
39 | * |
||
40 | * @var string |
||
41 | */ |
||
42 | public static $apiKeyEnvVar = 'VINDI_API_KEY'; |
||
43 | |||
44 | /** |
||
45 | * The Environment variable name for API Time Out. |
||
46 | * |
||
47 | * @var string |
||
48 | */ |
||
49 | public static $apiTimeOutEnvVar = 'VINDI_API_TIME_OUT'; |
||
50 | |||
51 | /** |
||
52 | * Vindi constructor. |
||
53 | */ |
||
54 | private function __construct() |
||
57 | |||
58 | /** |
||
59 | * Set API KEY |
||
60 | * |
||
61 | * @param $vindi_api_key |
||
62 | */ |
||
63 | 2 | public static function setApiKey($vindi_api_key) |
|
69 | |||
70 | /** |
||
71 | * Set API URI |
||
72 | * |
||
73 | * @param $vindi_api_uri |
||
74 | */ |
||
75 | 2 | public static function setApiUri($vindi_api_uri) |
|
81 | |||
82 | /** |
||
83 | * Get Vindi API URI from environment. |
||
84 | * |
||
85 | * @return string |
||
86 | */ |
||
87 | 432 | public static function getApiUri() |
|
99 | |||
100 | /** |
||
101 | * Get Vindi API Key from environment. |
||
102 | * |
||
103 | * @return string |
||
104 | */ |
||
105 | 432 | public static function getApiKey() |
|
113 | |||
114 | /** |
||
115 | * Get Vindi API Time Out from environment. |
||
116 | * |
||
117 | * @return string |
||
118 | */ |
||
119 | 432 | public static function getApiTimeOut() |
|
126 | |||
127 | /** |
||
128 | * Get CA Bundle Path. |
||
129 | * |
||
130 | * @return string |
||
131 | */ |
||
132 | 432 | public static function getCertPath() |
|
136 | } |
||
137 |