JPushover11/src/main/java/de/svenkubiak/jpushover/JPushoverResponse.java

49 lines
1.0 KiB
Java
Raw Normal View History

2015-01-07 13:16:55 +01:00
package de.svenkubiak.jpushover;
public class JPushoverResponse {
private String response;
private int httpStatus;
private boolean successful;
public JPushoverResponse(){
}
public JPushoverResponse response(String response) {
this.response = response;
return this;
}
public JPushoverResponse httpStatus(int httpStatus) {
this.httpStatus = httpStatus;
return this;
}
public JPushoverResponse isSuccessful(boolean successful) {
this.successful = successful;
return this;
}
/**
* The raw Json Response from the pushover API
* @return String
*/
public String getResponse() {
return response;
}
/**
* The HTTP status from the HTTP request
* @return int
*/
public int getHttpStatus() {
return httpStatus;
}
/**
* True if request to pushover API returned HTTP code 200, false otherwise
* @return boolen
*/
public boolean isSuccessful() {
return successful;
}
}