com.squareup.connect.models.V1InventoryEntry 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 io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import java.math.BigDecimal;
/**
* V1InventoryEntry
*/
public class V1InventoryEntry {
@JsonProperty("variation_id")
private String variationId = null;
@JsonProperty("quantity_on_hand")
private BigDecimal quantityOnHand = null;
public V1InventoryEntry variationId(String variationId) {
this.variationId = variationId;
return this;
}
/**
* The variation that the entry corresponds to.
* @return variationId
**/
@ApiModelProperty(value = "The variation that the entry corresponds to.")
public String getVariationId() {
return variationId;
}
public void setVariationId(String variationId) {
this.variationId = variationId;
}
public V1InventoryEntry quantityOnHand(BigDecimal quantityOnHand) {
this.quantityOnHand = quantityOnHand;
return this;
}
/**
* The current available quantity of the item variation.
* @return quantityOnHand
**/
@ApiModelProperty(value = "The current available quantity of the item variation.")
public BigDecimal getQuantityOnHand() {
return quantityOnHand;
}
public void setQuantityOnHand(BigDecimal quantityOnHand) {
this.quantityOnHand = quantityOnHand;
}
@Override
public boolean equals(java.lang.Object o) {
if (this == o) {
return true;
}
if (o == null || getClass() != o.getClass()) {
return false;
}
V1InventoryEntry v1InventoryEntry = (V1InventoryEntry) o;
return Objects.equals(this.variationId, v1InventoryEntry.variationId) &&
Objects.equals(this.quantityOnHand, v1InventoryEntry.quantityOnHand);
}
@Override
public int hashCode() {
return Objects.hash(variationId, quantityOnHand);
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder();
sb.append("class V1InventoryEntry {\n");
sb.append(" variationId: ").append(toIndentedString(variationId)).append("\n");
sb.append(" quantityOnHand: ").append(toIndentedString(quantityOnHand)).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 ");
}
}