Skip to content

Commit

Permalink
Deprecate CheckRequest
Browse files Browse the repository at this point in the history
  • Loading branch information
SMadani committed Aug 2, 2024
1 parent f2329e7 commit 0b9ac9b
Show file tree
Hide file tree
Showing 5 changed files with 19 additions and 6 deletions.
10 changes: 10 additions & 0 deletions src/main/java/com/vonage/client/verify/CheckRequest.java
Original file line number Diff line number Diff line change
Expand Up @@ -19,10 +19,18 @@
import java.util.LinkedHashMap;
import java.util.Map;

/**
* Request used in {@link VerifyClient#check(CheckRequest)}.
*
* @deprecated This will be made package-private in the next major release.
*/
@Deprecated
public class CheckRequest implements QueryParamsRequest {
private final String requestId, code;

/**
* Creates a new CheckRequest.
*
* @param requestId The Verify request to check.
* This is the request_id you received in the response to the Verify request.
*
Expand Down Expand Up @@ -53,6 +61,8 @@ public String getRequestId() {
}

/**
* PIN code entered by the user.
*
* @return The verification code entered by your user.
*/
public String getCode() {
Expand Down
2 changes: 1 addition & 1 deletion src/main/java/com/vonage/client/verify/Psd2Request.java
Original file line number Diff line number Diff line change
Expand Up @@ -135,7 +135,7 @@ public Map<String, String> makeParams() {
}

public static class Builder {
private double amount;
private Double amount;
private String payee, number, country;
private Workflow workflow;
private Locale locale;
Expand Down
3 changes: 2 additions & 1 deletion src/main/java/com/vonage/client/verify/SearchRequest.java
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,8 @@
import java.util.LinkedHashMap;
import java.util.Map;

public class SearchRequest implements QueryParamsRequest {
class SearchRequest implements QueryParamsRequest {

/**
* Number of maximum request IDs that can be searched for.
*/
Expand Down
2 changes: 2 additions & 0 deletions src/main/java/com/vonage/client/verify/VerifyClient.java
Original file line number Diff line number Diff line change
Expand Up @@ -185,7 +185,9 @@ public VerifyResponse verify(VerifyRequest request) throws VonageClientException
*
* @throws VonageClientException if there was a problem with the Vonage request or response objects.
* @throws VonageResponseParseException if the response from the API could not be parsed.
* @deprecated Use {@link #check(String, String)}.
*/
@Deprecated
public CheckResponse check(CheckRequest request) throws VonageClientException, VonageResponseParseException {
return check.execute(request);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -68,8 +68,8 @@ private void assertEqualsSampleListNumbers(Supplier<ListNumbersResponse> invocat
" \"moHttpUrl\": \""+moHttpUrl+"\",\n" +
" \"type\": \"mobile-lvn\",\n" +
" \"features\": [\n" +
" \"VOICE\",\n" +
" \"SMS\"\n" +
" \"SMS\",\n" +
" \"MMS\"\n" +
" ],\n" +
" \"messagesCallbackType\": \"app\",\n" +
" \"messagesCallbackValue\": \""+ APPLICATION_ID_STR+"\",\n" +
Expand Down Expand Up @@ -107,8 +107,8 @@ private void assertEqualsSampleListNumbers(Supplier<ListNumbersResponse> invocat
assertNotNull(features);
assertEquals(2, features.length);
// TODO change to enum
assertEquals(Feature.VOICE, Feature.fromString(features[0]));
assertEquals(Feature.SMS, Feature.fromString(features[1]));
assertEquals(Feature.SMS, Feature.fromString(features[0]));
assertEquals(Feature.MMS, Feature.fromString(features[1]));
// TODO change to enum
assertEquals(CallbackType.SIP, CallbackType.fromString(main.getVoiceCallbackType()));
assertEquals(voiceCallbackValue, main.getVoiceCallbackValue());
Expand Down

0 comments on commit 0b9ac9b

Please sign in to comment.