
io.swagger.client.model.PaymentTerm Maven / Gradle / Ivy
/*
* Qualpay Platform API
* This document describes the Qualpay Platform API.
*
* OpenAPI spec version: 1.1.9
*
*
* NOTE: This class is auto generated by the swagger code generator program.
* https://github.com/swagger-api/swagger-codegen.git
* Do not edit the class manually.
*/
package io.swagger.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;
/**
* PaymentTerm
*/
public class PaymentTerm {
/**
* <strong>Format: </strong>Variable length, up to 10 AN<br><strong>Description: </strong>Payment Term type. By default, this field is set to DAYS.
*/
@JsonAdapter(TypeEnum.Adapter.class)
public enum TypeEnum {
DAYS("DAYS"),
DATE("DATE");
private String value;
TypeEnum(String value) {
this.value = value;
}
public String getValue() {
return value;
}
@Override
public String toString() {
return String.valueOf(value);
}
public static TypeEnum fromValue(String text) {
for (TypeEnum b : TypeEnum.values()) {
if (String.valueOf(b.value).equals(text)) {
return b;
}
}
return null;
}
public static class Adapter extends TypeAdapter {
@Override
public void write(final JsonWriter jsonWriter, final TypeEnum enumeration) throws IOException {
jsonWriter.value(enumeration.getValue());
}
@Override
public TypeEnum read(final JsonReader jsonReader) throws IOException {
String value = jsonReader.nextString();
return TypeEnum.fromValue(String.valueOf(value));
}
}
}
@SerializedName("type")
private TypeEnum type = null;
@SerializedName("value")
private String value = null;
public PaymentTerm type(TypeEnum type) {
this.type = type;
return this;
}
/**
* <strong>Format: </strong>Variable length, up to 10 AN<br><strong>Description: </strong>Payment Term type. By default, this field is set to DAYS.
* @return type
**/
@ApiModelProperty(example = "DAYS", value = "Format: Variable length, up to 10 AN
Description: Payment Term type. By default, this field is set to DAYS. ")
public TypeEnum getType() {
return type;
}
public void setType(TypeEnum type) {
this.type = type;
}
public PaymentTerm value(String value) {
this.value = value;
return this;
}
/**
* <strong>Format: </strong>Variable length, up to 25 AN<br><strong>Description: </strong>Payment Term. The invoice_due_date will be automatically updated based on this value. If type is DATE, this field should contain the invoice_due_date in 'YYYY-MM-DD' format. If type is DAYS, this field should contain the number of days from invoice date when payment is due.
* @return value
**/
@ApiModelProperty(example = "10", value = "Format: Variable length, up to 25 AN
Description: Payment Term. The invoice_due_date will be automatically updated based on this value. If type is DATE, this field should contain the invoice_due_date in 'YYYY-MM-DD' format. If type is DAYS, this field should contain the number of days from invoice date when payment is due. ")
public String getValue() {
return value;
}
public void setValue(String value) {
this.value = value;
}
@Override
public boolean equals(java.lang.Object o) {
if (this == o) {
return true;
}
if (o == null || getClass() != o.getClass()) {
return false;
}
PaymentTerm paymentTerm = (PaymentTerm) o;
return Objects.equals(this.type, paymentTerm.type) &&
Objects.equals(this.value, paymentTerm.value);
}
@Override
public int hashCode() {
return Objects.hash(type, value);
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder();
sb.append("class PaymentTerm {\n");
sb.append(" type: ").append(toIndentedString(type)).append("\n");
sb.append(" value: ").append(toIndentedString(value)).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(java.lang.Object o) {
if (o == null) {
return "null";
}
return o.toString().replace("\n", "\n ");
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy