com.squareup.connect.models.V1PaymentModifier Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of connect Show documentation
Show all versions of connect Show documentation
Java client library for the Square Connect API
/*
* Square Connect API
* Client library for accessing the Square Connect APIs
*
* OpenAPI spec version: 2.0
* Contact: [email protected]
*
* 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 com.squareup.connect.models;
import java.util.Objects;
import com.fasterxml.jackson.annotation.JsonProperty;
import com.fasterxml.jackson.annotation.JsonCreator;
import com.fasterxml.jackson.annotation.JsonValue;
import com.squareup.connect.models.V1Money;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
/**
* V1PaymentModifier
*/
public class V1PaymentModifier {
@JsonProperty("name")
private String name = null;
@JsonProperty("applied_money")
private V1Money appliedMoney = null;
@JsonProperty("modifier_option_id")
private String modifierOptionId = null;
public V1PaymentModifier name(String name) {
this.name = name;
return this;
}
/**
* The modifier option's name.
* @return name
**/
@ApiModelProperty(value = "The modifier option's name.")
public String getName() {
return name;
}
public void setName(String name) {
this.name = name;
}
public V1PaymentModifier appliedMoney(V1Money appliedMoney) {
this.appliedMoney = appliedMoney;
return this;
}
/**
* The amount of money that this modifier option adds to the payment.
* @return appliedMoney
**/
@ApiModelProperty(value = "The amount of money that this modifier option adds to the payment.")
public V1Money getAppliedMoney() {
return appliedMoney;
}
public void setAppliedMoney(V1Money appliedMoney) {
this.appliedMoney = appliedMoney;
}
public V1PaymentModifier modifierOptionId(String modifierOptionId) {
this.modifierOptionId = modifierOptionId;
return this;
}
/**
* TThe ID of the applied modifier option, if available. Modifier options applied in older versions of Square Register might not have an ID.
* @return modifierOptionId
**/
@ApiModelProperty(value = "TThe ID of the applied modifier option, if available. Modifier options applied in older versions of Square Register might not have an ID.")
public String getModifierOptionId() {
return modifierOptionId;
}
public void setModifierOptionId(String modifierOptionId) {
this.modifierOptionId = modifierOptionId;
}
@Override
public boolean equals(java.lang.Object o) {
if (this == o) {
return true;
}
if (o == null || getClass() != o.getClass()) {
return false;
}
V1PaymentModifier v1PaymentModifier = (V1PaymentModifier) o;
return Objects.equals(this.name, v1PaymentModifier.name) &&
Objects.equals(this.appliedMoney, v1PaymentModifier.appliedMoney) &&
Objects.equals(this.modifierOptionId, v1PaymentModifier.modifierOptionId);
}
@Override
public int hashCode() {
return Objects.hash(name, appliedMoney, modifierOptionId);
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder();
sb.append("class V1PaymentModifier {\n");
sb.append(" name: ").append(toIndentedString(name)).append("\n");
sb.append(" appliedMoney: ").append(toIndentedString(appliedMoney)).append("\n");
sb.append(" modifierOptionId: ").append(toIndentedString(modifierOptionId)).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 ");
}
}