com.stripe.model.AlipayAccount Maven / Gradle / Ivy
// Generated by delombok at Thu Oct 07 18:42:35 EDT 2021
// File generated from our OpenAPI spec
package com.stripe.model;
import com.google.gson.annotations.SerializedName;
import com.stripe.net.ApiResource;
import java.util.Map;
public class AlipayAccount extends StripeObject implements PaymentSource {
/**
* Time at which the object was created. Measured in seconds since the Unix epoch.
*/
@SerializedName("created")
Long created;
/**
* The ID of the customer associated with this Alipay Account.
*/
@SerializedName("customer")
ExpandableField customer;
/**
* Always true for a deleted object.
*/
@SerializedName("deleted")
Boolean deleted;
/**
* Uniquely identifies the account and will be the same across all Alipay account objects that are
* linked to the same Alipay account.
*/
@SerializedName("fingerprint")
String fingerprint;
/**
* 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;
/**
* Set of key-value pairs that you can attach
* to an object. This can be useful for storing additional information about the object in a
* structured format.
*/
@SerializedName("metadata")
Map metadata;
/**
* String representing the object's type. Objects of the same type share the same value.
*
* Equal to {@code alipay_account}.
*/
@SerializedName("object")
String object;
/**
* If the Alipay account object is not reusable, the exact amount that you can create a charge
* for.
*/
@SerializedName("payment_amount")
Long paymentAmount;
/**
* If the Alipay account object is not reusable, the exact currency that you can create a charge
* for.
*/
@SerializedName("payment_currency")
String paymentCurrency;
/**
* True if you can create multiple payments using this account. If the account is reusable, then
* you can freely choose the amount of each payment.
*/
@SerializedName("reusable")
Boolean reusable;
/**
* Whether this Alipay account object has ever been used for a payment.
*/
@SerializedName("used")
Boolean used;
/**
* The username for the Alipay account.
*/
@SerializedName("username")
String username;
/**
* Get ID of expandable {@code customer} object.
*/
public String getCustomer() {
return (this.customer != null) ? this.customer.getId() : null;
}
public void setCustomer(String id) {
this.customer = ApiResource.setExpandableFieldId(id, this.customer);
}
/**
* Get expanded {@code customer}.
*/
public Customer getCustomerObject() {
return (this.customer != null) ? this.customer.getExpanded() : null;
}
public void setCustomerObject(Customer expandableObject) {
this.customer = new ExpandableField(expandableObject.getId(), expandableObject);
}
/**
* 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;
}
/**
* Always true for a deleted object.
*/
@java.lang.SuppressWarnings("all")
@lombok.Generated
public Boolean getDeleted() {
return this.deleted;
}
/**
* Uniquely identifies the account and will be the same across all Alipay account objects that are
* linked to the same Alipay account.
*/
@java.lang.SuppressWarnings("all")
@lombok.Generated
public String getFingerprint() {
return this.fingerprint;
}
/**
* 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;
}
/**
* Set of key-value pairs that you can attach
* to an object. This can be useful for storing additional information about the object in a
* structured format.
*/
@java.lang.SuppressWarnings("all")
@lombok.Generated
public Map getMetadata() {
return this.metadata;
}
/**
* String representing the object's type. Objects of the same type share the same value.
*
* Equal to {@code alipay_account}.
*/
@java.lang.SuppressWarnings("all")
@lombok.Generated
public String getObject() {
return this.object;
}
/**
* If the Alipay account object is not reusable, the exact amount that you can create a charge
* for.
*/
@java.lang.SuppressWarnings("all")
@lombok.Generated
public Long getPaymentAmount() {
return this.paymentAmount;
}
/**
* If the Alipay account object is not reusable, the exact currency that you can create a charge
* for.
*/
@java.lang.SuppressWarnings("all")
@lombok.Generated
public String getPaymentCurrency() {
return this.paymentCurrency;
}
/**
* True if you can create multiple payments using this account. If the account is reusable, then
* you can freely choose the amount of each payment.
*/
@java.lang.SuppressWarnings("all")
@lombok.Generated
public Boolean getReusable() {
return this.reusable;
}
/**
* Whether this Alipay account object has ever been used for a payment.
*/
@java.lang.SuppressWarnings("all")
@lombok.Generated
public Boolean getUsed() {
return this.used;
}
/**
* The username for the Alipay account.
*/
@java.lang.SuppressWarnings("all")
@lombok.Generated
public String getUsername() {
return this.username;
}
/**
* 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;
}
/**
* Always true for a deleted object.
*/
@java.lang.SuppressWarnings("all")
@lombok.Generated
public void setDeleted(final Boolean deleted) {
this.deleted = deleted;
}
/**
* Uniquely identifies the account and will be the same across all Alipay account objects that are
* linked to the same Alipay account.
*/
@java.lang.SuppressWarnings("all")
@lombok.Generated
public void setFingerprint(final String fingerprint) {
this.fingerprint = fingerprint;
}
/**
* 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;
}
/**
* Set of key-value pairs that you can attach
* to an object. This can be useful for storing additional information about the object in a
* structured format.
*/
@java.lang.SuppressWarnings("all")
@lombok.Generated
public void setMetadata(final Map metadata) {
this.metadata = metadata;
}
/**
* String representing the object's type. Objects of the same type share the same value.
*
* Equal to {@code alipay_account}.
*/
@java.lang.SuppressWarnings("all")
@lombok.Generated
public void setObject(final String object) {
this.object = object;
}
/**
* If the Alipay account object is not reusable, the exact amount that you can create a charge
* for.
*/
@java.lang.SuppressWarnings("all")
@lombok.Generated
public void setPaymentAmount(final Long paymentAmount) {
this.paymentAmount = paymentAmount;
}
/**
* If the Alipay account object is not reusable, the exact currency that you can create a charge
* for.
*/
@java.lang.SuppressWarnings("all")
@lombok.Generated
public void setPaymentCurrency(final String paymentCurrency) {
this.paymentCurrency = paymentCurrency;
}
/**
* True if you can create multiple payments using this account. If the account is reusable, then
* you can freely choose the amount of each payment.
*/
@java.lang.SuppressWarnings("all")
@lombok.Generated
public void setReusable(final Boolean reusable) {
this.reusable = reusable;
}
/**
* Whether this Alipay account object has ever been used for a payment.
*/
@java.lang.SuppressWarnings("all")
@lombok.Generated
public void setUsed(final Boolean used) {
this.used = used;
}
/**
* The username for the Alipay account.
*/
@java.lang.SuppressWarnings("all")
@lombok.Generated
public void setUsername(final String username) {
this.username = username;
}
@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 AlipayAccount)) return false;
final AlipayAccount other = (AlipayAccount) 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$deleted = this.getDeleted();
final java.lang.Object other$deleted = other.getDeleted();
if (this$deleted == null ? other$deleted != null : !this$deleted.equals(other$deleted)) 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$paymentAmount = this.getPaymentAmount();
final java.lang.Object other$paymentAmount = other.getPaymentAmount();
if (this$paymentAmount == null ? other$paymentAmount != null : !this$paymentAmount.equals(other$paymentAmount)) return false;
final java.lang.Object this$reusable = this.getReusable();
final java.lang.Object other$reusable = other.getReusable();
if (this$reusable == null ? other$reusable != null : !this$reusable.equals(other$reusable)) return false;
final java.lang.Object this$used = this.getUsed();
final java.lang.Object other$used = other.getUsed();
if (this$used == null ? other$used != null : !this$used.equals(other$used)) return false;
final java.lang.Object this$customer = this.getCustomer();
final java.lang.Object other$customer = other.getCustomer();
if (this$customer == null ? other$customer != null : !this$customer.equals(other$customer)) return false;
final java.lang.Object this$fingerprint = this.getFingerprint();
final java.lang.Object other$fingerprint = other.getFingerprint();
if (this$fingerprint == null ? other$fingerprint != null : !this$fingerprint.equals(other$fingerprint)) 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$metadata = this.getMetadata();
final java.lang.Object other$metadata = other.getMetadata();
if (this$metadata == null ? other$metadata != null : !this$metadata.equals(other$metadata)) 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$paymentCurrency = this.getPaymentCurrency();
final java.lang.Object other$paymentCurrency = other.getPaymentCurrency();
if (this$paymentCurrency == null ? other$paymentCurrency != null : !this$paymentCurrency.equals(other$paymentCurrency)) return false;
final java.lang.Object this$username = this.getUsername();
final java.lang.Object other$username = other.getUsername();
if (this$username == null ? other$username != null : !this$username.equals(other$username)) return false;
return true;
}
@java.lang.SuppressWarnings("all")
@lombok.Generated
protected boolean canEqual(final java.lang.Object other) {
return other instanceof AlipayAccount;
}
@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 $deleted = this.getDeleted();
result = result * PRIME + ($deleted == null ? 43 : $deleted.hashCode());
final java.lang.Object $livemode = this.getLivemode();
result = result * PRIME + ($livemode == null ? 43 : $livemode.hashCode());
final java.lang.Object $paymentAmount = this.getPaymentAmount();
result = result * PRIME + ($paymentAmount == null ? 43 : $paymentAmount.hashCode());
final java.lang.Object $reusable = this.getReusable();
result = result * PRIME + ($reusable == null ? 43 : $reusable.hashCode());
final java.lang.Object $used = this.getUsed();
result = result * PRIME + ($used == null ? 43 : $used.hashCode());
final java.lang.Object $customer = this.getCustomer();
result = result * PRIME + ($customer == null ? 43 : $customer.hashCode());
final java.lang.Object $fingerprint = this.getFingerprint();
result = result * PRIME + ($fingerprint == null ? 43 : $fingerprint.hashCode());
final java.lang.Object $id = this.getId();
result = result * PRIME + ($id == null ? 43 : $id.hashCode());
final java.lang.Object $metadata = this.getMetadata();
result = result * PRIME + ($metadata == null ? 43 : $metadata.hashCode());
final java.lang.Object $object = this.getObject();
result = result * PRIME + ($object == null ? 43 : $object.hashCode());
final java.lang.Object $paymentCurrency = this.getPaymentCurrency();
result = result * PRIME + ($paymentCurrency == null ? 43 : $paymentCurrency.hashCode());
final java.lang.Object $username = this.getUsername();
result = result * PRIME + ($username == null ? 43 : $username.hashCode());
return result;
}
/**
* Unique identifier for the object.
*/
@Override
@java.lang.SuppressWarnings("all")
@lombok.Generated
public String getId() {
return this.id;
}
}