Interface GroupsService
-
public interface GroupsServiceGroups ServiceA group is a set of phone numbers (or MSISDNs) that can be used as a target when sending an SMS. An phone number (MSISDN) can only occur once in a group and any attempts to add a duplicate are ignored but not rejected.
- Since:
- 1.0
- See Also:
- https://developers.sinch.com/docs/sms/api-reference/sms/tag/Groups
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description Groupcreate()Groupcreate(GroupCreateRequestParameters parameters)Create a groupvoiddelete(String groupId)Delete a groupGroupget(String groupId)Retrieve a groupGroupsListResponselist()GroupsListResponselist(GroupsListRequestParameters parameters)List GroupsCollection<String>listMembers(String groupId)Get phone numbers for a groupGroupreplace(String groupId, GroupReplaceRequestParameters parameters)Replace a groupGroupupdate(String groupId, GroupUpdateRequestParameters parameters)Update a group
-
-
-
Method Detail
-
get
Group get(String groupId) throws ApiException
Retrieve a groupThis operation retrieves a specific group with the provided group ID.
- Parameters:
groupId- The inbound ID found when listing inbound messages- Returns:
- Group associated to groupId
- Throws:
ApiException- Since:
- 1.0
- See Also:
- https://developers.sinch.com/docs/sms/api-reference/sms/tag/Groups/#tag/Groups/operation/RetrieveGroup
-
create
Group create(GroupCreateRequestParameters parameters) throws ApiException
Create a groupA group is a set of phone numbers (MSISDNs) that can be used as a target in the
send_batch_msgoperation. An MSISDN can only occur once in a group and any attempts to add a duplicate would be ignored but not rejected.- Parameters:
parameters- Parameters to be used to define group onto creation- Returns:
- Created group
- Throws:
ApiException- Since:
- 1.0
- See Also:
- https://developers.sinch.com/docs/sms/api-reference/sms/tag/Groups/#tag/Groups/operation/CreateGroup
-
create
Group create() throws ApiException
- Throws:
ApiException
-
list
GroupsListResponse list(GroupsListRequestParameters parameters) throws ApiException
List GroupsWith the list operation you can list all groups that you have created. This operation supports pagination.
Groups are returned in reverse chronological order.
- Parameters:
parameters- Filtering parameters- Returns:
- group list
- Throws:
ApiException- Since:
- 1.0
- See Also:
- https://developers.sinch.com/docs/sms/api-reference/sms/tag/Groups/#tag/Groups/operation/ListGroups
-
list
GroupsListResponse list() throws ApiException
- Throws:
ApiException
-
replace
Group replace(String groupId, GroupReplaceRequestParameters parameters) throws ApiException
Replace a groupThe replace operation will replace all parameters, including members, of an existing group with new values.
Replacing a group targeted by a batch message scheduled in the future is allowed and changes will be reflected when the batch is sent.
- Parameters:
groupId- ID of a group that you are interested in getting.parameters- Parameters to be replaced for group- Returns:
- Group associated to groupId
- Throws:
ApiException- Since:
- 1.0
- See Also:
- https://developers.sinch.com/docs/sms/api-reference/sms/tag/Groups/#tag/Groups/operation/ReplaceGroup
-
update
Group update(String groupId, GroupUpdateRequestParameters parameters) throws ApiException
Update a group- Parameters:
groupId- ID of a group that you are interested in getting.parameters- Parameters to be used to update group- Returns:
- Modified group associated to groupId
- Throws:
ApiException- Since:
- 1.0
- See Also:
- https://developers.sinch.com/docs/sms/api-reference/sms/tag/Groups/#tag/Groups/operation/UpdateGroup
-
delete
void delete(String groupId) throws ApiException
Delete a group- Parameters:
groupId- ID of a group that you are interested in getting.- Throws:
ApiException- Since:
- 1.0
- See Also:
- https://developers.sinch.com/docs/sms/api-reference/sms/tag/Groups/#tag/Groups/operation/deleteGroup
-
listMembers
Collection<String> listMembers(String groupId) throws ApiException
Get phone numbers for a group- Parameters:
groupId- ID of a group that you are interested in getting.- Throws:
ApiException- Since:
- 1.0
- See Also:
- https://developers.sinch.com/docs/sms/api-reference/sms/tag/Groups/#tag/Groups/operation/deleteGroup
-
-