Search in sources :

Example 1 with ChangePhoneNumberRequest

use of org.whispersystems.signalservice.api.account.ChangePhoneNumberRequest in project Signal-Android by signalapp.

the class PushServiceSocket method changeNumber.

public VerifyAccountResponse changeNumber(String code, String e164NewNumber, String registrationLock) throws IOException {
    ChangePhoneNumberRequest changePhoneNumberRequest = new ChangePhoneNumberRequest(e164NewNumber, code, registrationLock);
    String requestBody = JsonUtil.toJson(changePhoneNumberRequest);
    String responseBody = makeServiceRequest(CHANGE_NUMBER_PATH, "PUT", requestBody);
    return JsonUtil.fromJson(responseBody, VerifyAccountResponse.class);
}
Also used : ChangePhoneNumberRequest(org.whispersystems.signalservice.api.account.ChangePhoneNumberRequest) GroupsV2AuthorizationString(org.whispersystems.signalservice.api.groupsv2.GroupsV2AuthorizationString)

Example 2 with ChangePhoneNumberRequest

use of org.whispersystems.signalservice.api.account.ChangePhoneNumberRequest in project Signal-Android by WhisperSystems.

the class PushServiceSocket method changeNumber.

public VerifyAccountResponse changeNumber(String code, String e164NewNumber, String registrationLock) throws IOException {
    ChangePhoneNumberRequest changePhoneNumberRequest = new ChangePhoneNumberRequest(e164NewNumber, code, registrationLock);
    String requestBody = JsonUtil.toJson(changePhoneNumberRequest);
    String responseBody = makeServiceRequest(CHANGE_NUMBER_PATH, "PUT", requestBody);
    return JsonUtil.fromJson(responseBody, VerifyAccountResponse.class);
}
Also used : ChangePhoneNumberRequest(org.whispersystems.signalservice.api.account.ChangePhoneNumberRequest) GroupsV2AuthorizationString(org.whispersystems.signalservice.api.groupsv2.GroupsV2AuthorizationString)

Aggregations

ChangePhoneNumberRequest (org.whispersystems.signalservice.api.account.ChangePhoneNumberRequest)2 GroupsV2AuthorizationString (org.whispersystems.signalservice.api.groupsv2.GroupsV2AuthorizationString)2