- Issue created by @fernly
The API manager currently returns the raw json response. Code could be more robust when returning value objects holding common functionality. There would also be a centralised way of checking missing response data and do error handling.
See issue
#3394527
📌
Add support for "Interest" endpoints, deprecate "Interest label" endpoints
Fixed
as example (InterestCollection and Interest object).
Use the FlexmailApiManager and make a call to getContacts(). The method returns the raw response as an array.
Create the following value objects to be returned in the associated api methods:
FlexmailApiManager::getContacts() returns ContactCollection holding Contact objectsFlexmailApiManager::getContactWithEmail() returns ContactCollection holding Contact objectsFlexmailApiManager::getCustomFields() returns CustomFieldCollection holding CustomField objectsFlexmailApiManager::getSources() returns SourceCollection holding Source objectsFor now I didn't add the deprecated endpoints. They might need to be added as well in case they will be supported for a longer time:
FlexmailApiManager::getPreferences()FlexmailApiManager::getContactPreferenceSubscriptions()FlexmailApiManager::getInterestLabels()FlexmailApiManager::getContactInterestLabels()See proposed solution.
None
Yes. See proposed solution.
None
Active
2.0
Code