Skip to content

Commit 36f62cb

Browse files
authored
Merge pull request #14 from zoho/beta
Modified oauth expiry_time from int to double
2 parents 5684317 + 8f84e05 commit 36f62cb

File tree

7 files changed

+10
-10
lines changed

7 files changed

+10
-10
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,7 @@ You can include the SDK to your project using:
7878
- Run the command below:
7979

8080
```sh
81-
composer require zohocrm/php-sdk:3.0.2
81+
composer require zohocrm/php-sdk:3.0.3
8282
```
8383

8484
- The PHP SDK will be installed and a package named vendor will be created in the workspace of your client app.

composer.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"name" : "zohocrm/php-sdk",
33
"description" : "Zoho CRM API SDK for PHP",
4-
"type" : "SDK",
4+
"type" : "sdk",
55
"homepage": "https://github.com/zoho/zohocrm-php-sdk",
66
"authors" : [
77
{

src/com/zoho/api/authenticator/OAuthToken.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -435,7 +435,7 @@ public function getCurrentTimeInMillis()
435435

436436
public function isAccessTokenExpired($expiry_time)
437437
{
438-
return ((((int)$expiry_time) - $this->getCurrentTimeInMillis()) < 5000);
438+
return ((((double)$expiry_time) - $this->getCurrentTimeInMillis()) < 5000);
439439
}
440440

441441
public function getUrlParamsAsString($urlParams)

src/com/zoho/crm/api/record/RecordOperations.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -320,7 +320,7 @@ public function uploadPhoto(string $id, string $moduleAPIName, FileBodyWrapper
320320
$handlerInstance->setContentType('multipart/form-data');
321321
$handlerInstance->setRequest($request);
322322
$handlerInstance->setMandatoryChecker(true);
323-
Utility::getModules();
323+
Utility::verifyPhotoSupport($moduleAPIName);
324324
return $handlerInstance->apiCall(FileHandler::class, 'application/json');
325325

326326
}

src/com/zoho/crm/api/util/Constants.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -464,7 +464,7 @@ class Constants
464464

465465
const FORM_REQUEST_EXCEPTION = "Exception in forming request body : ";
466466

467-
const SDK_VERSION = "3.0.2";
467+
const SDK_VERSION = "3.0.3";
468468

469469
const API_CALL_EXCEPTION = "Exception in current API call execution : ";
470470

src/com/zoho/crm/api/util/Utility.php

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -510,7 +510,7 @@ public static function getFieldDetails($moduleAPIName)
510510
$fieldsDetails[$field->getAPIName()] = $fieldDetail;
511511
}
512512

513-
if(in_array($moduleAPIName, Constants::INVENTORY_MODULES))
513+
if(strtolower($moduleAPIName) == strtolower(Constants::NOTES))
514514
{
515515
$fieldDetail = array();
516516

@@ -522,7 +522,7 @@ public static function getFieldDetails($moduleAPIName)
522522

523523
$fieldsDetails[Constants::ATTACHMENTS] = $fieldDetail;
524524
}
525-
if(strtolower($moduleAPIName) === strtolower(Constants::NOTES))
525+
if(in_array(strtolower($moduleAPIName), Constants::INVENTORY_MODULES))
526526
{
527527
$fieldDetail = array();
528528

@@ -583,9 +583,9 @@ public static function searchJSONDetails($key)
583583
return null;
584584
}
585585

586-
public static function getModules()
586+
public static function verifyPhotoSupport($moduleAPIName)
587587
{
588-
// self::$apiSupportedModule = count(self::$apiSupportedModule) > 0 ? self::$apiSupportedModule : self::getAllModules(null);
588+
return;
589589
}
590590

591591
private static function getAllModules($header)

src/resources/JSONDetails.json

Lines changed: 1 addition & 1 deletion
Large diffs are not rendered by default.

0 commit comments

Comments
 (0)