From 08f014a47a485bf9a607cc8aa44ee426bc9969c9 Mon Sep 17 00:00:00 2001 From: Mark Date: Fri, 18 Aug 2023 20:27:31 -0400 Subject: [PATCH] docs(readme): update code block --- README.md | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 76b4280..2d2acce 100644 --- a/README.md +++ b/README.md @@ -79,10 +79,11 @@ Send a message to your user: ```php use Braze\Braze; +use Braze\Model\MessagesSendPostBody; $braze = new Braze('YOUR_API_URL', 'YOUR_API_KEY'); -$braze->client->postMessagesSend((object) [ +$braze->client->postMessagesSend(new MessagesSendPostBody([ 'external_user_ids' => ['your_external_user_id'], 'messages' => [ 'email' => [ @@ -91,7 +92,7 @@ $braze->client->postMessagesSend((object) [ 'email_template_id' => 'your_email_template_id', ], ], -]); +])); ``` Handle an API error: