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

com.stripe.model.terminal.Reader Maven / Gradle / Ivy

There is a newer version: 28.4.0
Show newest version
// Generated by delombok at Wed Oct 31 12:31:58 PDT 2018
package com.stripe.model.terminal;

import com.stripe.exception.StripeException;
import com.stripe.model.HasId;
import com.stripe.net.ApiResource;
import com.stripe.net.RequestOptions;
import java.util.Map;

public class Reader extends ApiResource implements HasId {
  String id;
  String object;
  String deviceType;
  String ipAddress;
  String label;
  String location;
  String serialNumber;
  String status;

  // 
  /**
   * Create a reader.
   */
  public static Reader create(Map params) throws StripeException {
    return create(params, null);
  }

  /**
   * Create a reader.
   */
  public static Reader create(Map params, RequestOptions options) throws StripeException {
    return request(RequestMethod.POST, classUrl(Reader.class), params, Reader.class, options);
  }

  // 
  // 
  /**
   * List all readers.
   */
  public static ReaderCollection list(Map params) throws StripeException {
    return list(params, null);
  }

  /**
   * List all readers.
   */
  public static ReaderCollection list(Map params, RequestOptions options) throws StripeException {
    return requestCollection(classUrl(Reader.class), params, ReaderCollection.class, options);
  }

  // 
  // 
  /**
   * Retrieve a reader.
   */
  public static Reader retrieve(String id) throws StripeException {
    return retrieve(id, null);
  }

  /**
   * Retrieve a reader.
   */
  public static Reader retrieve(String id, RequestOptions options) throws StripeException {
    return retrieve(id, null, options);
  }

  /**
   * Retrieve a reader.
   */
  public static Reader retrieve(String id, Map params, RequestOptions options) throws StripeException {
    return request(RequestMethod.GET, instanceUrl(Reader.class, id), params, Reader.class, options);
  }

  // 
  // 
  /**
   * Update a reader.
   */
  public Reader update(Map params) throws StripeException {
    return update(params, null);
  }

  /**
   * Update a reader.
   */
  public Reader update(Map params, RequestOptions options) throws StripeException {
    return request(RequestMethod.POST, instanceUrl(Reader.class, this.id), params, Reader.class, options);
  }

  @java.lang.SuppressWarnings("all")
  @lombok.Generated
  public String getObject() {
    return this.object;
  }

  @java.lang.SuppressWarnings("all")
  @lombok.Generated
  public String getDeviceType() {
    return this.deviceType;
  }

  @java.lang.SuppressWarnings("all")
  @lombok.Generated
  public String getIpAddress() {
    return this.ipAddress;
  }

  @java.lang.SuppressWarnings("all")
  @lombok.Generated
  public String getLabel() {
    return this.label;
  }

  @java.lang.SuppressWarnings("all")
  @lombok.Generated
  public String getLocation() {
    return this.location;
  }

  @java.lang.SuppressWarnings("all")
  @lombok.Generated
  public String getSerialNumber() {
    return this.serialNumber;
  }

  @java.lang.SuppressWarnings("all")
  @lombok.Generated
  public String getStatus() {
    return this.status;
  }

  @java.lang.SuppressWarnings("all")
  @lombok.Generated
  public void setId(final String id) {
    this.id = id;
  }

  @java.lang.SuppressWarnings("all")
  @lombok.Generated
  public void setObject(final String object) {
    this.object = object;
  }

  @java.lang.SuppressWarnings("all")
  @lombok.Generated
  public void setDeviceType(final String deviceType) {
    this.deviceType = deviceType;
  }

  @java.lang.SuppressWarnings("all")
  @lombok.Generated
  public void setIpAddress(final String ipAddress) {
    this.ipAddress = ipAddress;
  }

  @java.lang.SuppressWarnings("all")
  @lombok.Generated
  public void setLabel(final String label) {
    this.label = label;
  }

  @java.lang.SuppressWarnings("all")
  @lombok.Generated
  public void setLocation(final String location) {
    this.location = location;
  }

  @java.lang.SuppressWarnings("all")
  @lombok.Generated
  public void setSerialNumber(final String serialNumber) {
    this.serialNumber = serialNumber;
  }

  @java.lang.SuppressWarnings("all")
  @lombok.Generated
  public void setStatus(final String status) {
    this.status = status;
  }

  @java.lang.Override
  @java.lang.SuppressWarnings("all")
  @lombok.Generated
  public boolean equals(final java.lang.Object o) {
    if (o == this) return true;
    if (!(o instanceof Reader)) return false;
    final Reader other = (Reader) o;
    if (!other.canEqual((java.lang.Object) this)) return false;
    final java.lang.Object this$id = this.getId();
    final java.lang.Object other$id = other.getId();
    if (this$id == null ? other$id != null : !this$id.equals(other$id)) return false;
    final java.lang.Object this$object = this.getObject();
    final java.lang.Object other$object = other.getObject();
    if (this$object == null ? other$object != null : !this$object.equals(other$object)) return false;
    final java.lang.Object this$deviceType = this.getDeviceType();
    final java.lang.Object other$deviceType = other.getDeviceType();
    if (this$deviceType == null ? other$deviceType != null : !this$deviceType.equals(other$deviceType)) return false;
    final java.lang.Object this$ipAddress = this.getIpAddress();
    final java.lang.Object other$ipAddress = other.getIpAddress();
    if (this$ipAddress == null ? other$ipAddress != null : !this$ipAddress.equals(other$ipAddress)) return false;
    final java.lang.Object this$label = this.getLabel();
    final java.lang.Object other$label = other.getLabel();
    if (this$label == null ? other$label != null : !this$label.equals(other$label)) return false;
    final java.lang.Object this$location = this.getLocation();
    final java.lang.Object other$location = other.getLocation();
    if (this$location == null ? other$location != null : !this$location.equals(other$location)) return false;
    final java.lang.Object this$serialNumber = this.getSerialNumber();
    final java.lang.Object other$serialNumber = other.getSerialNumber();
    if (this$serialNumber == null ? other$serialNumber != null : !this$serialNumber.equals(other$serialNumber)) return false;
    final java.lang.Object this$status = this.getStatus();
    final java.lang.Object other$status = other.getStatus();
    if (this$status == null ? other$status != null : !this$status.equals(other$status)) return false;
    return true;
  }

  @java.lang.SuppressWarnings("all")
  @lombok.Generated
  protected boolean canEqual(final java.lang.Object other) {
    return other instanceof Reader;
  }

  @java.lang.Override
  @java.lang.SuppressWarnings("all")
  @lombok.Generated
  public int hashCode() {
    final int PRIME = 59;
    int result = 1;
    final java.lang.Object $id = this.getId();
    result = result * PRIME + ($id == null ? 43 : $id.hashCode());
    final java.lang.Object $object = this.getObject();
    result = result * PRIME + ($object == null ? 43 : $object.hashCode());
    final java.lang.Object $deviceType = this.getDeviceType();
    result = result * PRIME + ($deviceType == null ? 43 : $deviceType.hashCode());
    final java.lang.Object $ipAddress = this.getIpAddress();
    result = result * PRIME + ($ipAddress == null ? 43 : $ipAddress.hashCode());
    final java.lang.Object $label = this.getLabel();
    result = result * PRIME + ($label == null ? 43 : $label.hashCode());
    final java.lang.Object $location = this.getLocation();
    result = result * PRIME + ($location == null ? 43 : $location.hashCode());
    final java.lang.Object $serialNumber = this.getSerialNumber();
    result = result * PRIME + ($serialNumber == null ? 43 : $serialNumber.hashCode());
    final java.lang.Object $status = this.getStatus();
    result = result * PRIME + ($status == null ? 43 : $status.hashCode());
    return result;
  }

  @Override
  @java.lang.SuppressWarnings("all")
  @lombok.Generated
  public String getId() {
    return this.id;
  }
  // 
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy