pipedrive / client-php

Pipedrive API client for PHP
MIT License
48 stars 55 forks source link

missing 1 parameter lead_id on ActivitiesController #85

Closed kopigreenx closed 4 months ago

kopigreenx commented 1 year ago

current version missing 'lead_id' => $this->val($options, 'leadId')

$_parameters = array (
            'subject'      => $this->val($options, 'subject'),
            'type'         => $this->val($options, 'type'),
            'done'         => APIHelper::prepareFormFields($this->val($options, 'done')),
            'due_date'     => DateTimeHelper::toSimpleDate($this->val($options, 'dueDate')),
            'due_time'     => $this->val($options, 'dueTime'),
            'duration'     => $this->val($options, 'duration'),
            'user_id'      => $this->val($options, 'userId'),
            'deal_id'      => $this->val($options, 'dealId'),
            'person_id'    => $this->val($options, 'personId'),
            'participants' => $this->val($options, 'participants'),
            'org_id'       => $this->val($options, 'orgId'),
            'note'         => $this->val($options, 'note'),
            'busy_flag'    => $this->val($options, 'busyFlag')
        );

i expected same with API documentation on pipedrive addActivity documentation

$_parameters = array (
            'subject'      => $this->val($options, 'subject'),
            'type'         => $this->val($options, 'type'),
            'done'         => APIHelper::prepareFormFields($this->val($options, 'done')),
            'due_date'     => DateTimeHelper::toSimpleDate($this->val($options, 'dueDate')),
            'due_time'     => $this->val($options, 'dueTime'),
            'duration'     => $this->val($options, 'duration'),
            'user_id'      => $this->val($options, 'userId'),
            'deal_id'      => $this->val($options, 'dealId'),
            'lead_id'.     => $this->val($options, 'leadId'), // ====> ADD LEAD ID HERE
            'person_id'    => $this->val($options, 'personId'),
            'participants' => $this->val($options, 'participants'),
            'org_id'       => $this->val($options, 'orgId'),
            'note'         => $this->val($options, 'note'),
            'busy_flag'    => $this->val($options, 'busyFlag')
        );
bashmach commented 1 year ago

Hi,

Thank you for reporting the issue 👍

I'd recommend you to take a look into next version of client as it has built-in Leads API support. https://developers.pipedrive.com/changelog/post/major-upgrade-for-the-php-client Currently it's beta, but we're planning to release new major client update next month.

Let me know if you have any questions.