Skip to content

Commit

Permalink
Merge pull request #67 from sinch/DEVEXP-312-rename-getNumbers-to-lis…
Browse files Browse the repository at this point in the history
…tNumbers

refactor: Rename voice.applications.getNumbers to voice.applications.listNumbers
  • Loading branch information
JPPortier authored Mar 18, 2024
2 parents 43b990f + d70a07d commit 06b2b5c
Show file tree
Hide file tree
Showing 5 changed files with 9 additions and 9 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ public interface ApplicationsService {
* @return Your numbers
* @since 1.0
*/
AssignedNumbers getNumbers();
AssignedNumbers listNumbers();

/**
* Returns any callback URLs configured for the specified application
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ protected ApplicationsApi getApi() {
return this.api;
}

public AssignedNumbers getNumbers() {
public AssignedNumbers listNumbers() {

return ApplicationsDtoConverter.convert(getApi().configurationGetNumbers());
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ void getNumbers() throws ApiException {

when(api.configurationGetNumbers()).thenReturn(ApplicationsGetNumbersResponseDtoTest.expected);

AssignedNumbers response = service.getNumbers();
AssignedNumbers response = service.listNumbers();

Assertions.assertThat(response)
.usingRecursiveComparison()
Expand Down
2 changes: 1 addition & 1 deletion sample-app/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -135,7 +135,7 @@ See https://developers.sinch.com for details about these parameters
| | Update | [com.sinch.sample.voice.calls.Update](src/main/java/com/sinch/sample/voice/calls/Update.java) | Require `CONFERENCE_ID` & `CALL_ID` parameters |
| | ManageWithCallLeg | [com.sinch.sample.voice.calls.ManageWithCallLeg](src/main/java/com/sinch/sample/voice/calls/ManageWithCallLeg.java) | Require `CONFERENCE_ID` & `CALL_ID` parameters |
| Applications | GetCallbackUrls | [com.sinch.sample.voice.applications.GetCallbackUrls](src/main/java/com/sinch/sample/voice/applications/GetCallbackUrls.java) | Require `APPLICATION_API_KEY` parameter |
| | GetNumbers | [com.sinch.sample.voice.applications.GetNumbers](src/main/java/com/sinch/sample/voice/applications/GetNumbers.java) | |
| | GetNumbers | [com.sinch.sample.voice.applications.ListNumbers](src/main/java/com/sinch/sample/voice/applications/GetNumbers.java) | |
| | QueryNumber | [com.sinch.sample.voice.applications.QueryNumber](src/main/java/com/sinch/sample/voice/applications/QueryNumber.java) | Require `PHONE_NUMBER` parameter |
| | UnassignNumber | [com.sinch.sample.voice.applications.UnassignNumber](src/main/java/com/sinch/sample/voice/applications/UnassignNumber.java) | Require `APPLICATION_API_KEY` & `PHONE_NUMBER` parameters |
| | UpdateCallbackUrls | [com.sinch.sample.voice.applications.UpdateCallbackUrls](src/main/java/com/sinch/sample/voice/applications/UpdateCallbackUrls.java) | Require `APPLICATION_API_KEY` parameter |
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,15 +4,15 @@
import java.io.IOException;
import java.util.logging.Logger;

public class GetNumbers extends BaseApplication {
public class ListNumbers extends BaseApplication {

private static final Logger LOGGER = Logger.getLogger(GetNumbers.class.getName());
private static final Logger LOGGER = Logger.getLogger(ListNumbers.class.getName());

public GetNumbers() throws IOException {}
public ListNumbers() throws IOException {}

public static void main(String[] args) {
try {
new GetNumbers().run();
new ListNumbers().run();
} catch (Exception e) {
LOGGER.severe(e.getMessage());
e.printStackTrace();
Expand All @@ -23,7 +23,7 @@ public void run() {

LOGGER.info("Get assigned numbers");

var response = client.voice().applications().getNumbers();
var response = client.voice().applications().listNumbers();

LOGGER.info("Response: " + response);
}
Expand Down

0 comments on commit 06b2b5c

Please sign in to comment.