Skip to content

Commit ebb6b45

Browse files
committed
Handled different field types.
1 parent b4dc871 commit ebb6b45

File tree

5 files changed

+12
-7
lines changed

5 files changed

+12
-7
lines changed

README.md

+1-1
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.0
81+
composer require zohocrm/php-sdk:3.0.1
8282
```
8383

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

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

+1-1
Original file line numberDiff line numberDiff line change
@@ -329,7 +329,7 @@ public function apiCall($className, $encodeType)
329329
}
330330

331331
$converterInstance = $this->getConverterClassInstance(strtolower($responseContentType));
332-
332+
333333
$returnObject = $converterInstance->getWrappedResponse($response[Constants::RESPONSE], $className);
334334

335335
if ($returnObject !== null)

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

+1-1
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.0";
467+
const SDK_VERSION = "3.0.1";
468468

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

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

+7-2
Original file line numberDiff line numberDiff line change
@@ -1103,9 +1103,14 @@ public function buildName($memberName)
11031103

11041104
$sdkName = lcfirst($name[0]);
11051105

1106-
for ($nameIndex = 1; $nameIndex < count($name); $nameIndex ++)
1106+
for ($nameIndex = 1; $nameIndex < count($name); $nameIndex ++)
11071107
{
1108-
$firstLetterUppercase = ucfirst($name[$nameIndex]);
1108+
$firstLetterUppercase = "";
1109+
1110+
if(strlen(($name[$nameIndex])) > 0)
1111+
{
1112+
$firstLetterUppercase = ucfirst($name[$nameIndex]);
1113+
}
11091114

11101115
$sdkName = $sdkName . $firstLetterUppercase;
11111116
}

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

+2-2
Original file line numberDiff line numberDiff line change
@@ -843,13 +843,13 @@ public static function fillDataType()
843843
return;
844844
}
845845

846-
$fieldAPINamesString = ["textarea", "text", "website", "email", "phone", "mediumtext","multiselectlookup", "profileimage"];
846+
$fieldAPINamesString = ["textarea", "text", "website", "email", "phone", "mediumtext","multiselectlookup", "profileimage", "autonumber"];
847847

848848
$fieldAPINamesInteger = ["integer"];
849849

850850
$fieldAPINamesBoolean = ["boolean"];
851851

852-
$fieldAPINamesLong = ["long", "bigint", "autonumber"];
852+
$fieldAPINamesLong = ["long", "bigint"];
853853

854854
$fieldAPINamesDouble = ["double", "percent", "lookup", "currency"];
855855

0 commit comments

Comments
 (0)