Browse code

removed Telnyx Plivo Twilio Flowroute appinfo/info.xml appinfo/signature.json README.md lib/Controller/AuthorApiController.php

DoubleBastionAdmin authored on 20/08/2022 16:26:33
Showing 1 changed files
1 1
deleted file mode 100644
... ...
@@ -1,222 +0,0 @@
1
-Telnyx PHP SDK
2
-
3
-[![Build Status](https://travis-ci.org/team-telnyx/telnyx-php.svg?branch=master)](https://travis-ci.org/team-telnyx/telnyx-php)
4
-[![Latest Stable Version](https://poser.pugx.org/telnyx/telnyx-php/v/stable.svg)](https://packagist.org/packages/telnyx/telnyx-php)
5
-[![Total Downloads](https://poser.pugx.org/telnyx/telnyx-php/downloads.svg)](https://packagist.org/packages/telnyx/telnyx-php)
6
-[![License](https://poser.pugx.org/telnyx/telnyx-php/license.svg)](https://packagist.org/packages/telnyx/telnyx-php)
7
-[![Build](https://travis-ci.org/team-telnyx/telnyx-php.svg?branch=master)](https://travis-ci.org/team-telnyx/telnyx-php)
8
-[![Code Coverage](https://coveralls.io/repos/github/team-telnyx/telnyx-php/badge.svg?branch=master)](https://coveralls.io/github/team-telnyx/telnyx-php?branch=master)
9
-
10
-You can sign up for a Telnyx account at https://telnyx.com.
11
-
12
-
13
-Installation
14
-
15
-This library supports PHP 5.6 and above.
16
-
17
-Installation of this module uses composer. For composer documentation, please refer to
18
-[getcomposer.org](http://getcomposer.org/).
19
-
20
-```bash
21
-$ composer require team-telnyx/telnyx-php
22
-```
23
-
24
-
25
-Dependencies
26
-
27
-Some PHP extensions are required:
28
-
29
-- [`curl`](https://secure.php.net/manual/en/book.curl.php), although you can use your own non-cURL client if you prefer
30
-- [`json`](https://secure.php.net/manual/en/book.json.php)
31
-- [`mbstring`](https://secure.php.net/manual/en/book.mbstring.php) (Multibyte String)
32
-
33
-Composer will handle these dependencies. If you install manually, you'll want to make sure that these extensions are available.
34
-
35
-
36
-Getting Started
37
-
38
-Basic example:
39
-
40
-```php
41
-use Telnyx;
42
-
43
-Telnyx\Telnyx::setApiKey('sk_test_BQokikJOvBiI2HlWgH4olfQ2');
44
-$order = Telnyx\NumberOrder::create(['phone_number' => '+18665552368']);
45
-echo $order;
46
-```
47
-
48
-
49
-Documentation
50
-
51
-Please see https://developers.telnyx.com/docs/api/v2/overview for up-to-date documentation.
52
-
53
-
54
-Custom Request Timeouts
55
-
56
-To modify request timeouts (connect or total, in seconds) you'll need to tell the API client to use a CurlClient other than its default. You'll set the timeouts in that CurlClient.
57
-
58
-```php
59
-use Telnyx;
60
-
61
-// set up your tweaked Curl client
62
-$curl = new Telnyx\HttpClient\CurlClient();
63
-$curl->setTimeout(10); // default is Telnyx\HttpClient\CurlClient::DEFAULT_TIMEOUT
64
-$curl->setConnectTimeout(5); // default is Telnyx\HttpClient\CurlClient::DEFAULT_CONNECT_TIMEOUT
65
-
66
-echo $curl->getTimeout(); // 10
67
-echo $curl->getConnectTimeout(); // 5
68
-
69
-// tell Telnyx to use the tweaked client
70
-Telnyx\ApiRequestor::setHttpClient($curl);
71
-
72
-// use the Telnyx API client as you normally would
73
-```
74
-
75
-
76
-Custom cURL Options (proxies)
77
-
78
-Need to set a proxy for your requests? Pass in the requisite `CURLOPT_*` array to the CurlClient constructor, using the same syntax as `curl_stopt_array()`. This will set the default cURL options for each HTTP request made by the SDK, though many more common options (e.g. timeouts; see above on how to set those) will be overridden by the client even if set here.
79
-
80
-```php
81
-// set up your tweaked Curl client
82
-$curl = new \Telnyx\HttpClient\CurlClient([CURLOPT_PROXY => 'proxy.local:80']);
83
-// tell Telnyx to use the tweaked client
84
-\Telnyx\ApiRequestor::setHttpClient($curl);
85
-```
86
-
87
-Alternately, a callable can be passed to the CurlClient constructor that returns the above array based on request inputs. See `testDefaultOptions()` in `tests/CurlClientTest.php` for an example of this behavior. Note that the callable is called at the beginning of every API request, before the request is sent.
88
-
89
-
90
-Configuring a Logger
91
-
92
-The library does minimal logging, but it can be configured
93
-with a [`PSR-3` compatible logger][psr3] so that messages
94
-end up there instead of `error_log`:
95
-
96
-```php
97
-\Telnyx\Telnyx::setLogger($logger);
98
-```
99
-
100
-
101
-Accessing Response Data
102
-
103
-You can access the data from the last API response on any object via `getLastResponse()`.
104
-
105
-```php
106
-$order = \Telnyx\NumberOrder::create(['phone_number' => '+18665552368']);
107
-echo $order->getLastResponse()->headers['Request-Id'];
108
-```
109
-
110
-
111
-SSL / TLS Compatibility issues
112
-
113
-Telnyx's API now requires that all connections use TLS 1.2. Some systems (most notably some older CentOS and RHEL versions) are capable of using TLS 1.2 but will use TLS 1.0 or 1.1 by default.
114
-
115
-The recommended course of action is to upgrade your cURL and OpenSSL packages so that TLS 1.2 is used by default, but if that is not possible, you might be able to solve the issue by setting the `CURLOPT_SSLVERSION` option to either `CURL_SSLVERSION_TLSv1` or `CURL_SSLVERSION_TLSv1_2`:
116
-
117
-```php
118
-$curl = new \Telnyx\HttpClient\CurlClient([CURLOPT_SSLVERSION => CURL_SSLVERSION_TLSv1]);
119
-\Telnyx\ApiRequestor::setHttpClient($curl);
120
-```
121
-
122
-
123
-Per-request Configuration
124
-
125
-For apps that need to use multiple keys during the lifetime of a process it's also possible to set a
126
-per-request key and/or account:
127
-
128
-```php
129
-\Telnyx\NumberOrder::all([], [
130
-    'api_key' => 'sk_test_...'
131
-]);
132
-
133
-\Telnyx\NumberOrder::retrieve("ch_18atAXCdGbJFKhCuBAa4532Z", [
134
-    'api_key' => 'sk_test_...'
135
-]);
136
-```
137
-
138
-
139
-Automatic Retries
140
-
141
-The library can be configured to automatically retry requests that fail due to
142
-an intermittent network problem:
143
-
144
-```php
145
-\Telnyx\Telnyx::setMaxNetworkRetries(2);
146
-```
147
-
148
-Idempotency keys are added to requests to guarantee that
149
-retries are safe.
150
-
151
-
152
-Development
153
-
154
-Unit tests rely on a mock server so all unit tests are ran through 
155
-docker.  To run all unit tests execute:
156
-
157
-```
158
-docker-compose run --rm php composer test
159
-```
160
-
161
-Running unit tests with code coverage requires you build the docker
162
-composer with XDEBUG=1
163
-
164
-```
165
-docker-compose build --build-arg XDEBUG=1
166
-```
167
-
168
-then run the unit tests as 
169
-
170
-```
171
-docker-compose run --rm php composer test-coverage
172
-```
173
-
174
-
175
-Plugin Developers
176
-
177
-Are you writing a plugin that integrates Telnyx and embeds our library? Then please use the `setAppInfo` function to identify your plugin. For example:
178
-
179
-```php
180
-use Telnyx;
181
-
182
-Telnyx\Telnyx::setAppInfo("MyCustomPlugin", "1.2.3", "https://customplugin.yoursite.com");
183
-```
184
-
185
-The method should be called once before any request is sent to the API. The second and third parameters are optional.
186
-
187
-
188
-SSL / TLS Configuration Option
189
-
190
-See the "SSL / TLS compatibility issues" paragraph above for full context. If you want to 
191
-ensure that your plugin can be used on all systems, you should add a configuration option 
192
-to let your users choose between different values for 
193
-`CURLOPT_SSLVERSION`: none (default), `CURL_SSLVERSION_TLSv1` and `CURL_SSLVERSION_TLSv1_2`.
194
-
195
-
196
-Acknowledgments
197
-
198
-The contributors and maintainers of Telnyx PHP would like to extend their deep gratitude 
199
-to the authors of [Stripe PHP][stripe-php], upon which this project is based. Thank you 
200
-for developing such elegant, usable, and extensible code and for sharing it with the community.
201
-
202
-[stripe-php]: https://github.com/stripe/stripe-php
203
-[composer]: https://getcomposer.org/
204
-[curl]: http://curl.haxx.se/docs/caextract.html
205
-[psr3]: http://www.php-fig.org/psr/psr-3/
206
-
Browse code

added appinfo/signature.json Telnyx Twilio Flowroute

DoubleBastionAdmin authored on 19/08/2022 13:10:24
Showing 1 changed files
1 1
new file mode 100644
... ...
@@ -0,0 +1,222 @@
1
+Telnyx PHP SDK
2
+--------------
3
+
4
+[![Build Status](https://travis-ci.org/team-telnyx/telnyx-php.svg?branch=master)](https://travis-ci.org/team-telnyx/telnyx-php)
5
+[![Latest Stable Version](https://poser.pugx.org/telnyx/telnyx-php/v/stable.svg)](https://packagist.org/packages/telnyx/telnyx-php)
6
+[![Total Downloads](https://poser.pugx.org/telnyx/telnyx-php/downloads.svg)](https://packagist.org/packages/telnyx/telnyx-php)
7
+[![License](https://poser.pugx.org/telnyx/telnyx-php/license.svg)](https://packagist.org/packages/telnyx/telnyx-php)
8
+[![Build](https://travis-ci.org/team-telnyx/telnyx-php.svg?branch=master)](https://travis-ci.org/team-telnyx/telnyx-php)
9
+[![Code Coverage](https://coveralls.io/repos/github/team-telnyx/telnyx-php/badge.svg?branch=master)](https://coveralls.io/github/team-telnyx/telnyx-php?branch=master)
10
+
11
+You can sign up for a Telnyx account at https://telnyx.com.
12
+
13
+
14
+Installation
15
+------------
16
+
17
+This library supports PHP 5.6 and above.
18
+
19
+Installation of this module uses composer. For composer documentation, please refer to
20
+[getcomposer.org](http://getcomposer.org/).
21
+
22
+```bash
23
+$ composer require team-telnyx/telnyx-php
24
+```
25
+
26
+
27
+Dependencies
28
+------------
29
+
30
+Some PHP extensions are required:
31
+
32
+- [`curl`](https://secure.php.net/manual/en/book.curl.php), although you can use your own non-cURL client if you prefer
33
+- [`json`](https://secure.php.net/manual/en/book.json.php)
34
+- [`mbstring`](https://secure.php.net/manual/en/book.mbstring.php) (Multibyte String)
35
+
36
+Composer will handle these dependencies. If you install manually, you'll want to make sure that these extensions are available.
37
+
38
+
39
+Getting Started
40
+---------------
41
+
42
+Basic example:
43
+
44
+```php
45
+use Telnyx;
46
+
47
+Telnyx\Telnyx::setApiKey('sk_test_BQokikJOvBiI2HlWgH4olfQ2');
48
+$order = Telnyx\NumberOrder::create(['phone_number' => '+18665552368']);
49
+echo $order;
50
+```
51
+
52
+
53
+Documentation
54
+-------------
55
+
56
+Please see https://developers.telnyx.com/docs/api/v2/overview for up-to-date documentation.
57
+
58
+
59
+Custom Request Timeouts
60
+-----------------------
61
+
62
+To modify request timeouts (connect or total, in seconds) you'll need to tell the API client to use a CurlClient other than its default. You'll set the timeouts in that CurlClient.
63
+
64
+```php
65
+use Telnyx;
66
+
67
+// set up your tweaked Curl client
68
+$curl = new Telnyx\HttpClient\CurlClient();
69
+$curl->setTimeout(10); // default is Telnyx\HttpClient\CurlClient::DEFAULT_TIMEOUT
70
+$curl->setConnectTimeout(5); // default is Telnyx\HttpClient\CurlClient::DEFAULT_CONNECT_TIMEOUT
71
+
72
+echo $curl->getTimeout(); // 10
73
+echo $curl->getConnectTimeout(); // 5
74
+
75
+// tell Telnyx to use the tweaked client
76
+Telnyx\ApiRequestor::setHttpClient($curl);
77
+
78
+// use the Telnyx API client as you normally would
79
+```
80
+
81
+
82
+Custom cURL Options (proxies)
83
+-----------------------------
84
+
85
+Need to set a proxy for your requests? Pass in the requisite `CURLOPT_*` array to the CurlClient constructor, using the same syntax as `curl_stopt_array()`. This will set the default cURL options for each HTTP request made by the SDK, though many more common options (e.g. timeouts; see above on how to set those) will be overridden by the client even if set here.
86
+
87
+```php
88
+// set up your tweaked Curl client
89
+$curl = new \Telnyx\HttpClient\CurlClient([CURLOPT_PROXY => 'proxy.local:80']);
90
+// tell Telnyx to use the tweaked client
91
+\Telnyx\ApiRequestor::setHttpClient($curl);
92
+```
93
+
94
+Alternately, a callable can be passed to the CurlClient constructor that returns the above array based on request inputs. See `testDefaultOptions()` in `tests/CurlClientTest.php` for an example of this behavior. Note that the callable is called at the beginning of every API request, before the request is sent.
95
+
96
+
97
+Configuring a Logger
98
+--------------------
99
+
100
+The library does minimal logging, but it can be configured
101
+with a [`PSR-3` compatible logger][psr3] so that messages
102
+end up there instead of `error_log`:
103
+
104
+```php
105
+\Telnyx\Telnyx::setLogger($logger);
106
+```
107
+
108
+
109
+Accessing Response Data
110
+-----------------------
111
+
112
+You can access the data from the last API response on any object via `getLastResponse()`.
113
+
114
+```php
115
+$order = \Telnyx\NumberOrder::create(['phone_number' => '+18665552368']);
116
+echo $order->getLastResponse()->headers['Request-Id'];
117
+```
118
+
119
+
120
+SSL / TLS Compatibility issues
121
+------------------------------
122
+
123
+Telnyx's API now requires that all connections use TLS 1.2. Some systems (most notably some older CentOS and RHEL versions) are capable of using TLS 1.2 but will use TLS 1.0 or 1.1 by default.
124
+
125
+The recommended course of action is to upgrade your cURL and OpenSSL packages so that TLS 1.2 is used by default, but if that is not possible, you might be able to solve the issue by setting the `CURLOPT_SSLVERSION` option to either `CURL_SSLVERSION_TLSv1` or `CURL_SSLVERSION_TLSv1_2`:
126
+
127
+```php
128
+$curl = new \Telnyx\HttpClient\CurlClient([CURLOPT_SSLVERSION => CURL_SSLVERSION_TLSv1]);
129
+\Telnyx\ApiRequestor::setHttpClient($curl);
130
+```
131
+
132
+
133
+Per-request Configuration
134
+-------------------------
135
+
136
+For apps that need to use multiple keys during the lifetime of a process it's also possible to set a
137
+per-request key and/or account:
138
+
139
+```php
140
+\Telnyx\NumberOrder::all([], [
141
+    'api_key' => 'sk_test_...'
142
+]);
143
+
144
+\Telnyx\NumberOrder::retrieve("ch_18atAXCdGbJFKhCuBAa4532Z", [
145
+    'api_key' => 'sk_test_...'
146
+]);
147
+```
148
+
149
+
150
+Automatic Retries
151
+-----------------
152
+
153
+The library can be configured to automatically retry requests that fail due to
154
+an intermittent network problem:
155
+
156
+```php
157
+\Telnyx\Telnyx::setMaxNetworkRetries(2);
158
+```
159
+
160
+Idempotency keys are added to requests to guarantee that
161
+retries are safe.
162
+
163
+
164
+Development
165
+-----------
166
+
167
+Unit tests rely on a mock server so all unit tests are ran through 
168
+docker.  To run all unit tests execute:
169
+
170
+```
171
+docker-compose run --rm php composer test
172
+```
173
+
174
+Running unit tests with code coverage requires you build the docker
175
+composer with XDEBUG=1
176
+
177
+```
178
+docker-compose build --build-arg XDEBUG=1
179
+```
180
+
181
+then run the unit tests as 
182
+
183
+```
184
+docker-compose run --rm php composer test-coverage
185
+```
186
+
187
+
188
+Plugin Developers
189
+-----------------
190
+
191
+Are you writing a plugin that integrates Telnyx and embeds our library? Then please use the `setAppInfo` function to identify your plugin. For example:
192
+
193
+```php
194
+use Telnyx;
195
+
196
+Telnyx\Telnyx::setAppInfo("MyCustomPlugin", "1.2.3", "https://customplugin.yoursite.com");
197
+```
198
+
199
+The method should be called once before any request is sent to the API. The second and third parameters are optional.
200
+
201
+
202
+SSL / TLS Configuration Option
203
+------------------------------
204
+
205
+See the "SSL / TLS compatibility issues" paragraph above for full context. If you want to 
206
+ensure that your plugin can be used on all systems, you should add a configuration option 
207
+to let your users choose between different values for 
208
+`CURLOPT_SSLVERSION`: none (default), `CURL_SSLVERSION_TLSv1` and `CURL_SSLVERSION_TLSv1_2`.
209
+
210
+
211
+Acknowledgments
212
+---------------
213
+
214
+The contributors and maintainers of Telnyx PHP would like to extend their deep gratitude 
215
+to the authors of [Stripe PHP][stripe-php], upon which this project is based. Thank you 
216
+for developing such elegant, usable, and extensible code and for sharing it with the community.
217
+
218
+[stripe-php]: https://github.com/stripe/stripe-php
219
+[composer]: https://getcomposer.org/
220
+[curl]: http://curl.haxx.se/docs/caextract.html
221
+[psr3]: http://www.php-fig.org/psr/psr-3/
222
+
Browse code

removed appinfo/signature.json and Telnyx

DoubleBastionAdmin authored on 19/08/2022 12:45:59
Showing 1 changed files
1 1
deleted file mode 100644
... ...
@@ -1,233 +0,0 @@
1
-Telnyx PHP SDK
2
-
3
-[![Build Status](https://travis-ci.org/team-telnyx/telnyx-php.svg?branch=master)](https://travis-ci.org/team-telnyx/telnyx-php)
4
-[![Latest Stable Version](https://poser.pugx.org/telnyx/telnyx-php/v/stable.svg)](https://packagist.org/packages/telnyx/telnyx-php)
5
-[![Total Downloads](https://poser.pugx.org/telnyx/telnyx-php/downloads.svg)](https://packagist.org/packages/telnyx/telnyx-php)
6
-[![License](https://poser.pugx.org/telnyx/telnyx-php/license.svg)](https://packagist.org/packages/telnyx/telnyx-php)
7
-[![Code Coverage](https://coveralls.io/repos/github/team-telnyx/telnyx-php/badge.svg?branch=master&)](https://coveralls.io/github/team-telnyx/telnyx-php?branch=master&)
8
-
9
-You can sign up for a Telnyx account at [telnyx.com](https://telnyx.com).
10
-
11
-
12
-Installation
13
-
14
-This library supports PHP 5.6 and above.
15
-
16
-Installation of this module uses composer. For composer documentation, please refer to
17
-[getcomposer.org](http://getcomposer.org/).
18
-
19
-```bash
20
-$ composer require team-telnyx/telnyx-php
21
-```
22
-
23
-
24
-Dependencies
25
-
26
-Some PHP extensions are required:
27
-
28
-- [`curl`](https://secure.php.net/manual/en/book.curl.php), although you can use your own non-cURL client if you prefer
29
-- [`json`](https://secure.php.net/manual/en/book.json.php)
30
-- [`mbstring`](https://secure.php.net/manual/en/book.mbstring.php) (Multibyte String)
31
-
32
-Composer will handle these dependencies. If you install manually, you'll want to make sure that these extensions are available.
33
-
34
-
35
-Getting Started
36
-
37
-Basic example:
38
-
39
-```php
40
-use Telnyx;
41
-
42
-Telnyx\Telnyx::setApiKey('sk_test_BQokikJOvBiI2HlWgH4olfQ2');
43
-$order = Telnyx\NumberOrder::create(['phone_number' => '+18665552368']);
44
-echo $order;
45
-```
46
-
47
-
48
-Documentation
49
-
50
-Please see https://developers.telnyx.com/docs/api/v2/overview for up-to-date documentation.
51
-
52
-
53
-Custom Request Timeouts
54
-
55
-To modify request timeouts (connect or total, in seconds) you'll need to tell the API client to use a CurlClient other than its default. You'll set the timeouts in that CurlClient.
56
-
57
-```php
58
-use Telnyx;
59
-
60
-// set up your tweaked Curl client
61
-$curl = new Telnyx\HttpClient\CurlClient();
62
-$curl->setTimeout(10); // default is Telnyx\HttpClient\CurlClient::DEFAULT_TIMEOUT
63
-$curl->setConnectTimeout(5); // default is Telnyx\HttpClient\CurlClient::DEFAULT_CONNECT_TIMEOUT
64
-
65
-echo $curl->getTimeout(); // 10
66
-echo $curl->getConnectTimeout(); // 5
67
-
68
-// tell Telnyx to use the tweaked client
69
-Telnyx\ApiRequestor::setHttpClient($curl);
70
-
71
-// use the Telnyx API client as you normally would
72
-```
73
-
74
-
75
-Custom cURL Options (proxies)
76
-
77
-Need to set a proxy for your requests? Pass in the requisite `CURLOPT_*` array to the CurlClient constructor, using the same syntax as `curl_stopt_array()`. This will set the default cURL options for each HTTP request made by the SDK, though many more common options (e.g. timeouts; see above on how to set those) will be overridden by the client even if set here.
78
-
79
-```php
80
-use Telnyx;
81
-
82
-// set up your tweaked Curl client
83
-$curl = new Telnyx\HttpClient\CurlClient([CURLOPT_PROXY => 'proxy.local:80']);
84
-// tell Telnyx to use the tweaked client
85
-Telnyx\ApiRequestor::setHttpClient($curl);
86
-```
87
-
88
-Alternately, a callable can be passed to the CurlClient constructor that returns the above array based on request inputs. See `testDefaultOptions()` in `tests/CurlClientTest.php` for an example of this behavior. Note that the callable is called at the beginning of every API request, before the request is sent.
89
-
90
-
91
-Configuring a Logger
92
-
93
-The library does minimal logging, but it can be configured
94
-with a [`PSR-3` compatible logger][psr3] so that messages
95
-end up there instead of `error_log`:
96
-
97
-```php
98
-use Telnyx;
99
-
100
-Telnyx\Telnyx::setLogger($logger);
101
-```
102
-
103
-
104
-Accessing Response Data
105
-
106
-You can access the data from the last API response on any object via `getLastResponse()`.
107
-
108
-```php
109
-use Telnyx;
110
-
111
-$order = Telnyx\NumberOrder::create(['phone_number' => '+18665552368']);
112
-echo $order->getLastResponse()->headers['Request-Id'];
113
-```
114
-
115
-
116
-SSL / TLS Compatibility issues
117
-
118
-Telnyx's API now requires that all connections use TLS 1.2. Some systems (most notably some older CentOS and RHEL versions) are capable of using TLS 1.2 but will use TLS 1.0 or 1.1 by default.
119
-
120
-The recommended course of action is to upgrade your cURL and OpenSSL packages so that TLS 1.2 is used by default, but if that is not possible, you might be able to solve the issue by setting the `CURLOPT_SSLVERSION` option to either `CURL_SSLVERSION_TLSv1` or `CURL_SSLVERSION_TLSv1_2`:
121
-
122
-```php
123
-use Telnyx;
124
-
125
-$curl = new Telnyx\HttpClient\CurlClient([CURLOPT_SSLVERSION => CURL_SSLVERSION_TLSv1]);
126
-Telnyx\ApiRequestor::setHttpClient($curl);
127
-```
128
-
129
-
130
-Per-request Configuration
131
-
132
-For apps that need to use multiple keys during the lifetime of a process it's also possible to set a
133
-per-request key and/or account:
134
-
135
-```php
136
-use Telnyx;
137
-
138
-Telnyx\NumberOrder::all([], [
139
-    'api_key' => 'sk_test_...'
140
-]);
141
-
142
-Telnyx\NumberOrder::retrieve("ch_18atAXCdGbJFKhCuBAa4532Z", [
143
-    'api_key' => 'sk_test_...'
144
-]);
145
-```
146
-
147
-
148
-Automatic Retries
149
-
150
-The library can be configured to automatically retry requests that fail due to
151
-an intermittent network problem:
152
-
153
-```php
154
-use Telnyx;
155
-
156
-Telnyx\Telnyx::setMaxNetworkRetries(2);
157
-```
158
-
159
-Idempotency keys are added to requests to guarantee that
160
-retries are safe.
161
-
162
-
163
-Development
164
-
165
-Unit tests rely on a mock server so all unit tests are ran through 
166
-docker.  To run all unit tests execute:
167
-
168
-```
169
-docker-compose run --rm php composer test
170
-```
171
-
172
-Running unit tests with code coverage requires you build the docker
173
-container with XDEBUG=1
174
-
175
-```
176
-docker-compose build --build-arg XDEBUG=1
177
-```
178
-
179
-then run the unit tests as 
180
-
181
-```
182
-docker-compose run --rm php composer test-coverage
183
-```
184
-
185
-
186
-Plugin Developers
187
-
188
-Are you writing a plugin that integrates Telnyx and embeds our library? Then please use the `setAppInfo` function to identify your plugin. For example:
189
-
190
-```php
191
-use Telnyx;
192
-
193
-Telnyx\Telnyx::setAppInfo("MyCustomPlugin", "1.2.3", "https://customplugin.yoursite.com");
194
-```
195
-
196
-The method should be called once before any request is sent to the API. The second and third parameters are optional.
197
-
198
-
199
-SSL / TLS Configuration Option
200
-
201
-See the "SSL / TLS compatibility issues" paragraph above for full context. If you want to 
202
-ensure that your plugin can be used on all systems, you should add a configuration option 
203
-to let your users choose between different values for 
204
-`CURLOPT_SSLVERSION`: none (default), `CURL_SSLVERSION_TLSv1` and `CURL_SSLVERSION_TLSv1_2`.
205
-
206
-
207
-Acknowledgments
208
-
209
-The contributors and maintainers of Telnyx PHP would like to extend their deep gratitude 
210
-to the authors of [Stripe PHP][stripe-php], upon which this project is based. Thank you 
211
-for developing such elegant, usable, and extensible code and for sharing it with the community.
212
-
213
-[stripe-php]: https://github.com/stripe/stripe-php
214
-[composer]: https://getcomposer.org/
215
-[curl]: http://curl.haxx.se/docs/caextract.html
216
-[psr3]: http://www.php-fig.org/psr/psr-3/
217
-
Browse code

added appinfo/signature.json and Telnyx directory

DoubleBastionAdmin authored on 19/08/2022 11:38:54
Showing 1 changed files
1 1
new file mode 100644
... ...
@@ -0,0 +1,233 @@
1
+Telnyx PHP SDK
2
+--------------
3
+
4
+[![Build Status](https://travis-ci.org/team-telnyx/telnyx-php.svg?branch=master)](https://travis-ci.org/team-telnyx/telnyx-php)
5
+[![Latest Stable Version](https://poser.pugx.org/telnyx/telnyx-php/v/stable.svg)](https://packagist.org/packages/telnyx/telnyx-php)
6
+[![Total Downloads](https://poser.pugx.org/telnyx/telnyx-php/downloads.svg)](https://packagist.org/packages/telnyx/telnyx-php)
7
+[![License](https://poser.pugx.org/telnyx/telnyx-php/license.svg)](https://packagist.org/packages/telnyx/telnyx-php)
8
+[![Code Coverage](https://coveralls.io/repos/github/team-telnyx/telnyx-php/badge.svg?branch=master&)](https://coveralls.io/github/team-telnyx/telnyx-php?branch=master&)
9
+
10
+You can sign up for a Telnyx account at [telnyx.com](https://telnyx.com).
11
+
12
+
13
+Installation
14
+------------
15
+
16
+This library supports PHP 5.6 and above.
17
+
18
+Installation of this module uses composer. For composer documentation, please refer to
19
+[getcomposer.org](http://getcomposer.org/).
20
+
21
+```bash
22
+$ composer require team-telnyx/telnyx-php
23
+```
24
+
25
+
26
+Dependencies
27
+------------
28
+
29
+Some PHP extensions are required:
30
+
31
+- [`curl`](https://secure.php.net/manual/en/book.curl.php), although you can use your own non-cURL client if you prefer
32
+- [`json`](https://secure.php.net/manual/en/book.json.php)
33
+- [`mbstring`](https://secure.php.net/manual/en/book.mbstring.php) (Multibyte String)
34
+
35
+Composer will handle these dependencies. If you install manually, you'll want to make sure that these extensions are available.
36
+
37
+
38
+Getting Started
39
+---------------
40
+
41
+Basic example:
42
+
43
+```php
44
+use Telnyx;
45
+
46
+Telnyx\Telnyx::setApiKey('sk_test_BQokikJOvBiI2HlWgH4olfQ2');
47
+$order = Telnyx\NumberOrder::create(['phone_number' => '+18665552368']);
48
+echo $order;
49
+```
50
+
51
+
52
+Documentation
53
+-------------
54
+
55
+Please see https://developers.telnyx.com/docs/api/v2/overview for up-to-date documentation.
56
+
57
+
58
+Custom Request Timeouts
59
+-----------------------
60
+
61
+To modify request timeouts (connect or total, in seconds) you'll need to tell the API client to use a CurlClient other than its default. You'll set the timeouts in that CurlClient.
62
+
63
+```php
64
+use Telnyx;
65
+
66
+// set up your tweaked Curl client
67
+$curl = new Telnyx\HttpClient\CurlClient();
68
+$curl->setTimeout(10); // default is Telnyx\HttpClient\CurlClient::DEFAULT_TIMEOUT
69
+$curl->setConnectTimeout(5); // default is Telnyx\HttpClient\CurlClient::DEFAULT_CONNECT_TIMEOUT
70
+
71
+echo $curl->getTimeout(); // 10
72
+echo $curl->getConnectTimeout(); // 5
73
+
74
+// tell Telnyx to use the tweaked client
75
+Telnyx\ApiRequestor::setHttpClient($curl);
76
+
77
+// use the Telnyx API client as you normally would
78
+```
79
+
80
+
81
+Custom cURL Options (proxies)
82
+-----------------------------
83
+
84
+Need to set a proxy for your requests? Pass in the requisite `CURLOPT_*` array to the CurlClient constructor, using the same syntax as `curl_stopt_array()`. This will set the default cURL options for each HTTP request made by the SDK, though many more common options (e.g. timeouts; see above on how to set those) will be overridden by the client even if set here.
85
+
86
+```php
87
+use Telnyx;
88
+
89
+// set up your tweaked Curl client
90
+$curl = new Telnyx\HttpClient\CurlClient([CURLOPT_PROXY => 'proxy.local:80']);
91
+// tell Telnyx to use the tweaked client
92
+Telnyx\ApiRequestor::setHttpClient($curl);
93
+```
94
+
95
+Alternately, a callable can be passed to the CurlClient constructor that returns the above array based on request inputs. See `testDefaultOptions()` in `tests/CurlClientTest.php` for an example of this behavior. Note that the callable is called at the beginning of every API request, before the request is sent.
96
+
97
+
98
+Configuring a Logger
99
+--------------------
100
+
101
+The library does minimal logging, but it can be configured
102
+with a [`PSR-3` compatible logger][psr3] so that messages
103
+end up there instead of `error_log`:
104
+
105
+```php
106
+use Telnyx;
107
+
108
+Telnyx\Telnyx::setLogger($logger);
109
+```
110
+
111
+
112
+Accessing Response Data
113
+-----------------------
114
+
115
+You can access the data from the last API response on any object via `getLastResponse()`.
116
+
117
+```php
118
+use Telnyx;
119
+
120
+$order = Telnyx\NumberOrder::create(['phone_number' => '+18665552368']);
121
+echo $order->getLastResponse()->headers['Request-Id'];
122
+```
123
+
124
+
125
+SSL / TLS Compatibility issues
126
+------------------------------
127
+
128
+Telnyx's API now requires that all connections use TLS 1.2. Some systems (most notably some older CentOS and RHEL versions) are capable of using TLS 1.2 but will use TLS 1.0 or 1.1 by default.
129
+
130
+The recommended course of action is to upgrade your cURL and OpenSSL packages so that TLS 1.2 is used by default, but if that is not possible, you might be able to solve the issue by setting the `CURLOPT_SSLVERSION` option to either `CURL_SSLVERSION_TLSv1` or `CURL_SSLVERSION_TLSv1_2`:
131
+
132
+```php
133
+use Telnyx;
134
+
135
+$curl = new Telnyx\HttpClient\CurlClient([CURLOPT_SSLVERSION => CURL_SSLVERSION_TLSv1]);
136
+Telnyx\ApiRequestor::setHttpClient($curl);
137
+```
138
+
139
+
140
+Per-request Configuration
141
+-------------------------
142
+
143
+For apps that need to use multiple keys during the lifetime of a process it's also possible to set a
144
+per-request key and/or account:
145
+
146
+```php
147
+use Telnyx;
148
+
149
+Telnyx\NumberOrder::all([], [
150
+    'api_key' => 'sk_test_...'
151
+]);
152
+
153
+Telnyx\NumberOrder::retrieve("ch_18atAXCdGbJFKhCuBAa4532Z", [
154
+    'api_key' => 'sk_test_...'
155
+]);
156
+```
157
+
158
+
159
+Automatic Retries
160
+-----------------
161
+
162
+The library can be configured to automatically retry requests that fail due to
163
+an intermittent network problem:
164
+
165
+```php
166
+use Telnyx;
167
+
168
+Telnyx\Telnyx::setMaxNetworkRetries(2);
169
+```
170
+
171
+Idempotency keys are added to requests to guarantee that
172
+retries are safe.
173
+
174
+
175
+Development
176
+-----------
177
+
178
+Unit tests rely on a mock server so all unit tests are ran through 
179
+docker.  To run all unit tests execute:
180
+
181
+```
182
+docker-compose run --rm php composer test
183
+```
184
+
185
+Running unit tests with code coverage requires you build the docker
186
+container with XDEBUG=1
187
+
188
+```
189
+docker-compose build --build-arg XDEBUG=1
190
+```
191
+
192
+then run the unit tests as 
193
+
194
+```
195
+docker-compose run --rm php composer test-coverage
196
+```
197
+
198
+
199
+Plugin Developers
200
+-----------------
201
+
202
+Are you writing a plugin that integrates Telnyx and embeds our library? Then please use the `setAppInfo` function to identify your plugin. For example:
203
+
204
+```php
205
+use Telnyx;
206
+
207
+Telnyx\Telnyx::setAppInfo("MyCustomPlugin", "1.2.3", "https://customplugin.yoursite.com");
208
+```
209
+
210
+The method should be called once before any request is sent to the API. The second and third parameters are optional.
211
+
212
+
213
+SSL / TLS Configuration Option
214
+------------------------------
215
+
216
+See the "SSL / TLS compatibility issues" paragraph above for full context. If you want to 
217
+ensure that your plugin can be used on all systems, you should add a configuration option 
218
+to let your users choose between different values for 
219
+`CURLOPT_SSLVERSION`: none (default), `CURL_SSLVERSION_TLSv1` and `CURL_SSLVERSION_TLSv1_2`.
220
+
221
+
222
+Acknowledgments
223
+---------------
224
+
225
+The contributors and maintainers of Telnyx PHP would like to extend their deep gratitude 
226
+to the authors of [Stripe PHP][stripe-php], upon which this project is based. Thank you 
227
+for developing such elegant, usable, and extensible code and for sharing it with the community.
228
+
229
+[stripe-php]: https://github.com/stripe/stripe-php
230
+[composer]: https://getcomposer.org/
231
+[curl]: http://curl.haxx.se/docs/caextract.html
232
+[psr3]: http://www.php-fig.org/psr/psr-3/
233
+
Browse code

removed Telnyx directory

DoubleBastionAdmin authored on 19/08/2022 11:12:03
Showing 1 changed files
1 1
deleted file mode 100644
... ...
@@ -1,233 +0,0 @@
1
-Telnyx PHP SDK
2
-
3
-[![Build Status](https://travis-ci.org/team-telnyx/telnyx-php.svg?branch=master)](https://travis-ci.org/team-telnyx/telnyx-php)
4
-[![Latest Stable Version](https://poser.pugx.org/telnyx/telnyx-php/v/stable.svg)](https://packagist.org/packages/telnyx/telnyx-php)
5
-[![Total Downloads](https://poser.pugx.org/telnyx/telnyx-php/downloads.svg)](https://packagist.org/packages/telnyx/telnyx-php)
6
-[![License](https://poser.pugx.org/telnyx/telnyx-php/license.svg)](https://packagist.org/packages/telnyx/telnyx-php)
7
-[![Code Coverage](https://coveralls.io/repos/github/team-telnyx/telnyx-php/badge.svg?branch=master&)](https://coveralls.io/github/team-telnyx/telnyx-php?branch=master&)
8
-
9
-You can sign up for a Telnyx account at [telnyx.com](https://telnyx.com).
10
-
11
-
12
-Installation
13
-
14
-This library supports PHP 5.6 and above.
15
-
16
-Installation of this module uses composer. For composer documentation, please refer to
17
-[getcomposer.org](http://getcomposer.org/).
18
-
19
-```bash
20
-$ composer require team-telnyx/telnyx-php
21
-```
22
-
23
-
24
-Dependencies
25
-
26
-Some PHP extensions are required:
27
-
28
-- [`curl`](https://secure.php.net/manual/en/book.curl.php), although you can use your own non-cURL client if you prefer
29
-- [`json`](https://secure.php.net/manual/en/book.json.php)
30
-- [`mbstring`](https://secure.php.net/manual/en/book.mbstring.php) (Multibyte String)
31
-
32
-Composer will handle these dependencies. If you install manually, you'll want to make sure that these extensions are available.
33
-
34
-
35
-Getting Started
36
-
37
-Basic example:
38
-
39
-```php
40
-use Telnyx;
41
-
42
-Telnyx\Telnyx::setApiKey('sk_test_BQokikJOvBiI2HlWgH4olfQ2');
43
-$order = Telnyx\NumberOrder::create(['phone_number' => '+18665552368']);
44
-echo $order;
45
-```
46
-
47
-
48
-Documentation
49
-
50
-Please see https://developers.telnyx.com/docs/api/v2/overview for up-to-date documentation.
51
-
52
-
53
-Custom Request Timeouts
54
-
55
-To modify request timeouts (connect or total, in seconds) you'll need to tell the API client to use a CurlClient other than its default. You'll set the timeouts in that CurlClient.
56
-
57
-```php
58
-use Telnyx;
59
-
60
-// set up your tweaked Curl client
61
-$curl = new Telnyx\HttpClient\CurlClient();
62
-$curl->setTimeout(10); // default is Telnyx\HttpClient\CurlClient::DEFAULT_TIMEOUT
63
-$curl->setConnectTimeout(5); // default is Telnyx\HttpClient\CurlClient::DEFAULT_CONNECT_TIMEOUT
64
-
65
-echo $curl->getTimeout(); // 10
66
-echo $curl->getConnectTimeout(); // 5
67
-
68
-// tell Telnyx to use the tweaked client
69
-Telnyx\ApiRequestor::setHttpClient($curl);
70
-
71
-// use the Telnyx API client as you normally would
72
-```
73
-
74
-
75
-Custom cURL Options (proxies)
76
-
77
-Need to set a proxy for your requests? Pass in the requisite `CURLOPT_*` array to the CurlClient constructor, using the same syntax as `curl_stopt_array()`. This will set the default cURL options for each HTTP request made by the SDK, though many more common options (e.g. timeouts; see above on how to set those) will be overridden by the client even if set here.
78
-
79
-```php
80
-use Telnyx;
81
-
82
-// set up your tweaked Curl client
83
-$curl = new Telnyx\HttpClient\CurlClient([CURLOPT_PROXY => 'proxy.local:80']);
84
-// tell Telnyx to use the tweaked client
85
-Telnyx\ApiRequestor::setHttpClient($curl);
86
-```
87
-
88
-Alternately, a callable can be passed to the CurlClient constructor that returns the above array based on request inputs. See `testDefaultOptions()` in `tests/CurlClientTest.php` for an example of this behavior. Note that the callable is called at the beginning of every API request, before the request is sent.
89
-
90
-
91
-Configuring a Logger
92
-
93
-The library does minimal logging, but it can be configured
94
-with a [`PSR-3` compatible logger][psr3] so that messages
95
-end up there instead of `error_log`:
96
-
97
-```php
98
-use Telnyx;
99
-
100
-Telnyx\Telnyx::setLogger($logger);
101
-```
102
-
103
-
104
-Accessing Response Data
105
-
106
-You can access the data from the last API response on any object via `getLastResponse()`.
107
-
108
-```php
109
-use Telnyx;
110
-
111
-$order = Telnyx\NumberOrder::create(['phone_number' => '+18665552368']);
112
-echo $order->getLastResponse()->headers['Request-Id'];
113
-```
114
-
115
-
116
-SSL / TLS Compatibility issues
117
-
118
-Telnyx's API now requires that all connections use TLS 1.2. Some systems (most notably some older CentOS and RHEL versions) are capable of using TLS 1.2 but will use TLS 1.0 or 1.1 by default.
119
-
120
-The recommended course of action is to upgrade your cURL and OpenSSL packages so that TLS 1.2 is used by default, but if that is not possible, you might be able to solve the issue by setting the `CURLOPT_SSLVERSION` option to either `CURL_SSLVERSION_TLSv1` or `CURL_SSLVERSION_TLSv1_2`:
121
-
122
-```php
123
-use Telnyx;
124
-
125
-$curl = new Telnyx\HttpClient\CurlClient([CURLOPT_SSLVERSION => CURL_SSLVERSION_TLSv1]);
126
-Telnyx\ApiRequestor::setHttpClient($curl);
127
-```
128
-
129
-
130
-Per-request Configuration
131
-
132
-For apps that need to use multiple keys during the lifetime of a process it's also possible to set a
133
-per-request key and/or account:
134
-
135
-```php
136
-use Telnyx;
137
-
138
-Telnyx\NumberOrder::all([], [
139
-    'api_key' => 'sk_test_...'
140
-]);
141
-
142
-Telnyx\NumberOrder::retrieve("ch_18atAXCdGbJFKhCuBAa4532Z", [
143
-    'api_key' => 'sk_test_...'
144
-]);
145
-```
146
-
147
-
148
-Automatic Retries
149
-
150
-The library can be configured to automatically retry requests that fail due to
151
-an intermittent network problem:
152
-
153
-```php
154
-use Telnyx;
155
-
156
-Telnyx\Telnyx::setMaxNetworkRetries(2);
157
-```
158
-
159
-Idempotency keys are added to requests to guarantee that
160
-retries are safe.
161
-
162
-
163
-Development
164
-
165
-Unit tests rely on a mock server so all unit tests are ran through 
166
-docker.  To run all unit tests execute:
167
-
168
-```
169
-docker-compose run --rm php composer test
170
-```
171
-
172
-Running unit tests with code coverage requires you build the docker
173
-container with XDEBUG=1
174
-
175
-```
176
-docker-compose build --build-arg XDEBUG=1
177
-```
178
-
179
-then run the unit tests as 
180
-
181
-```
182
-docker-compose run --rm php composer test-coverage
183
-```
184
-
185
-
186
-Plugin Developers
187
-
188
-Are you writing a plugin that integrates Telnyx and embeds our library? Then please use the `setAppInfo` function to identify your plugin. For example:
189
-
190
-```php
191
-use Telnyx;
192
-
193
-Telnyx\Telnyx::setAppInfo("MyCustomPlugin", "1.2.3", "https://customplugin.yoursite.com");
194
-```
195
-
196
-The method should be called once before any request is sent to the API. The second and third parameters are optional.
197
-
198
-
199
-SSL / TLS Configuration Option
200
-
201
-See the "SSL / TLS compatibility issues" paragraph above for full context. If you want to 
202
-ensure that your plugin can be used on all systems, you should add a configuration option 
203
-to let your users choose between different values for 
204
-`CURLOPT_SSLVERSION`: none (default), `CURL_SSLVERSION_TLSv1` and `CURL_SSLVERSION_TLSv1_2`.
205
-
206
-
207
-Acknowledgments
208
-
209
-The contributors and maintainers of Telnyx PHP would like to extend their deep gratitude 
210
-to the authors of [Stripe PHP][stripe-php], upon which this project is based. Thank you 
211
-for developing such elegant, usable, and extensible code and for sharing it with the community.
212
-
213
-[stripe-php]: https://github.com/stripe/stripe-php
214
-[composer]: https://getcomposer.org/
215
-[curl]: http://curl.haxx.se/docs/caextract.html
216
-[psr3]: http://www.php-fig.org/psr/psr-3/
217
-
Browse code

Created repository.

DoubleBastionAdmin authored on 01/03/2022 23:47:00
Showing 1 changed files
1 1
new file mode 100644
... ...
@@ -0,0 +1,233 @@
1
+Telnyx PHP SDK
2
+--------------
3
+
4
+[![Build Status](https://travis-ci.org/team-telnyx/telnyx-php.svg?branch=master)](https://travis-ci.org/team-telnyx/telnyx-php)
5
+[![Latest Stable Version](https://poser.pugx.org/telnyx/telnyx-php/v/stable.svg)](https://packagist.org/packages/telnyx/telnyx-php)
6
+[![Total Downloads](https://poser.pugx.org/telnyx/telnyx-php/downloads.svg)](https://packagist.org/packages/telnyx/telnyx-php)
7
+[![License](https://poser.pugx.org/telnyx/telnyx-php/license.svg)](https://packagist.org/packages/telnyx/telnyx-php)
8
+[![Code Coverage](https://coveralls.io/repos/github/team-telnyx/telnyx-php/badge.svg?branch=master&)](https://coveralls.io/github/team-telnyx/telnyx-php?branch=master&)
9
+
10
+You can sign up for a Telnyx account at [telnyx.com](https://telnyx.com).
11
+
12
+
13
+Installation
14
+------------
15
+
16
+This library supports PHP 5.6 and above.
17
+
18
+Installation of this module uses composer. For composer documentation, please refer to
19
+[getcomposer.org](http://getcomposer.org/).
20
+
21
+```bash
22
+$ composer require team-telnyx/telnyx-php
23
+```
24
+
25
+
26
+Dependencies
27
+------------
28
+
29
+Some PHP extensions are required:
30
+
31
+- [`curl`](https://secure.php.net/manual/en/book.curl.php), although you can use your own non-cURL client if you prefer
32
+- [`json`](https://secure.php.net/manual/en/book.json.php)
33
+- [`mbstring`](https://secure.php.net/manual/en/book.mbstring.php) (Multibyte String)
34
+
35
+Composer will handle these dependencies. If you install manually, you'll want to make sure that these extensions are available.
36
+
37
+
38
+Getting Started
39
+---------------
40
+
41
+Basic example:
42
+
43
+```php
44
+use Telnyx;
45
+
46
+Telnyx\Telnyx::setApiKey('sk_test_BQokikJOvBiI2HlWgH4olfQ2');
47
+$order = Telnyx\NumberOrder::create(['phone_number' => '+18665552368']);
48
+echo $order;
49
+```
50
+
51
+
52
+Documentation
53
+-------------
54
+
55
+Please see https://developers.telnyx.com/docs/api/v2/overview for up-to-date documentation.
56
+
57
+
58
+Custom Request Timeouts
59
+-----------------------
60
+
61
+To modify request timeouts (connect or total, in seconds) you'll need to tell the API client to use a CurlClient other than its default. You'll set the timeouts in that CurlClient.
62
+
63
+```php
64
+use Telnyx;
65
+
66
+// set up your tweaked Curl client
67
+$curl = new Telnyx\HttpClient\CurlClient();
68
+$curl->setTimeout(10); // default is Telnyx\HttpClient\CurlClient::DEFAULT_TIMEOUT
69
+$curl->setConnectTimeout(5); // default is Telnyx\HttpClient\CurlClient::DEFAULT_CONNECT_TIMEOUT
70
+
71
+echo $curl->getTimeout(); // 10
72
+echo $curl->getConnectTimeout(); // 5
73
+
74
+// tell Telnyx to use the tweaked client
75
+Telnyx\ApiRequestor::setHttpClient($curl);
76
+
77
+// use the Telnyx API client as you normally would
78
+```
79
+
80
+
81
+Custom cURL Options (proxies)
82
+-----------------------------
83
+
84
+Need to set a proxy for your requests? Pass in the requisite `CURLOPT_*` array to the CurlClient constructor, using the same syntax as `curl_stopt_array()`. This will set the default cURL options for each HTTP request made by the SDK, though many more common options (e.g. timeouts; see above on how to set those) will be overridden by the client even if set here.
85
+
86
+```php
87
+use Telnyx;
88
+
89
+// set up your tweaked Curl client
90
+$curl = new Telnyx\HttpClient\CurlClient([CURLOPT_PROXY => 'proxy.local:80']);
91
+// tell Telnyx to use the tweaked client
92
+Telnyx\ApiRequestor::setHttpClient($curl);
93
+```
94
+
95
+Alternately, a callable can be passed to the CurlClient constructor that returns the above array based on request inputs. See `testDefaultOptions()` in `tests/CurlClientTest.php` for an example of this behavior. Note that the callable is called at the beginning of every API request, before the request is sent.
96
+
97
+
98
+Configuring a Logger
99
+--------------------
100
+
101
+The library does minimal logging, but it can be configured
102
+with a [`PSR-3` compatible logger][psr3] so that messages
103
+end up there instead of `error_log`:
104
+
105
+```php
106
+use Telnyx;
107
+
108
+Telnyx\Telnyx::setLogger($logger);
109
+```
110
+
111
+
112
+Accessing Response Data
113
+-----------------------
114
+
115
+You can access the data from the last API response on any object via `getLastResponse()`.
116
+
117
+```php
118
+use Telnyx;
119
+
120
+$order = Telnyx\NumberOrder::create(['phone_number' => '+18665552368']);
121
+echo $order->getLastResponse()->headers['Request-Id'];
122
+```
123
+
124
+
125
+SSL / TLS Compatibility issues
126
+------------------------------
127
+
128
+Telnyx's API now requires that all connections use TLS 1.2. Some systems (most notably some older CentOS and RHEL versions) are capable of using TLS 1.2 but will use TLS 1.0 or 1.1 by default.
129
+
130
+The recommended course of action is to upgrade your cURL and OpenSSL packages so that TLS 1.2 is used by default, but if that is not possible, you might be able to solve the issue by setting the `CURLOPT_SSLVERSION` option to either `CURL_SSLVERSION_TLSv1` or `CURL_SSLVERSION_TLSv1_2`:
131
+
132
+```php
133
+use Telnyx;
134
+
135
+$curl = new Telnyx\HttpClient\CurlClient([CURLOPT_SSLVERSION => CURL_SSLVERSION_TLSv1]);
136
+Telnyx\ApiRequestor::setHttpClient($curl);
137
+```
138
+
139
+
140
+Per-request Configuration
141
+-------------------------
142
+
143
+For apps that need to use multiple keys during the lifetime of a process it's also possible to set a
144
+per-request key and/or account:
145
+
146
+```php
147
+use Telnyx;
148
+
149
+Telnyx\NumberOrder::all([], [
150
+    'api_key' => 'sk_test_...'
151
+]);
152
+
153
+Telnyx\NumberOrder::retrieve("ch_18atAXCdGbJFKhCuBAa4532Z", [
154
+    'api_key' => 'sk_test_...'
155
+]);
156
+```
157
+
158
+
159
+Automatic Retries
160
+-----------------
161
+
162
+The library can be configured to automatically retry requests that fail due to
163
+an intermittent network problem:
164
+
165
+```php
166
+use Telnyx;
167
+
168
+Telnyx\Telnyx::setMaxNetworkRetries(2);
169
+```
170
+
171
+Idempotency keys are added to requests to guarantee that
172
+retries are safe.
173
+
174
+
175
+Development
176
+-----------
177
+
178
+Unit tests rely on a mock server so all unit tests are ran through 
179
+docker.  To run all unit tests execute:
180
+
181
+```
182
+docker-compose run --rm php composer test
183
+```
184
+
185
+Running unit tests with code coverage requires you build the docker
186
+container with XDEBUG=1
187
+
188
+```
189
+docker-compose build --build-arg XDEBUG=1
190
+```
191
+
192
+then run the unit tests as 
193
+
194
+```
195
+docker-compose run --rm php composer test-coverage
196
+```
197
+
198
+
199
+Plugin Developers
200
+-----------------
201
+
202
+Are you writing a plugin that integrates Telnyx and embeds our library? Then please use the `setAppInfo` function to identify your plugin. For example:
203
+
204
+```php
205
+use Telnyx;
206
+
207
+Telnyx\Telnyx::setAppInfo("MyCustomPlugin", "1.2.3", "https://customplugin.yoursite.com");
208
+```
209
+
210
+The method should be called once before any request is sent to the API. The second and third parameters are optional.
211
+
212
+
213
+SSL / TLS Configuration Option
214
+------------------------------
215
+
216
+See the "SSL / TLS compatibility issues" paragraph above for full context. If you want to 
217
+ensure that your plugin can be used on all systems, you should add a configuration option 
218
+to let your users choose between different values for 
219
+`CURLOPT_SSLVERSION`: none (default), `CURL_SSLVERSION_TLSv1` and `CURL_SSLVERSION_TLSv1_2`.
220
+
221
+
222
+Acknowledgments
223
+---------------
224
+
225
+The contributors and maintainers of Telnyx PHP would like to extend their deep gratitude 
226
+to the authors of [Stripe PHP][stripe-php], upon which this project is based. Thank you 
227
+for developing such elegant, usable, and extensible code and for sharing it with the community.
228
+
229
+[stripe-php]: https://github.com/stripe/stripe-php
230
+[composer]: https://getcomposer.org/
231
+[curl]: http://curl.haxx.se/docs/caextract.html
232
+[psr3]: http://www.php-fig.org/psr/psr-3/
233
+