Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

refactor: Improve snippet readability #3

Merged
merged 1 commit into from
Jun 6, 2024
Merged

Conversation

JPPortier
Copy link
Contributor

No description provided.

String body = "This is a test SMS message using the Sinch Java SDK.";

LOGGER.info("Sending SMS Text");
BatchText value =
batchesService.send(
SendSmsBatchTextRequest.builder()
.setTo(recipients)
.setTo(Collections.singletonList(recipient))

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Broader question: can we imagine having another method setTo(String phoneNumber) that creates the Collection when the user wants to send a batch for a single recipient (not really a use case for a batch, but in this API, there is no possibility to send a single SMS. The other possibility would be to use the Conversation API but it's huge when your need it to send a SMS to a single recipient).
If we agree on this one, it will be could to implement it on all the SDKs

@JPPortier JPPortier merged commit 357e2ef into main Jun 6, 2024
1 check passed
@JPPortier JPPortier deleted the improve-snippet branch June 6, 2024 09:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants