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

com.plivo.api.models.callfeedback.CallFeedbackCreator 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.callfeedback;

import com.plivo.api.models.base.Creator;
import com.plivo.api.util.Utils;
import retrofit2.Call;

import java.util.List;

public class CallFeedbackCreator extends Creator {

  private String callUUID;
  private Float rating;
  private List issues;
  private String notes;

  CallFeedbackCreator(String callUUID, Float rating) {
    if (!Utils.allNotNull(callUUID, rating)) {
      throw new IllegalArgumentException("callUUID or rating cannot be null");
    }
    if (rating < 1 && rating > 5) {
      throw new IllegalArgumentException("Rating has to be a float between 1 - 5");
    }
    this.callUUID = callUUID;
    this.rating = rating;
  }

  public CallFeedbackCreator issues(final List issues){
    this.issues = issues;
    return this;
  }

  public CallFeedbackCreator notes(final String notes){
    this.notes = notes;
    return this;
  }

  @Override
  protected Call obtainCall() {
    return client().getCallInsightsAPIService().callFeedbackCreate(callUUID, this);
  }

}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy