Skip to content

Commit eefdc1a

Browse files
author
Sudipto Choudhury
committed
Allow option to set tld property - top level domain com (default), eu, in, com.au for API host
1 parent 3861257 commit eefdc1a

File tree

2 files changed

+46
-36
lines changed

2 files changed

+46
-36
lines changed

CHANGELOG.md

Lines changed: 38 additions & 35 deletions
Original file line numberDiff line numberDiff line change
@@ -1,55 +1,58 @@
11
### Changelog
22

3-
### 0.0.1
4-
- Initial release
5-
- Auto Generated API Description JSON using JSON exported from Postman
3+
### 0.2.3 - 27 March 2020
4+
- Allow option to set `tld` property - top level domain `com` (default), `eu`, `in`, `com.au` for API host
65

7-
### 0.0.2
8-
- Generate and update documentation
6+
### 0.2.2
7+
- Add items to a pending invoice (addInvoiceLineItems)
98

10-
### 0.0.3
11-
- Update API forge version
12-
- Generate and update cleaner documentation
13-
14-
### 0.0.4
15-
- Update API forge version
16-
- Generate and update cleaner documentation
9+
### 0.2.1
10+
- update Api Forge
1711

18-
### 0.0.5
19-
- Generate and update cleaner documentation
12+
### 0.1.7
13+
- Update getPlans function
2014

21-
### 0.0.6
22-
- Generate and update cleaner documentation
15+
### 0.1.4
16+
- Function name updates and inclusion of parmeters
2317

24-
### 0.0.7
25-
- Generate and update cleaner documentation
18+
### 0.1.3
19+
- Function name update for getTransactions
2620

27-
### 0.0.8
28-
- Release help documentation
21+
### 0.1.2
22+
### 0.1.1
23+
- Function name update for cancelSubscription
24+
25+
### 0.1.0
26+
- Update parameter default values fixes
2927

3028
### 0.0.9
3129
- Enhanced API names
3230
- Pass default values in some calls
3331
- Better documentation
3432

35-
### 0.1.0
36-
- Update parameter default values fixes
33+
### 0.0.8
34+
- Release help documentation
3735

38-
### 0.1.1
39-
### 0.1.2
40-
- Function name update for cancelSubscription
36+
### 0.0.7
37+
- Generate and update cleaner documentation
4138

42-
### 0.1.3
43-
- Function name update for getTransactions
39+
### 0.0.6
40+
- Generate and update cleaner documentation
4441

45-
### 0.1.4
46-
- Function name updates and inclusion of parmeters
42+
### 0.0.5
43+
- Generate and update cleaner documentation
4744

48-
### 0.1.7
49-
- Update getPlans function
45+
### 0.0.4
46+
- Update API forge version
47+
- Generate and update cleaner documentation
5048

51-
### 0.2.1
52-
- update Api Forge
49+
### 0.0.3
50+
- Update API forge version
51+
- Generate and update cleaner documentation
52+
53+
### 0.0.2
54+
- Generate and update documentation
5355

54-
### 0.2.2
55-
- Add items to a pending invoice (addInvoiceLineItems)
56+
### 0.0.1
57+
- Initial release
58+
- Auto Generated API Description JSON using JSON exported from Postman

src/zoho/subscriptions/Api.php

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -185,6 +185,7 @@
185185
*/
186186
class Api extends ApiForge
187187
{
188+
protected $loggerFile = __DIR__ . '/zoho-subscriptions-api-calls.log';
188189

189190
protected $DEFAULT_API_JSON_PATH = './config/subscriptions.json';
190191
protected $DEFAULT_SOURCE_JSON_PATH = './config/postman.json';
@@ -193,14 +194,20 @@ class Api extends ApiForge
193194
protected $DEFAULTS = [
194195
'authtoken' => '',
195196
'zohoOrgId' => '',
197+
'tld' => 'com', // eu, in, com.au
196198
'client' => [
197-
'base_uri' => 'https://subscriptions.zoho.com/api/v1/',
199+
'base_uri' => 'https://subscriptions.zoho.{{tld}}/api/v1/',
198200
'verify' => false,
199201
'headers' => [
200202
'Authorization' => 'Zoho-authtoken {{authtoken}}',
201203
'X-com-zoho-subscriptions-organizationid' => "{{zohoOrgId}}",
202204
],
203205
],
206+
'log' => false,
207+
'settings' => [
208+
'responseHandler' => null,
209+
'requestHandler' => null,
210+
],
204211
];
205212

206213

0 commit comments

Comments
 (0)