loopline-systems / closeio-api-wrapper

PHP Wrapper to use the Close.io API
MIT License
14 stars 15 forks source link

getData() returns call to undefined method /Lead::getData() #25

Closed phillypro closed 7 years ago

phillypro commented 7 years ago

as of the last two weeks

an error has popped up i redownloaded the package to get any updates you might have added

$response     = $leadsApi->addLead($lead);
$responsedata = $response->getData();

using getData() is throwing an undefined method error.....even tho i see the function in the CloseIoRequest.php

audvin commented 7 years ago

I see the same new error here. True for both $response->getData(); and $response->getRawData().

Downgrading to v0.3.3 fixed the issue.

phillypro commented 7 years ago

Yea its crippled me

On Dec 23, 2016 6:17 PM, "Audun Utengen" notifications@github.com wrote:

I see the same new error here. True for both $response->getData(); and $response->getRawData()

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/loopline-systems/closeio-api-wrapper/issues/25#issuecomment-269055790, or mute the thread https://github.com/notifications/unsubscribe-auth/AHq0Hhu8ZOSZjeSov8gLECvmFCqnrTJmks5rLFadgaJpZM4KzIe0 .

null9beta commented 7 years ago

@phillypro @audvin hey guys, sry for the late reply. Due to the christmas break we all were at our families i guess and hope :)

We gonna look into the report as soon as possible. I`ll updated you here when we found the issue.

mickadoo commented 7 years ago

@phillypro With the release of v0.4 @marczahn changed $leadsApi->addLead($lead) to return an instance of a Lead instead of a CloseIoResponse.

This was the right thing to do in my opinion because all other methods in the LeadApi return either a Lead or an array of Leads and returning a CloseIoResponse for just one is inconsistent.

Sorry for the breaking changes, but hopefully we'll have a more consistent interface throughout the wrapper in the future.