com.stripe.model.AccountLink Maven / Gradle / Ivy
// Generated by delombok at Wed Jun 10 17:29:56 PDT 2020
package com.stripe.model;
import com.google.gson.annotations.SerializedName;
import com.stripe.Stripe;
import com.stripe.exception.StripeException;
import com.stripe.net.ApiResource;
import com.stripe.net.RequestOptions;
import com.stripe.param.AccountLinkCreateParams;
import java.util.Map;
public class AccountLink extends ApiResource {
/**
* Time at which the object was created. Measured in seconds since the Unix epoch.
*/
@SerializedName("created")
Long created;
/**
* The timestamp at which this account link will expire.
*/
@SerializedName("expires_at")
Long expiresAt;
/**
* String representing the object's type. Objects of the same type share the same value.
*
* Equal to {@code account_link}.
*/
@SerializedName("object")
String object;
/**
* The URL for the account link.
*/
@SerializedName("url")
String url;
/**
* Creates an AccountLink object that returns a single-use Stripe URL that the user can redirect
* their user to in order to take them through the Connect Onboarding flow.
*/
public static AccountLink create(Map params) throws StripeException {
return create(params, (RequestOptions) null);
}
/**
* Creates an AccountLink object that returns a single-use Stripe URL that the user can redirect
* their user to in order to take them through the Connect Onboarding flow.
*/
public static AccountLink create(Map params, RequestOptions options) throws StripeException {
String url = String.format("%s%s", Stripe.getApiBase(), "/v1/account_links");
return ApiResource.request(ApiResource.RequestMethod.POST, url, params, AccountLink.class, options);
}
/**
* Creates an AccountLink object that returns a single-use Stripe URL that the user can redirect
* their user to in order to take them through the Connect Onboarding flow.
*/
public static AccountLink create(AccountLinkCreateParams params) throws StripeException {
return create(params, (RequestOptions) null);
}
/**
* Creates an AccountLink object that returns a single-use Stripe URL that the user can redirect
* their user to in order to take them through the Connect Onboarding flow.
*/
public static AccountLink create(AccountLinkCreateParams params, RequestOptions options) throws StripeException {
String url = String.format("%s%s", Stripe.getApiBase(), "/v1/account_links");
return ApiResource.request(ApiResource.RequestMethod.POST, url, params, AccountLink.class, options);
}
/**
* Time at which the object was created. Measured in seconds since the Unix epoch.
*/
@java.lang.SuppressWarnings("all")
@lombok.Generated
public Long getCreated() {
return this.created;
}
/**
* The timestamp at which this account link will expire.
*/
@java.lang.SuppressWarnings("all")
@lombok.Generated
public Long getExpiresAt() {
return this.expiresAt;
}
/**
* String representing the object's type. Objects of the same type share the same value.
*
* Equal to {@code account_link}.
*/
@java.lang.SuppressWarnings("all")
@lombok.Generated
public String getObject() {
return this.object;
}
/**
* The URL for the account link.
*/
@java.lang.SuppressWarnings("all")
@lombok.Generated
public String getUrl() {
return this.url;
}
/**
* Time at which the object was created. Measured in seconds since the Unix epoch.
*/
@java.lang.SuppressWarnings("all")
@lombok.Generated
public void setCreated(final Long created) {
this.created = created;
}
/**
* The timestamp at which this account link will expire.
*/
@java.lang.SuppressWarnings("all")
@lombok.Generated
public void setExpiresAt(final Long expiresAt) {
this.expiresAt = expiresAt;
}
/**
* String representing the object's type. Objects of the same type share the same value.
*
*
Equal to {@code account_link}.
*/
@java.lang.SuppressWarnings("all")
@lombok.Generated
public void setObject(final String object) {
this.object = object;
}
/**
* The URL for the account link.
*/
@java.lang.SuppressWarnings("all")
@lombok.Generated
public void setUrl(final String url) {
this.url = url;
}
@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 AccountLink)) return false;
final AccountLink other = (AccountLink) o;
if (!other.canEqual((java.lang.Object) this)) return false;
final java.lang.Object this$created = this.getCreated();
final java.lang.Object other$created = other.getCreated();
if (this$created == null ? other$created != null : !this$created.equals(other$created)) return false;
final java.lang.Object this$expiresAt = this.getExpiresAt();
final java.lang.Object other$expiresAt = other.getExpiresAt();
if (this$expiresAt == null ? other$expiresAt != null : !this$expiresAt.equals(other$expiresAt)) 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$url = this.getUrl();
final java.lang.Object other$url = other.getUrl();
if (this$url == null ? other$url != null : !this$url.equals(other$url)) return false;
return true;
}
@java.lang.SuppressWarnings("all")
@lombok.Generated
protected boolean canEqual(final java.lang.Object other) {
return other instanceof AccountLink;
}
@java.lang.Override
@java.lang.SuppressWarnings("all")
@lombok.Generated
public int hashCode() {
final int PRIME = 59;
int result = 1;
final java.lang.Object $created = this.getCreated();
result = result * PRIME + ($created == null ? 43 : $created.hashCode());
final java.lang.Object $expiresAt = this.getExpiresAt();
result = result * PRIME + ($expiresAt == null ? 43 : $expiresAt.hashCode());
final java.lang.Object $object = this.getObject();
result = result * PRIME + ($object == null ? 43 : $object.hashCode());
final java.lang.Object $url = this.getUrl();
result = result * PRIME + ($url == null ? 43 : $url.hashCode());
return result;
}
}