org.openapitools.client.model.Mandate Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of zuora-sdk-java Show documentation
Show all versions of zuora-sdk-java Show documentation
The SDK of JAVA language for Zuora pricing system
/*
* Quickstart API Reference
* Zuora Quickstart API is the API that helps you achieve fundamental use cases.
* It provides a much simplified object model and improved performance, enabling developers to easily learn and use.
*/
package org.openapitools.client.model;
import java.util.Objects;
import java.util.Arrays;
import com.google.gson.TypeAdapter;
import com.google.gson.annotations.JsonAdapter;
import com.google.gson.annotations.SerializedName;
import com.google.gson.stream.JsonReader;
import com.google.gson.stream.JsonWriter;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import java.io.IOException;
import org.openapitools.client.JSON.CustomFieldAdapter;
import org.openapitools.client.JSON.NullableFieldAdapter;
/**
* The mandate information for the Credit Card, Credit Card Reference Transaction, ACH, or Bank Transfer payment method.
*/
@ApiModel(description = "The mandate information for the Credit Card, Credit Card Reference Transaction, ACH, or Bank Transfer payment method.")
@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen")
public class Mandate {
public static final String SERIALIZED_NAME_ID = "id";
@SerializedName(SERIALIZED_NAME_ID)
private String id;
public static final String SERIALIZED_NAME_REASON = "reason";
@SerializedName(SERIALIZED_NAME_REASON)
private String reason;
/**
* The status of the mandate, which indicates whether it can be used to initiate a payment.
*/
@JsonAdapter(StateEnum.Adapter.class)
public enum StateEnum {
ACTIVE("active"),
CANCELED("canceled"),
EXPIRED("expired"),
AGREED("agreed"),
UNKNOWN_DEFAULT_OPEN_API("unknown_default_open_api");
private String value;
StateEnum(String value) {
this.value = value;
}
public String getValue() {
return value;
}
@Override
public String toString() {
return String.valueOf(value);
}
public static StateEnum fromValue(String value) {
for (StateEnum b : StateEnum.values()) {
if (b.value.equals(value)) {
return b;
}
}
throw new IllegalArgumentException("Unexpected value '" + value + "'");
}
public static class Adapter extends TypeAdapter {
@Override
public void write(final JsonWriter jsonWriter, final StateEnum enumeration) throws IOException {
jsonWriter.value(enumeration.getValue());
}
@Override
public StateEnum read(final JsonReader jsonReader) throws IOException {
String value = jsonReader.nextString();
return StateEnum.fromValue(value);
}
}
}
public static final String SERIALIZED_NAME_STATE = "state";
@SerializedName(SERIALIZED_NAME_STATE)
private StateEnum state;
public Mandate() {
}
public Mandate(
StateEnum state
) {
this();
this.state = state;
}
public Mandate id(String id) {
this.id = id;
return this;
}
/**
* Identifier of the single- or multi-use mandate generated by the payment gateway.
* @return id
**/
@javax.annotation.Nullable
@ApiModelProperty(value = "Identifier of the single- or multi-use mandate generated by the payment gateway.")
public String getId() {
return id;
}
public void setId(String id) {
this.id = id;
}
public Mandate reason(String reason) {
this.reason = reason;
return this;
}
/**
* Reason for the mandate.
* @return reason
**/
@javax.annotation.Nullable
@ApiModelProperty(value = "Reason for the mandate.")
public String getReason() {
return reason;
}
public void setReason(String reason) {
this.reason = reason;
}
/**
* The status of the mandate, which indicates whether it can be used to initiate a payment.
* @return state
**/
@javax.annotation.Nullable
@ApiModelProperty(value = "The status of the mandate, which indicates whether it can be used to initiate a payment.")
public StateEnum getState() {
return state;
}
@Override
public boolean equals(Object o) {
if (this == o) {
return true;
}
if (o == null || getClass() != o.getClass()) {
return false;
}
Mandate mandate = (Mandate) o;
return Objects.equals(this.id, mandate.id) &&
Objects.equals(this.reason, mandate.reason) &&
Objects.equals(this.state, mandate.state);
}
@Override
public int hashCode() {
return Objects.hash(id, reason, state);
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder();
sb.append("class Mandate {\n");
sb.append(" id: ").append(toIndentedString(id)).append("\n");
sb.append(" reason: ").append(toIndentedString(reason)).append("\n");
sb.append(" state: ").append(toIndentedString(state)).append("\n");
sb.append("}");
return sb.toString();
}
/**
* Convert the given object to string with each line indented by 4 spaces
* (except the first line).
*/
private String toIndentedString(Object o) {
if (o == null) {
return "null";
}
return o.toString().replace("\n", "\n ");
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy