All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.squareup.connect.models.V1ListRefundsRequest Maven / Gradle / Ivy

There is a newer version: 2.20191120.0
Show newest version
/*
 * 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;

/**
 * 
 */
@ApiModel(description = "")

public class V1ListRefundsRequest {
  /**
   * TThe order in which payments are listed in the response. See [SortOrder](#type-sortorder) for possible values
   */
  public enum OrderEnum {
    DESC("DESC"),
    
    ASC("ASC");

    private String value;

    OrderEnum(String value) {
      this.value = value;
    }

    @Override
    public String toString() {
      return String.valueOf(value);
    }

    @JsonCreator
    public static OrderEnum fromValue(String text) {
      for (OrderEnum b : OrderEnum.values()) {
        if (String.valueOf(b.value).equals(text)) {
          return b;
        }
      }
      return null;
    }
  }

  @JsonProperty("order")
  private OrderEnum order = null;

  @JsonProperty("begin_time")
  private String beginTime = null;

  @JsonProperty("end_time")
  private String endTime = null;

  @JsonProperty("limit")
  private Integer limit = null;

  @JsonProperty("batch_token")
  private String batchToken = null;

  public V1ListRefundsRequest order(OrderEnum order) {
    this.order = order;
    return this;
  }

   /**
   * TThe order in which payments are listed in the response. See [SortOrder](#type-sortorder) for possible values
   * @return order
  **/
  @ApiModelProperty(value = "TThe order in which payments are listed in the response. See [SortOrder](#type-sortorder) for possible values")
  public OrderEnum getOrder() {
    return order;
  }

  public void setOrder(OrderEnum order) {
    this.order = order;
  }

  public V1ListRefundsRequest beginTime(String beginTime) {
    this.beginTime = beginTime;
    return this;
  }

   /**
   * The beginning of the requested reporting period, in ISO 8601 format. If this value is before January 1, 2013 (2013-01-01T00:00:00Z), this endpoint returns an error. Default value: The current time minus one year.
   * @return beginTime
  **/
  @ApiModelProperty(value = "The beginning of the requested reporting period, in ISO 8601 format. If this value is before January 1, 2013 (2013-01-01T00:00:00Z), this endpoint returns an error. Default value: The current time minus one year.")
  public String getBeginTime() {
    return beginTime;
  }

  public void setBeginTime(String beginTime) {
    this.beginTime = beginTime;
  }

  public V1ListRefundsRequest endTime(String endTime) {
    this.endTime = endTime;
    return this;
  }

   /**
   * The end of the requested reporting period, in ISO 8601 format. If this value is more than one year greater than begin_time, this endpoint returns an error. Default value: The current time.
   * @return endTime
  **/
  @ApiModelProperty(value = "The end of the requested reporting period, in ISO 8601 format. If this value is more than one year greater than begin_time, this endpoint returns an error. Default value: The current time.")
  public String getEndTime() {
    return endTime;
  }

  public void setEndTime(String endTime) {
    this.endTime = endTime;
  }

  public V1ListRefundsRequest limit(Integer limit) {
    this.limit = limit;
    return this;
  }

   /**
   * The approximate number of refunds to return in a single response. Default: 100. Max: 200. Response may contain more results than the prescribed limit when refunds are made simultaneously to multiple tenders in a payment or when refunds are generated in an exchange to account for the value of returned goods.
   * @return limit
  **/
  @ApiModelProperty(value = "The approximate number of refunds to return in a single response. Default: 100. Max: 200. Response may contain more results than the prescribed limit when refunds are made simultaneously to multiple tenders in a payment or when refunds are generated in an exchange to account for the value of returned goods.")
  public Integer getLimit() {
    return limit;
  }

  public void setLimit(Integer limit) {
    this.limit = limit;
  }

  public V1ListRefundsRequest batchToken(String batchToken) {
    this.batchToken = batchToken;
    return this;
  }

   /**
   * A pagination cursor to retrieve the next set of results for your original query to the endpoint.
   * @return batchToken
  **/
  @ApiModelProperty(value = "A pagination cursor to retrieve the next set of results for your original query to the endpoint.")
  public String getBatchToken() {
    return batchToken;
  }

  public void setBatchToken(String batchToken) {
    this.batchToken = batchToken;
  }


  @Override
  public boolean equals(java.lang.Object o) {
    if (this == o) {
      return true;
    }
    if (o == null || getClass() != o.getClass()) {
      return false;
    }
    V1ListRefundsRequest v1ListRefundsRequest = (V1ListRefundsRequest) o;
    return Objects.equals(this.order, v1ListRefundsRequest.order) &&
        Objects.equals(this.beginTime, v1ListRefundsRequest.beginTime) &&
        Objects.equals(this.endTime, v1ListRefundsRequest.endTime) &&
        Objects.equals(this.limit, v1ListRefundsRequest.limit) &&
        Objects.equals(this.batchToken, v1ListRefundsRequest.batchToken);
  }

  @Override
  public int hashCode() {
    return Objects.hash(order, beginTime, endTime, limit, batchToken);
  }


  @Override
  public String toString() {
    StringBuilder sb = new StringBuilder();
    sb.append("class V1ListRefundsRequest {\n");
    
    sb.append("    order: ").append(toIndentedString(order)).append("\n");
    sb.append("    beginTime: ").append(toIndentedString(beginTime)).append("\n");
    sb.append("    endTime: ").append(toIndentedString(endTime)).append("\n");
    sb.append("    limit: ").append(toIndentedString(limit)).append("\n");
    sb.append("    batchToken: ").append(toIndentedString(batchToken)).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 - 2024 Weber Informatics LLC | Privacy Policy