-
Notifications
You must be signed in to change notification settings - Fork 59
Open
Description
I have found that the Request Bodies don't consider the custom Fields. In my Opinion you should add the custom fields as property to the requests, so that when using the proper Object Oriented Syntax everything works as expected, because when I use an Array instead of the specific Class everything works. (but took me a while to debug this)
Here is an example:
$organization_request_body = new \Pipedrive\versions\v2\Model\OrganizationRequestBody(['custom_fields' => ['42[random]asl' => 'dummy', '57[random]asl' => 137]);
$result = $apiInstance->updateOrganization($id, $organization_request_body);
print_r($result); // -> success, but custom fields did not change
$organization_request_body = ['custom_fields' => ['42[random]asl' => 'dummy', '57[random]asl' => 137]; //standard array
$result = $apiInstance->updateOrganization($id, $organization_request_body);
print_r($result); // -> success and custom fields did change
Kind regards,
Christian
PS: Also it would make sense for me to return the updated Custom Fields in the response... (this would allow a validation/test...)
Metadata
Metadata
Assignees
Labels
No labels