Skip to content

[BUG] Text Omission in Message #26

Description

@onyijne

Describe the bug
The final class Infobip\Resources\SMS\Models\Message has a missing property named text as seen at https://www.infobip.com/docs/api/channels/sms/outbound-sms/send-sms-message

To Reproduce
Steps to reproduce the behavior:

  <?  php

    use Infobip\InfobipClient;
    use Infobip\Resources\SMS\Models\Destination;
    use Infobip\Resources\SMS\Models\Message;
    use Infobip\Resources\SMS\SendSMSMessageResource;

     $cli = new InfobipClient(config('infobip.api_key'), config('infobip.base_url'), config('infobip.timeout'));
      $resource = new SendSMSMessageResource();
      $resource->addMessage((new Message())->addDestination(new Destination($this->to)));
      $response = $cli->SMS()->sendSMSMessage($resource);

No method to add text, only binary is provided for.

Expected behavior
An addText() method should be added like this:

 <?  php
     use Infobip\InfobipClient;
      use Infobip\Resources\SMS\Models\Destination;
      use Infobip\Resources\SMS\Models\Message;
      use Infobip\Resources\SMS\SendSMSMessageResource;

     $cli = new InfobipClient(config('infobip.api_key'), config('infobip.base_url'), config('infobip.timeout'));
      $resource = new SendSMSMessageResource();
      $resource->addMessage((new Message())->addDestination(new Destination($this->to))->addText($$this->message));
      $response = $cli->SMS()->sendSMSMessage($resource);

Screenshots
image

Additional context
Add any other context about the problem here.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

bugSomething isn't working

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions