All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.plivo.api.models.number.NumberDeleter Maven / Gradle / Ivy

Go to download

A Java SDK to make voice calls & send SMS using Plivo and to generate Plivo XML

There is a newer version: 5.46.0
Show newest version
package com.plivo.api.models.number;

import com.plivo.api.exceptions.PlivoRestException;
import com.plivo.api.exceptions.PlivoValidationException;
import com.plivo.api.models.base.Deleter;
import java.io.IOException;
import okhttp3.ResponseBody;
import retrofit2.Call;

public class NumberDeleter extends Deleter {

  private final String number;

  NumberDeleter(final String number) {
    super(number);
    if (number == null) {
      throw new IllegalArgumentException("number cannot be null");
    }

    this.number = number;
  }

  @Override
  protected Call obtainCall() {
    return client().getApiService().numberDelete(client().getAuthId(), number);
  }

  public void unrent() throws IOException, PlivoRestException, PlivoValidationException {
    delete();
  }
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy