Weble / ZohoCrmApi

PHP SDK for Zoho CRM API v2
https://weble.github.io/ZohoCrmApi
5 stars 10 forks source link

Undefined property: Webleit\ZohoCrmApi\Client::$leads #96

Open harshvardhanbarhan opened 1 year ago

harshvardhanbarhan commented 1 year ago

I am getting issue like Undefined property: Webleit\ZohoCrmApi\Client::$leads Here is my codebase

$oAuthClient = new \Weble\ZohoClient\OAuthClient(config('zoho.client_id'), config('zoho.client_secret')); $oAuthClient->setRefreshToken(uniqid()); $oAuthClient->setRegion(\Weble\ZohoClient\Enums\Region::IN);

// setup the zoho crm client $client = new \Webleit\ZohoCrmApi\Client($oAuthClient); $client->setMode(\Webleit\ZohoCrmApi\Enums\Mode::PRODUCTION);

$zohoCrm = new \Webleit\ZohoCrmApi\Client($oAuthClient); $leads = $zohoCrm->leads->getList(); dd($leads);

Skullbock commented 1 year ago

Hi! It seems you're missing a step.

After creating Webleit\ZohoCrmApi\Client, you need create

$zoho = Webleit\ZohoCrmApi\ZohoCrm($zohoCrm) and that one has the leads module property