docusign / docusign-esign-php-client

The Official Docusign PHP Client Library used to interact with the eSign REST API. Send, sign, and approve documents using this client.
https://www.docusign.com/devcenter
MIT License
196 stars 123 forks source link

Empty tabs after upgrading from v4.0 to v5.0 #199

Closed mriotte33 closed 1 year ago

mriotte33 commented 1 year ago

My projet had the docusign process already working, but because of a dependency i had to updrage from the v4.0.0 to v5.7.0 After the upgrade, every document sent to docusign did not have pre filled tabs like it used to. I even lost every tabs on every document. So they were sent empty to docusign.

I checked, there is zero mention of a breaking change to how tabs work in the repo

I used to get all the tabs info like this

        $templateApi = new DocuApi\TemplatesApi($this->apiClient);

        return $templateApi->get($this->accountId, $templateId);

And the signer(s) of the template had every data for every tabs in the (serialized) api response

Now the tabs property on the signers are null.

I did found this

$templateApi = new DocuApi\TemplatesApi($this->apiClient);
 $templateApi->getDocumentTabs($this->accountId, $enveloppe->getDocuments()[0]->getDocumentId(), $templateId);

But it didn't seem to have all the tabs. And if i use it, only some of the tabs will show up when signing the document

How should i do this now ? i don't understand

mriotte33 commented 1 year ago

Ok i found my way around this issue the code i needed was

$templateApi = new DocuSign\eSign\Api\TemplatesApi($this->apiClient);
$signer->setTabs($templateApi->listTabs($this->accountId, $signer->getRecipientId(), $templateId););

But it should be in the changelog + breaking change that the tabs are no longer serialized when fetching a template with the templateApi