jp.webpay.webpay.data.ChargeRequestRefund Maven / Gradle / Ivy
package jp.webpay.webpay.data;
import com.fasterxml.jackson.annotation.JsonIgnore;
import com.fasterxml.jackson.annotation.JsonProperty;
import javax.ws.rs.core.MultivaluedMap;
import javax.ws.rs.core.MultivaluedHashMap;
public class ChargeRequestRefund extends RequestData {
@JsonIgnore public String id;
@JsonProperty("amount") public Long amount;
@JsonProperty("uuid") public String uuid;
public ChargeRequestRefund() {
}
public ChargeRequestRefund(ChargeResponse source) {
this.id = source.id;
}
public ChargeRequestRefund(String source) {
this.id = source;
}
public ChargeRequestRefund id(String value) {
id = value;
return this;
}
public ChargeRequestRefund amount(Long value) {
amount = value;
return this;
}
public ChargeRequestRefund amount(int value) {
amount = (long)value;
return this;
}
public ChargeRequestRefund uuid(String value) {
uuid = value;
return this;
}
public MultivaluedMap queryParams() {
MultivaluedMap map = new MultivaluedHashMap();
return map;
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder();
toStringRecursively(sb, 0);
return sb.toString();
}
@Override
protected void toStringRecursively(StringBuilder sb, int depth) {
sb.append(this.getClass().getName());
sb.append("[\n");
sb.append(indentSpace(depth + 2));
sb.append("id: ");
stringifyField(sb, depth + 2, id);
sb.append("\n");
sb.append(indentSpace(depth + 2));
sb.append("amount: ");
stringifyField(sb, depth + 2, amount);
sb.append("\n");
sb.append(indentSpace(depth + 2));
sb.append("uuid: ");
stringifyField(sb, depth + 2, uuid);
sb.append("\n");
sb.append(indentSpace(depth));
sb.append("]");
}
}