Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

5.0.0 #11

Merged
merged 1 commit into from
Jul 27, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
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