Skip to content

Commit

Permalink
Merge branch 'feat-add-region-to-sms-gs' of https://github.com/sinch/…
Browse files Browse the repository at this point in the history
…sinch-sdk-java-quickstart into feat-add-region-to-sms-gs
  • Loading branch information
alex-sberna committed Aug 1, 2024
2 parents 40725c9 + 58c44ce commit fb8c520
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,6 @@ public SinchClient sinchClient() {
if (!StringUtil.isEmpty(projectId)) {
builder.setProjectId(projectId);
}

if (!StringUtil.isEmpty(keyId)) {
builder.setKeyId(keyId);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@
import com.sinch.sdk.domains.sms.BatchesService;
import com.sinch.sdk.domains.sms.models.InboundText;
import com.sinch.sdk.domains.sms.models.requests.SendSmsBatchTextRequest;
import com.sinch.sdk.domains.sms.models.webhooks.WebhooksEvent;
import java.util.Collections;
import java.util.logging.Logger;
import org.springframework.stereotype.Component;
Expand All @@ -21,10 +20,11 @@ public ServerBusinessLogic(SinchClient sinchClient) {
private static final Logger LOGGER = Logger.getLogger(ServerBusinessLogic.class.getName());

public void processInboundEvent(InboundText event) {

LOGGER.info("Handle event: " + event);

SendSmsBatchTextRequest smsRequest = SendSmsBatchTextRequest.builder()
SendSmsBatchTextRequest smsRequest =
SendSmsBatchTextRequest.builder()
.setTo(Collections.singletonList(event.getFrom()))
.setBody("You sent: " + event.getBody())
.setFrom(event.getTo())
Expand All @@ -34,5 +34,4 @@ public void processInboundEvent(InboundText event) {

batches.send(smsRequest);
}

}
Original file line number Diff line number Diff line change
Expand Up @@ -18,4 +18,4 @@ credentials:
sms:
# Sets the region for SMS
# valid values are US and EU
region:
region:

0 comments on commit fb8c520

Please sign in to comment.