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

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

There is a newer version: 28.2.0
Show newest version
// Generated by delombok at Sat Feb 16 18:44:45 CET 2019
package com.stripe.model.terminal;

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

public class Location extends ApiResource implements HasId {
  String id;
  String object;
  Address address;
  String displayName;

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

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

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

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

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

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

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

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

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

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

  @java.lang.SuppressWarnings("all")
  @lombok.Generated
  public Address getAddress() {
    return this.address;
  }

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

  @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 setAddress(final Address address) {
    this.address = address;
  }

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

  @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 Location)) return false;
    final Location other = (Location) 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$address = this.getAddress();
    final java.lang.Object other$address = other.getAddress();
    if (this$address == null ? other$address != null : !this$address.equals(other$address)) return false;
    final java.lang.Object this$displayName = this.getDisplayName();
    final java.lang.Object other$displayName = other.getDisplayName();
    if (this$displayName == null ? other$displayName != null : !this$displayName.equals(other$displayName)) return false;
    return true;
  }

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

  @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 $address = this.getAddress();
    result = result * PRIME + ($address == null ? 43 : $address.hashCode());
    final java.lang.Object $displayName = this.getDisplayName();
    result = result * PRIME + ($displayName == null ? 43 : $displayName.hashCode());
    return result;
  }

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




© 2015 - 2025 Weber Informatics LLC | Privacy Policy