com.stripe.model.issuing.Dispute Maven / Gradle / Ivy
// Generated by delombok at Fri May 01 10:51:46 PDT 2020
package com.stripe.model.issuing;
import com.google.gson.annotations.SerializedName;
import com.stripe.Stripe;
import com.stripe.exception.StripeException;
import com.stripe.model.HasId;
import com.stripe.net.ApiResource;
import com.stripe.net.RequestOptions;
import com.stripe.param.issuing.DisputeCreateParams;
import com.stripe.param.issuing.DisputeListParams;
import com.stripe.param.issuing.DisputeRetrieveParams;
import com.stripe.param.issuing.DisputeUpdateParams;
import java.util.Map;
public class Dispute extends ApiResource implements HasId {
/**
* Unique identifier for the object.
*/
@SerializedName("id")
String id;
/**
* Has the value {@code true} if the object exists in live mode or the value {@code false} if the
* object exists in test mode.
*/
@SerializedName("livemode")
Boolean livemode;
/**
* String representing the object's type. Objects of the same type share the same value.
*
* Equal to {@code issuing.dispute}.
*/
@SerializedName("object")
String object;
/**
* Returns a list of Issuing Dispute
objects. The objects are sorted in descending
* order by creation date, with the most recently created object appearing first.
*/
public static DisputeCollection list(Map params) throws StripeException {
return list(params, (RequestOptions) null);
}
/**
* Returns a list of Issuing Dispute
objects. The objects are sorted in descending
* order by creation date, with the most recently created object appearing first.
*/
public static DisputeCollection list(Map params, RequestOptions options) throws StripeException {
String url = String.format("%s%s", Stripe.getApiBase(), "/v1/issuing/disputes");
return ApiResource.requestCollection(url, params, DisputeCollection.class, options);
}
/**
* Returns a list of Issuing Dispute
objects. The objects are sorted in descending
* order by creation date, with the most recently created object appearing first.
*/
public static DisputeCollection list(DisputeListParams params) throws StripeException {
return list(params, (RequestOptions) null);
}
/**
* Returns a list of Issuing Dispute
objects. The objects are sorted in descending
* order by creation date, with the most recently created object appearing first.
*/
public static DisputeCollection list(DisputeListParams params, RequestOptions options) throws StripeException {
String url = String.format("%s%s", Stripe.getApiBase(), "/v1/issuing/disputes");
return ApiResource.requestCollection(url, params, DisputeCollection.class, options);
}
/**
* Creates an Issuing Dispute
object.
*/
public static Dispute create(Map params) throws StripeException {
return create(params, (RequestOptions) null);
}
/**
* Creates an Issuing Dispute
object.
*/
public static Dispute create(Map params, RequestOptions options) throws StripeException {
String url = String.format("%s%s", Stripe.getApiBase(), "/v1/issuing/disputes");
return ApiResource.request(ApiResource.RequestMethod.POST, url, params, Dispute.class, options);
}
/**
* Creates an Issuing Dispute
object.
*/
public static Dispute create(DisputeCreateParams params) throws StripeException {
return create(params, (RequestOptions) null);
}
/**
* Creates an Issuing Dispute
object.
*/
public static Dispute create(DisputeCreateParams params, RequestOptions options) throws StripeException {
String url = String.format("%s%s", Stripe.getApiBase(), "/v1/issuing/disputes");
return ApiResource.request(ApiResource.RequestMethod.POST, url, params, Dispute.class, options);
}
/**
* Updates the specified Issuing Dispute
object by setting the values of the
* parameters passed. Any parameters not provided will be left unchanged.
*/
public Dispute update(Map params) throws StripeException {
return update(params, (RequestOptions) null);
}
/**
* Updates the specified Issuing Dispute
object by setting the values of the
* parameters passed. Any parameters not provided will be left unchanged.
*/
public Dispute update(Map params, RequestOptions options) throws StripeException {
String url = String.format("%s%s", Stripe.getApiBase(), String.format("/v1/issuing/disputes/%s", ApiResource.urlEncodeId(this.getId())));
return ApiResource.request(ApiResource.RequestMethod.POST, url, params, Dispute.class, options);
}
/**
* Updates the specified Issuing Dispute
object by setting the values of the
* parameters passed. Any parameters not provided will be left unchanged.
*/
public Dispute update(DisputeUpdateParams params) throws StripeException {
return update(params, (RequestOptions) null);
}
/**
* Updates the specified Issuing Dispute
object by setting the values of the
* parameters passed. Any parameters not provided will be left unchanged.
*/
public Dispute update(DisputeUpdateParams params, RequestOptions options) throws StripeException {
String url = String.format("%s%s", Stripe.getApiBase(), String.format("/v1/issuing/disputes/%s", ApiResource.urlEncodeId(this.getId())));
return ApiResource.request(ApiResource.RequestMethod.POST, url, params, Dispute.class, options);
}
/**
* Retrieves an Issuing Dispute
object.
*/
public static Dispute retrieve(String dispute) throws StripeException {
return retrieve(dispute, (Map) null, (RequestOptions) null);
}
/**
* Retrieves an Issuing Dispute
object.
*/
public static Dispute retrieve(String dispute, RequestOptions options) throws StripeException {
return retrieve(dispute, (Map) null, options);
}
/**
* Retrieves an Issuing Dispute
object.
*/
public static Dispute retrieve(String dispute, Map params, RequestOptions options) throws StripeException {
String url = String.format("%s%s", Stripe.getApiBase(), String.format("/v1/issuing/disputes/%s", ApiResource.urlEncodeId(dispute)));
return ApiResource.request(ApiResource.RequestMethod.GET, url, params, Dispute.class, options);
}
/**
* Retrieves an Issuing Dispute
object.
*/
public static Dispute retrieve(String dispute, DisputeRetrieveParams params, RequestOptions options) throws StripeException {
String url = String.format("%s%s", Stripe.getApiBase(), String.format("/v1/issuing/disputes/%s", ApiResource.urlEncodeId(dispute)));
return ApiResource.request(ApiResource.RequestMethod.GET, url, params, Dispute.class, options);
}
/**
* Has the value {@code true} if the object exists in live mode or the value {@code false} if the
* object exists in test mode.
*/
@java.lang.SuppressWarnings("all")
@lombok.Generated
public Boolean getLivemode() {
return this.livemode;
}
/**
* String representing the object's type. Objects of the same type share the same value.
*
* Equal to {@code issuing.dispute}.
*/
@java.lang.SuppressWarnings("all")
@lombok.Generated
public String getObject() {
return this.object;
}
/**
* Unique identifier for the object.
*/
@java.lang.SuppressWarnings("all")
@lombok.Generated
public void setId(final String id) {
this.id = id;
}
/**
* Has the value {@code true} if the object exists in live mode or the value {@code false} if the
* object exists in test mode.
*/
@java.lang.SuppressWarnings("all")
@lombok.Generated
public void setLivemode(final Boolean livemode) {
this.livemode = livemode;
}
/**
* String representing the object's type. Objects of the same type share the same value.
*
*
Equal to {@code issuing.dispute}.
*/
@java.lang.SuppressWarnings("all")
@lombok.Generated
public void setObject(final String object) {
this.object = object;
}
@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 Dispute)) return false;
final Dispute other = (Dispute) 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$livemode = this.getLivemode();
final java.lang.Object other$livemode = other.getLivemode();
if (this$livemode == null ? other$livemode != null : !this$livemode.equals(other$livemode)) 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;
return true;
}
@java.lang.SuppressWarnings("all")
@lombok.Generated
protected boolean canEqual(final java.lang.Object other) {
return other instanceof Dispute;
}
@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 $livemode = this.getLivemode();
result = result * PRIME + ($livemode == null ? 43 : $livemode.hashCode());
final java.lang.Object $object = this.getObject();
result = result * PRIME + ($object == null ? 43 : $object.hashCode());
return result;
}
/**
* Unique identifier for the object.
*/
@Override
@java.lang.SuppressWarnings("all")
@lombok.Generated
public String getId() {
return this.id;
}
}