Skip to content

Commit

Permalink
Merge pull request #11 from zoho/beta
Browse files Browse the repository at this point in the history
5.0.0
  • Loading branch information
raja-7453 authored Jul 27, 2024
2 parents d6529df + 8d20809 commit 311e56e
Show file tree
Hide file tree
Showing 1,588 changed files with 154,908 additions and 4 deletions.
10 changes: 7 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,10 @@ License


## Latest Version

- [5.0.0](/versions/5.0.0/README.md)
- Handled Record `rollup_summary` datatype.

- [4.0.0](/versions/4.0.0/README.md)
- Supported multiple field update operations in the FieldsOperations class.

Expand Down Expand Up @@ -69,10 +73,10 @@ For older versions, please [refer](https://github.com/zoho/zohocrm-php-sdk-6.0/r

## Including the SDK in your project
You can include the SDK to your project using Composer.
For installing the latest [version](https://github.com/zoho/zohocrm-php-sdk-6.0/releases/tag/4.0.0) of PHP SDK, navigate to the workspace of your client app and run the following command.
For installing the latest [version](https://github.com/zoho/zohocrm-php-sdk-6.0/releases/tag/5.0.0) of PHP SDK, navigate to the workspace of your client app and run the following command.

```sh
composer require zohocrm/php-sdk-6.0:4.0.0
composer require zohocrm/php-sdk-6.0:5.0.0
```
With this, the PHP SDK will be installed and a package named vendor will be created in the workspace of your client app.

Expand All @@ -91,4 +95,4 @@ For example, if you generate the tokens for your Sandbox environment in the CN d
---

For more details, kindly refer here. [here](/versions/4.0.0/README.md).
For more details, kindly refer here. [here](/versions/5.0.0/README.md).
3 changes: 2 additions & 1 deletion src/com/zoho/crm/api/util/Constants.php
Original file line number Diff line number Diff line change
Expand Up @@ -257,7 +257,7 @@ class Constants
const SET_API_URL_EXCEPTION = "Exception in setting API URL";
const AUTHENTICATION_EXCEPTION = "Exception in authenticating current request : ";
const FORM_REQUEST_EXCEPTION = "Exception in forming request body : ";
const SDK_VERSION = "4.0.0";
const SDK_VERSION = "5.0.0";
const API_CALL_EXCEPTION = "Exception in current API call execution : ";
const HTTP = "http";
const CONTENT_API_URL = "content.zohoapis.com";
Expand Down Expand Up @@ -323,6 +323,7 @@ class Constants
const CALL_DURATION = "Call_Duration";
const PRIMARY_KEY_ERROR = "Value null or missing for required key(s) : ";
const FORMULA = "formula";
const ROLLUP_SUMMARY = "rollup_summary";
const PICKLIST = "picklist";
const NULL_VALUE = "null";
const UNSUPPORTED_IN_API = "API UNSUPPORTED OPERATION";
Expand Down
15 changes: 15 additions & 0 deletions src/com/zoho/crm/api/util/Utility.php
Original file line number Diff line number Diff line change
Expand Up @@ -764,6 +764,21 @@ public static function setDataType($fieldDetail, $field, $moduleAPIName)
}
$fieldDetail[Constants::READ_ONLY] = true;
}
else if(strtolower($apiType) == Constants::ROLLUP_SUMMARY)
{
if($field->getRollupSummary() != null)
{
$returnType = $field->getRollupSummary()->getReturnType();
if($returnType != null && array_key_exists($returnType, Utility::$apiTypeVsDataType) && Utility::$apiTypeVsDataType[$returnType] != null)
{
$fieldDetail[Constants::TYPE] = Utility::$apiTypeVsDataType[$returnType];
}
else if($field->getJsonType() != null && array_key_exists($field->getJsonType(), Utility::$apiTypeVsDataType) && Utility::$apiTypeVsDataType[$field->getJsonType()] != null)
{
$fieldDetail[Constants::TYPE] = Utility::$apiTypeVsDataType[$field->getJsonType()];
}
}
}
else
{
return;
Expand Down
Loading

0 comments on commit 311e56e

Please sign in to comment.