com.squareup.connect.models.V1CashDrawerShift 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.Device;
import com.squareup.connect.models.V1CashDrawerEvent;
import com.squareup.connect.models.V1Money;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import java.util.ArrayList;
import java.util.List;
/**
* V1CashDrawerShift
*/
public class V1CashDrawerShift {
@JsonProperty("id")
private String id = null;
/**
* The shift's current state.
*/
public enum EventTypeEnum {
OPEN("OPEN"),
ENDED("ENDED"),
CLOSED("CLOSED");
private String value;
EventTypeEnum(String value) {
this.value = value;
}
@Override
public String toString() {
return String.valueOf(value);
}
@JsonCreator
public static EventTypeEnum fromValue(String text) {
for (EventTypeEnum b : EventTypeEnum.values()) {
if (String.valueOf(b.value).equals(text)) {
return b;
}
}
return null;
}
}
@JsonProperty("event_type")
private EventTypeEnum eventType = null;
@JsonProperty("opened_at")
private String openedAt = null;
@JsonProperty("ended_at")
private Boolean endedAt = null;
@JsonProperty("closed_at")
private String closedAt = null;
@JsonProperty("employee_ids")
private List employeeIds = new ArrayList();
@JsonProperty("opening_employee_id")
private String openingEmployeeId = null;
@JsonProperty("ending_employee_id")
private String endingEmployeeId = null;
@JsonProperty("closing_employee_id")
private String closingEmployeeId = null;
@JsonProperty("description")
private String description = null;
@JsonProperty("starting_cash_money")
private V1Money startingCashMoney = null;
@JsonProperty("cash_payment_money")
private V1Money cashPaymentMoney = null;
@JsonProperty("cash_refunds_money")
private V1Money cashRefundsMoney = null;
@JsonProperty("cash_paid_in_money")
private V1Money cashPaidInMoney = null;
@JsonProperty("cash_paid_out_money")
private V1Money cashPaidOutMoney = null;
@JsonProperty("expected_cash_money")
private V1Money expectedCashMoney = null;
@JsonProperty("closed_cash_money")
private V1Money closedCashMoney = null;
@JsonProperty("device")
private Device device = null;
@JsonProperty("events")
private List events = new ArrayList();
public V1CashDrawerShift id(String id) {
this.id = id;
return this;
}
/**
* The shift's unique ID.
* @return id
**/
@ApiModelProperty(value = "The shift's unique ID.")
public String getId() {
return id;
}
public void setId(String id) {
this.id = id;
}
public V1CashDrawerShift eventType(EventTypeEnum eventType) {
this.eventType = eventType;
return this;
}
/**
* The shift's current state.
* @return eventType
**/
@ApiModelProperty(value = "The shift's current state.")
public EventTypeEnum getEventType() {
return eventType;
}
public void setEventType(EventTypeEnum eventType) {
this.eventType = eventType;
}
public V1CashDrawerShift openedAt(String openedAt) {
this.openedAt = openedAt;
return this;
}
/**
* The time when the shift began, in ISO 8601 format.
* @return openedAt
**/
@ApiModelProperty(value = "The time when the shift began, in ISO 8601 format.")
public String getOpenedAt() {
return openedAt;
}
public void setOpenedAt(String openedAt) {
this.openedAt = openedAt;
}
public V1CashDrawerShift endedAt(Boolean endedAt) {
this.endedAt = endedAt;
return this;
}
/**
* The time when the shift ended, in ISO 8601 format.
* @return endedAt
**/
@ApiModelProperty(value = "The time when the shift ended, in ISO 8601 format.")
public Boolean getEndedAt() {
return endedAt;
}
public void setEndedAt(Boolean endedAt) {
this.endedAt = endedAt;
}
public V1CashDrawerShift closedAt(String closedAt) {
this.closedAt = closedAt;
return this;
}
/**
* The time when the shift was closed, in ISO 8601 format.
* @return closedAt
**/
@ApiModelProperty(value = "The time when the shift was closed, in ISO 8601 format.")
public String getClosedAt() {
return closedAt;
}
public void setClosedAt(String closedAt) {
this.closedAt = closedAt;
}
public V1CashDrawerShift employeeIds(List employeeIds) {
this.employeeIds = employeeIds;
return this;
}
public V1CashDrawerShift addEmployeeIdsItem(String employeeIdsItem) {
this.employeeIds.add(employeeIdsItem);
return this;
}
/**
* The IDs of all employees that were logged into Square Register at some point during the cash drawer shift.
* @return employeeIds
**/
@ApiModelProperty(value = "The IDs of all employees that were logged into Square Register at some point during the cash drawer shift.")
public List getEmployeeIds() {
return employeeIds;
}
public void setEmployeeIds(List employeeIds) {
this.employeeIds = employeeIds;
}
public V1CashDrawerShift openingEmployeeId(String openingEmployeeId) {
this.openingEmployeeId = openingEmployeeId;
return this;
}
/**
* The ID of the employee that started the cash drawer shift.
* @return openingEmployeeId
**/
@ApiModelProperty(value = "The ID of the employee that started the cash drawer shift.")
public String getOpeningEmployeeId() {
return openingEmployeeId;
}
public void setOpeningEmployeeId(String openingEmployeeId) {
this.openingEmployeeId = openingEmployeeId;
}
public V1CashDrawerShift endingEmployeeId(String endingEmployeeId) {
this.endingEmployeeId = endingEmployeeId;
return this;
}
/**
* The ID of the employee that ended the cash drawer shift.
* @return endingEmployeeId
**/
@ApiModelProperty(value = "The ID of the employee that ended the cash drawer shift.")
public String getEndingEmployeeId() {
return endingEmployeeId;
}
public void setEndingEmployeeId(String endingEmployeeId) {
this.endingEmployeeId = endingEmployeeId;
}
public V1CashDrawerShift closingEmployeeId(String closingEmployeeId) {
this.closingEmployeeId = closingEmployeeId;
return this;
}
/**
* The ID of the employee that closed the cash drawer shift by auditing the cash drawer's contents.
* @return closingEmployeeId
**/
@ApiModelProperty(value = "The ID of the employee that closed the cash drawer shift by auditing the cash drawer's contents.")
public String getClosingEmployeeId() {
return closingEmployeeId;
}
public void setClosingEmployeeId(String closingEmployeeId) {
this.closingEmployeeId = closingEmployeeId;
}
public V1CashDrawerShift description(String description) {
this.description = description;
return this;
}
/**
* The time when the timecard was created, in ISO 8601 format.
* @return description
**/
@ApiModelProperty(value = "The time when the timecard was created, in ISO 8601 format.")
public String getDescription() {
return description;
}
public void setDescription(String description) {
this.description = description;
}
public V1CashDrawerShift startingCashMoney(V1Money startingCashMoney) {
this.startingCashMoney = startingCashMoney;
return this;
}
/**
* The amount of money in the cash drawer at the start of the shift.
* @return startingCashMoney
**/
@ApiModelProperty(value = "The amount of money in the cash drawer at the start of the shift.")
public V1Money getStartingCashMoney() {
return startingCashMoney;
}
public void setStartingCashMoney(V1Money startingCashMoney) {
this.startingCashMoney = startingCashMoney;
}
public V1CashDrawerShift cashPaymentMoney(V1Money cashPaymentMoney) {
this.cashPaymentMoney = cashPaymentMoney;
return this;
}
/**
* The amount of money added to the cash drawer from cash payments.
* @return cashPaymentMoney
**/
@ApiModelProperty(value = "The amount of money added to the cash drawer from cash payments.")
public V1Money getCashPaymentMoney() {
return cashPaymentMoney;
}
public void setCashPaymentMoney(V1Money cashPaymentMoney) {
this.cashPaymentMoney = cashPaymentMoney;
}
public V1CashDrawerShift cashRefundsMoney(V1Money cashRefundsMoney) {
this.cashRefundsMoney = cashRefundsMoney;
return this;
}
/**
* The amount of money removed from the cash drawer from cash refunds. This value is always negative or zero.
* @return cashRefundsMoney
**/
@ApiModelProperty(value = "The amount of money removed from the cash drawer from cash refunds. This value is always negative or zero.")
public V1Money getCashRefundsMoney() {
return cashRefundsMoney;
}
public void setCashRefundsMoney(V1Money cashRefundsMoney) {
this.cashRefundsMoney = cashRefundsMoney;
}
public V1CashDrawerShift cashPaidInMoney(V1Money cashPaidInMoney) {
this.cashPaidInMoney = cashPaidInMoney;
return this;
}
/**
* The amount of money added to the cash drawer for reasons other than cash payments.
* @return cashPaidInMoney
**/
@ApiModelProperty(value = "The amount of money added to the cash drawer for reasons other than cash payments.")
public V1Money getCashPaidInMoney() {
return cashPaidInMoney;
}
public void setCashPaidInMoney(V1Money cashPaidInMoney) {
this.cashPaidInMoney = cashPaidInMoney;
}
public V1CashDrawerShift cashPaidOutMoney(V1Money cashPaidOutMoney) {
this.cashPaidOutMoney = cashPaidOutMoney;
return this;
}
/**
* The amount of money removed from the cash drawer for reasons other than cash refunds.
* @return cashPaidOutMoney
**/
@ApiModelProperty(value = "The amount of money removed from the cash drawer for reasons other than cash refunds.")
public V1Money getCashPaidOutMoney() {
return cashPaidOutMoney;
}
public void setCashPaidOutMoney(V1Money cashPaidOutMoney) {
this.cashPaidOutMoney = cashPaidOutMoney;
}
public V1CashDrawerShift expectedCashMoney(V1Money expectedCashMoney) {
this.expectedCashMoney = expectedCashMoney;
return this;
}
/**
* The amount of money that should be in the cash drawer at the end of the shift, based on the shift's other money amounts.
* @return expectedCashMoney
**/
@ApiModelProperty(value = "The amount of money that should be in the cash drawer at the end of the shift, based on the shift's other money amounts.")
public V1Money getExpectedCashMoney() {
return expectedCashMoney;
}
public void setExpectedCashMoney(V1Money expectedCashMoney) {
this.expectedCashMoney = expectedCashMoney;
}
public V1CashDrawerShift closedCashMoney(V1Money closedCashMoney) {
this.closedCashMoney = closedCashMoney;
return this;
}
/**
* The amount of money found in the cash drawer at the end of the shift by an auditing employee.
* @return closedCashMoney
**/
@ApiModelProperty(value = "The amount of money found in the cash drawer at the end of the shift by an auditing employee.")
public V1Money getClosedCashMoney() {
return closedCashMoney;
}
public void setClosedCashMoney(V1Money closedCashMoney) {
this.closedCashMoney = closedCashMoney;
}
public V1CashDrawerShift device(Device device) {
this.device = device;
return this;
}
/**
* The device running Square Register that was connected to the cash drawer.
* @return device
**/
@ApiModelProperty(value = "The device running Square Register that was connected to the cash drawer.")
public Device getDevice() {
return device;
}
public void setDevice(Device device) {
this.device = device;
}
public V1CashDrawerShift events(List events) {
this.events = events;
return this;
}
public V1CashDrawerShift addEventsItem(V1CashDrawerEvent eventsItem) {
this.events.add(eventsItem);
return this;
}
/**
* All of the events (payments, refunds, and so on) that involved the cash drawer during the shift.
* @return events
**/
@ApiModelProperty(value = "All of the events (payments, refunds, and so on) that involved the cash drawer during the shift.")
public List getEvents() {
return events;
}
public void setEvents(List events) {
this.events = events;
}
@Override
public boolean equals(java.lang.Object o) {
if (this == o) {
return true;
}
if (o == null || getClass() != o.getClass()) {
return false;
}
V1CashDrawerShift v1CashDrawerShift = (V1CashDrawerShift) o;
return Objects.equals(this.id, v1CashDrawerShift.id) &&
Objects.equals(this.eventType, v1CashDrawerShift.eventType) &&
Objects.equals(this.openedAt, v1CashDrawerShift.openedAt) &&
Objects.equals(this.endedAt, v1CashDrawerShift.endedAt) &&
Objects.equals(this.closedAt, v1CashDrawerShift.closedAt) &&
Objects.equals(this.employeeIds, v1CashDrawerShift.employeeIds) &&
Objects.equals(this.openingEmployeeId, v1CashDrawerShift.openingEmployeeId) &&
Objects.equals(this.endingEmployeeId, v1CashDrawerShift.endingEmployeeId) &&
Objects.equals(this.closingEmployeeId, v1CashDrawerShift.closingEmployeeId) &&
Objects.equals(this.description, v1CashDrawerShift.description) &&
Objects.equals(this.startingCashMoney, v1CashDrawerShift.startingCashMoney) &&
Objects.equals(this.cashPaymentMoney, v1CashDrawerShift.cashPaymentMoney) &&
Objects.equals(this.cashRefundsMoney, v1CashDrawerShift.cashRefundsMoney) &&
Objects.equals(this.cashPaidInMoney, v1CashDrawerShift.cashPaidInMoney) &&
Objects.equals(this.cashPaidOutMoney, v1CashDrawerShift.cashPaidOutMoney) &&
Objects.equals(this.expectedCashMoney, v1CashDrawerShift.expectedCashMoney) &&
Objects.equals(this.closedCashMoney, v1CashDrawerShift.closedCashMoney) &&
Objects.equals(this.device, v1CashDrawerShift.device) &&
Objects.equals(this.events, v1CashDrawerShift.events);
}
@Override
public int hashCode() {
return Objects.hash(id, eventType, openedAt, endedAt, closedAt, employeeIds, openingEmployeeId, endingEmployeeId, closingEmployeeId, description, startingCashMoney, cashPaymentMoney, cashRefundsMoney, cashPaidInMoney, cashPaidOutMoney, expectedCashMoney, closedCashMoney, device, events);
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder();
sb.append("class V1CashDrawerShift {\n");
sb.append(" id: ").append(toIndentedString(id)).append("\n");
sb.append(" eventType: ").append(toIndentedString(eventType)).append("\n");
sb.append(" openedAt: ").append(toIndentedString(openedAt)).append("\n");
sb.append(" endedAt: ").append(toIndentedString(endedAt)).append("\n");
sb.append(" closedAt: ").append(toIndentedString(closedAt)).append("\n");
sb.append(" employeeIds: ").append(toIndentedString(employeeIds)).append("\n");
sb.append(" openingEmployeeId: ").append(toIndentedString(openingEmployeeId)).append("\n");
sb.append(" endingEmployeeId: ").append(toIndentedString(endingEmployeeId)).append("\n");
sb.append(" closingEmployeeId: ").append(toIndentedString(closingEmployeeId)).append("\n");
sb.append(" description: ").append(toIndentedString(description)).append("\n");
sb.append(" startingCashMoney: ").append(toIndentedString(startingCashMoney)).append("\n");
sb.append(" cashPaymentMoney: ").append(toIndentedString(cashPaymentMoney)).append("\n");
sb.append(" cashRefundsMoney: ").append(toIndentedString(cashRefundsMoney)).append("\n");
sb.append(" cashPaidInMoney: ").append(toIndentedString(cashPaidInMoney)).append("\n");
sb.append(" cashPaidOutMoney: ").append(toIndentedString(cashPaidOutMoney)).append("\n");
sb.append(" expectedCashMoney: ").append(toIndentedString(expectedCashMoney)).append("\n");
sb.append(" closedCashMoney: ").append(toIndentedString(closedCashMoney)).append("\n");
sb.append(" device: ").append(toIndentedString(device)).append("\n");
sb.append(" events: ").append(toIndentedString(events)).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 ");
}
}