Skip to content

Commit

Permalink
Allow option to set tld property - top level domain com (default)…
Browse files Browse the repository at this point in the history
…, `eu`, `in`, `com.au` for API host
  • Loading branch information
Sudipto Choudhury committed Mar 26, 2020
1 parent 3861257 commit eefdc1a
Show file tree
Hide file tree
Showing 2 changed files with 46 additions and 36 deletions.
73 changes: 38 additions & 35 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,55 +1,58 @@
### Changelog

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

### 0.0.2
- Generate and update documentation
### 0.2.2
- Add items to a pending invoice (addInvoiceLineItems)

### 0.0.3
- Update API forge version
- Generate and update cleaner documentation

### 0.0.4
- Update API forge version
- Generate and update cleaner documentation
### 0.2.1
- update Api Forge

### 0.0.5
- Generate and update cleaner documentation
### 0.1.7
- Update getPlans function

### 0.0.6
- Generate and update cleaner documentation
### 0.1.4
- Function name updates and inclusion of parmeters

### 0.0.7
- Generate and update cleaner documentation
### 0.1.3
- Function name update for getTransactions

### 0.0.8
- Release help documentation
### 0.1.2
### 0.1.1
- Function name update for cancelSubscription

### 0.1.0
- Update parameter default values fixes

### 0.0.9
- Enhanced API names
- Pass default values in some calls
- Better documentation

### 0.1.0
- Update parameter default values fixes
### 0.0.8
- Release help documentation

### 0.1.1
### 0.1.2
- Function name update for cancelSubscription
### 0.0.7
- Generate and update cleaner documentation

### 0.1.3
- Function name update for getTransactions
### 0.0.6
- Generate and update cleaner documentation

### 0.1.4
- Function name updates and inclusion of parmeters
### 0.0.5
- Generate and update cleaner documentation

### 0.1.7
- Update getPlans function
### 0.0.4
- Update API forge version
- Generate and update cleaner documentation

### 0.2.1
- update Api Forge
### 0.0.3
- Update API forge version
- Generate and update cleaner documentation

### 0.0.2
- Generate and update documentation

### 0.2.2
- Add items to a pending invoice (addInvoiceLineItems)
### 0.0.1
- Initial release
- Auto Generated API Description JSON using JSON exported from Postman
9 changes: 8 additions & 1 deletion src/zoho/subscriptions/Api.php
Original file line number Diff line number Diff line change
Expand Up @@ -185,6 +185,7 @@
*/
class Api extends ApiForge
{
protected $loggerFile = __DIR__ . '/zoho-subscriptions-api-calls.log';

protected $DEFAULT_API_JSON_PATH = './config/subscriptions.json';
protected $DEFAULT_SOURCE_JSON_PATH = './config/postman.json';
Expand All @@ -193,14 +194,20 @@ class Api extends ApiForge
protected $DEFAULTS = [
'authtoken' => '',
'zohoOrgId' => '',
'tld' => 'com', // eu, in, com.au
'client' => [
'base_uri' => 'https://subscriptions.zoho.com/api/v1/',
'base_uri' => 'https://subscriptions.zoho.{{tld}}/api/v1/',
'verify' => false,
'headers' => [
'Authorization' => 'Zoho-authtoken {{authtoken}}',
'X-com-zoho-subscriptions-organizationid' => "{{zohoOrgId}}",
],
],
'log' => false,
'settings' => [
'responseHandler' => null,
'requestHandler' => null,
],
];


Expand Down

0 comments on commit eefdc1a

Please sign in to comment.