Closed jackjwatts closed 9 months ago
Hey @jackjwatts 👋
Actually that's by design. If you look at the API docs for GET Conversation you'll see that the API only returns the customer email as a string (e.g. "xyz@test.com"
), so we can only populate the Email::$value
property.
If you want all the data about the customer emails, then you'll need to make another request to the GET Customer endpoint. You can do it explicitly like in your workaround, although probably a better option is passing a ConversationRequest
object, like:
$conversationRequest = new ConversationRequest();
$conversationRequest->withPrimaryCustomer();
$conversation = $client->conversations()->get($conversationId, $conversationRequest);
This will automatically make another request to GET Customer for you behind the scenes.
Hope this helps!
Thank you for taking the time to submit an issue with all the details shown below. Our engineering team monitors issues submitted and strives to respond with 1-2 business days.
Current behavior calling
does not return the ids of the emails. To get around this I'm having to do
Expected behavior calling $conversation->getCustomer()->getEmails() would return the ids of the emails.
Steps to reproduce