
com.plivo.api.models.callfeedback.CallFeedbackCreator Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of plivo-java Show documentation
Show all versions of plivo-java Show documentation
A Java SDK to make voice calls & send SMS using Plivo and to generate Plivo XML
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