Class Recipient
- java.lang.Object
-
- com.stripe.model.StripeObject
-
- com.stripe.net.ApiResource
-
- com.stripe.model.Recipient
-
- All Implemented Interfaces:
HasId
,MetadataStore<Recipient>
,StripeObjectInterface
public class Recipient extends ApiResource implements HasId, MetadataStore<Recipient>
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class com.stripe.net.ApiResource
ApiResource.RequestMethod
-
-
Field Summary
-
Fields inherited from class com.stripe.net.ApiResource
CHARSET, GSON
-
Fields inherited from class com.stripe.model.StripeObject
PRETTY_PRINT_GSON
-
-
Constructor Summary
Constructors Constructor Description Recipient()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description protected boolean
canEqual(java.lang.Object other)
static Recipient
create(RecipientCreateParams params)
Creates a newRecipient
object and verifies the recipient’s identity.static Recipient
create(RecipientCreateParams params, RequestOptions options)
Creates a newRecipient
object and verifies the recipient’s identity.static Recipient
create(java.util.Map<java.lang.String,java.lang.Object> params)
Creates a newRecipient
object and verifies the recipient’s identity.static Recipient
create(java.util.Map<java.lang.String,java.lang.Object> params, RequestOptions options)
Creates a newRecipient
object and verifies the recipient’s identity.Recipient
delete()
Permanently deletes a recipient.Recipient
delete(RequestOptions options)
Permanently deletes a recipient.Recipient
delete(java.util.Map<java.lang.String,java.lang.Object> params)
Permanently deletes a recipient.Recipient
delete(java.util.Map<java.lang.String,java.lang.Object> params, RequestOptions options)
Permanently deletes a recipient.boolean
equals(java.lang.Object o)
BankAccount
getActiveAccount()
Hash describing the current account on the recipient, if there is one.CardCollection
getCards()
java.lang.Long
getCreated()
Time at which the object was created.java.lang.String
getDefaultCard()
Get ID of expandabledefaultCard
object.Card
getDefaultCardObject()
Get expandeddefaultCard
.java.lang.Boolean
getDeleted()
Always true for a deleted object.java.lang.String
getDescription()
An arbitrary string attached to the object.java.lang.String
getEmail()
java.lang.String
getId()
Unique identifier for the object.java.lang.Boolean
getLivemode()
Has the valuetrue
if the object exists in live mode or the valuefalse
if the object exists in test mode.java.util.Map<java.lang.String,java.lang.String>
getMetadata()
Set of key-value pairs that you can attach to an object.java.lang.String
getMigratedTo()
Get ID of expandablemigratedTo
object.Account
getMigratedToObject()
Get expandedmigratedTo
.java.lang.String
getName()
Full, legal name of the recipient.java.lang.String
getObject()
String representing the object's type.java.lang.String
getRolledBackFrom()
Get ID of expandablerolledBackFrom
object.Account
getRolledBackFromObject()
Get expandedrolledBackFrom
.java.lang.String
getType()
Type of the recipient, one ofindividual
orcorporation
.java.lang.Boolean
getVerified()
Whether the recipient has been verified.int
hashCode()
static RecipientCollection
list(RecipientListParams params)
Returns a list of your recipients.static RecipientCollection
list(RecipientListParams params, RequestOptions options)
Returns a list of your recipients.static RecipientCollection
list(java.util.Map<java.lang.String,java.lang.Object> params)
Returns a list of your recipients.static RecipientCollection
list(java.util.Map<java.lang.String,java.lang.Object> params, RequestOptions options)
Returns a list of your recipients.static Recipient
retrieve(java.lang.String id)
Retrieves the details of an existing recipient.static Recipient
retrieve(java.lang.String id, RequestOptions options)
Retrieves the details of an existing recipient.static Recipient
retrieve(java.lang.String id, RecipientRetrieveParams params, RequestOptions options)
Retrieves the details of an existing recipient.static Recipient
retrieve(java.lang.String id, java.util.Map<java.lang.String,java.lang.Object> params, RequestOptions options)
Retrieves the details of an existing recipient.void
setActiveAccount(BankAccount activeAccount)
Hash describing the current account on the recipient, if there is one.void
setCards(CardCollection cards)
void
setCreated(java.lang.Long created)
Time at which the object was created.void
setDefaultCard(java.lang.String id)
void
setDefaultCardObject(Card expandableObject)
void
setDeleted(java.lang.Boolean deleted)
Always true for a deleted object.void
setDescription(java.lang.String description)
An arbitrary string attached to the object.void
setEmail(java.lang.String email)
void
setId(java.lang.String id)
Unique identifier for the object.void
setLivemode(java.lang.Boolean livemode)
Has the valuetrue
if the object exists in live mode or the valuefalse
if the object exists in test mode.void
setMetadata(java.util.Map<java.lang.String,java.lang.String> metadata)
Set of key-value pairs that you can attach to an object.void
setMigratedTo(java.lang.String id)
void
setMigratedToObject(Account expandableObject)
void
setName(java.lang.String name)
Full, legal name of the recipient.void
setObject(java.lang.String object)
String representing the object's type.void
setRolledBackFrom(java.lang.String id)
void
setRolledBackFromObject(Account expandableObject)
void
setType(java.lang.String type)
Type of the recipient, one ofindividual
orcorporation
.void
setVerified(java.lang.Boolean verified)
Whether the recipient has been verified.Recipient
update(RecipientUpdateParams params)
Updates the specified recipient by setting the values of the parameters passed.Recipient
update(RecipientUpdateParams params, RequestOptions options)
Updates the specified recipient by setting the values of the parameters passed.Recipient
update(java.util.Map<java.lang.String,java.lang.Object> params)
Updates the specified recipient by setting the values of the parameters passed.Recipient
update(java.util.Map<java.lang.String,java.lang.Object> params, RequestOptions options)
Updates the specified recipient by setting the values of the parameters passed.-
Methods inherited from class com.stripe.net.ApiResource
checkNullTypedParams, classUrl, classUrl, instanceUrl, instanceUrl, request, request, requestCollection, requestCollection, requestSearchResult, requestSearchResult, requestStream, requestStream, setExpandableFieldId, setStripeResponseGetter, singleClassUrl, singleClassUrl, subresourceUrl, urlEncode, urlEncodeId
-
Methods inherited from class com.stripe.model.StripeObject
equals, getLastResponse, getRawJsonObject, setLastResponse, toJson, toString
-
-
-
-
Method Detail
-
getDefaultCard
public java.lang.String getDefaultCard()
Get ID of expandabledefaultCard
object.
-
setDefaultCard
public void setDefaultCard(java.lang.String id)
-
getDefaultCardObject
public Card getDefaultCardObject()
Get expandeddefaultCard
.
-
setDefaultCardObject
public void setDefaultCardObject(Card expandableObject)
-
getMigratedTo
public java.lang.String getMigratedTo()
Get ID of expandablemigratedTo
object.
-
setMigratedTo
public void setMigratedTo(java.lang.String id)
-
getMigratedToObject
public Account getMigratedToObject()
Get expandedmigratedTo
.
-
setMigratedToObject
public void setMigratedToObject(Account expandableObject)
-
getRolledBackFrom
public java.lang.String getRolledBackFrom()
Get ID of expandablerolledBackFrom
object.
-
setRolledBackFrom
public void setRolledBackFrom(java.lang.String id)
-
getRolledBackFromObject
public Account getRolledBackFromObject()
Get expandedrolledBackFrom
.
-
setRolledBackFromObject
public void setRolledBackFromObject(Account expandableObject)
-
list
public static RecipientCollection list(java.util.Map<java.lang.String,java.lang.Object> params) throws StripeException
Returns a list of your recipients. The recipients are returned sorted by creation date, with the most recently created recipients appearing first.- Throws:
StripeException
-
list
public static RecipientCollection list(java.util.Map<java.lang.String,java.lang.Object> params, RequestOptions options) throws StripeException
Returns a list of your recipients. The recipients are returned sorted by creation date, with the most recently created recipients appearing first.- Throws:
StripeException
-
list
public static RecipientCollection list(RecipientListParams params) throws StripeException
Returns a list of your recipients. The recipients are returned sorted by creation date, with the most recently created recipients appearing first.- Throws:
StripeException
-
list
public static RecipientCollection list(RecipientListParams params, RequestOptions options) throws StripeException
Returns a list of your recipients. The recipients are returned sorted by creation date, with the most recently created recipients appearing first.- Throws:
StripeException
-
create
public static Recipient create(java.util.Map<java.lang.String,java.lang.Object> params) throws StripeException
Creates a newRecipient
object and verifies the recipient’s identity. Also verifies the recipient’s bank account information or debit card, if either is provided.- Throws:
StripeException
-
create
public static Recipient create(java.util.Map<java.lang.String,java.lang.Object> params, RequestOptions options) throws StripeException
Creates a newRecipient
object and verifies the recipient’s identity. Also verifies the recipient’s bank account information or debit card, if either is provided.- Throws:
StripeException
-
create
public static Recipient create(RecipientCreateParams params) throws StripeException
Creates a newRecipient
object and verifies the recipient’s identity. Also verifies the recipient’s bank account information or debit card, if either is provided.- Throws:
StripeException
-
create
public static Recipient create(RecipientCreateParams params, RequestOptions options) throws StripeException
Creates a newRecipient
object and verifies the recipient’s identity. Also verifies the recipient’s bank account information or debit card, if either is provided.- Throws:
StripeException
-
retrieve
public static Recipient retrieve(java.lang.String id) throws StripeException
Retrieves the details of an existing recipient. You need only supply the unique recipient identifier that was returned upon recipient creation.- Throws:
StripeException
-
retrieve
public static Recipient retrieve(java.lang.String id, RequestOptions options) throws StripeException
Retrieves the details of an existing recipient. You need only supply the unique recipient identifier that was returned upon recipient creation.- Throws:
StripeException
-
retrieve
public static Recipient retrieve(java.lang.String id, java.util.Map<java.lang.String,java.lang.Object> params, RequestOptions options) throws StripeException
Retrieves the details of an existing recipient. You need only supply the unique recipient identifier that was returned upon recipient creation.- Throws:
StripeException
-
retrieve
public static Recipient retrieve(java.lang.String id, RecipientRetrieveParams params, RequestOptions options) throws StripeException
Retrieves the details of an existing recipient. You need only supply the unique recipient identifier that was returned upon recipient creation.- Throws:
StripeException
-
update
public Recipient update(java.util.Map<java.lang.String,java.lang.Object> params) throws StripeException
Updates the specified recipient by setting the values of the parameters passed. Any parameters not provided will be left unchanged.If you update the name or tax ID, the identity verification will automatically be rerun. If you update the bank account, the bank account validation will automatically be rerun.
- Specified by:
update
in interfaceMetadataStore<Recipient>
- Throws:
StripeException
-
update
public Recipient update(java.util.Map<java.lang.String,java.lang.Object> params, RequestOptions options) throws StripeException
Updates the specified recipient by setting the values of the parameters passed. Any parameters not provided will be left unchanged.If you update the name or tax ID, the identity verification will automatically be rerun. If you update the bank account, the bank account validation will automatically be rerun.
- Specified by:
update
in interfaceMetadataStore<Recipient>
- Throws:
StripeException
-
update
public Recipient update(RecipientUpdateParams params) throws StripeException
Updates the specified recipient by setting the values of the parameters passed. Any parameters not provided will be left unchanged.If you update the name or tax ID, the identity verification will automatically be rerun. If you update the bank account, the bank account validation will automatically be rerun.
- Throws:
StripeException
-
update
public Recipient update(RecipientUpdateParams params, RequestOptions options) throws StripeException
Updates the specified recipient by setting the values of the parameters passed. Any parameters not provided will be left unchanged.If you update the name or tax ID, the identity verification will automatically be rerun. If you update the bank account, the bank account validation will automatically be rerun.
- Throws:
StripeException
-
delete
public Recipient delete() throws StripeException
Permanently deletes a recipient. It cannot be undone.- Throws:
StripeException
-
delete
public Recipient delete(RequestOptions options) throws StripeException
Permanently deletes a recipient. It cannot be undone.- Throws:
StripeException
-
delete
public Recipient delete(java.util.Map<java.lang.String,java.lang.Object> params) throws StripeException
Permanently deletes a recipient. It cannot be undone.- Throws:
StripeException
-
delete
public Recipient delete(java.util.Map<java.lang.String,java.lang.Object> params, RequestOptions options) throws StripeException
Permanently deletes a recipient. It cannot be undone.- Throws:
StripeException
-
getActiveAccount
public BankAccount getActiveAccount()
Hash describing the current account on the recipient, if there is one.
-
getCards
public CardCollection getCards()
-
getCreated
public java.lang.Long getCreated()
Time at which the object was created. Measured in seconds since the Unix epoch.
-
getDeleted
public java.lang.Boolean getDeleted()
Always true for a deleted object.
-
getDescription
public java.lang.String getDescription()
An arbitrary string attached to the object. Often useful for displaying to users.
-
getEmail
public java.lang.String getEmail()
-
getLivemode
public java.lang.Boolean getLivemode()
Has the valuetrue
if the object exists in live mode or the valuefalse
if the object exists in test mode.
-
getName
public java.lang.String getName()
Full, legal name of the recipient.
-
getObject
public java.lang.String getObject()
String representing the object's type. Objects of the same type share the same value.Equal to
recipient
.
-
getType
public java.lang.String getType()
Type of the recipient, one ofindividual
orcorporation
.
-
getVerified
public java.lang.Boolean getVerified()
Whether the recipient has been verified. This field is non-standard, and maybe removed in the future
-
setActiveAccount
public void setActiveAccount(BankAccount activeAccount)
Hash describing the current account on the recipient, if there is one.
-
setCards
public void setCards(CardCollection cards)
-
setCreated
public void setCreated(java.lang.Long created)
Time at which the object was created. Measured in seconds since the Unix epoch.
-
setDeleted
public void setDeleted(java.lang.Boolean deleted)
Always true for a deleted object.
-
setDescription
public void setDescription(java.lang.String description)
An arbitrary string attached to the object. Often useful for displaying to users.
-
setEmail
public void setEmail(java.lang.String email)
-
setId
public void setId(java.lang.String id)
Unique identifier for the object.
-
setLivemode
public void setLivemode(java.lang.Boolean livemode)
Has the valuetrue
if the object exists in live mode or the valuefalse
if the object exists in test mode.
-
setMetadata
public void setMetadata(java.util.Map<java.lang.String,java.lang.String> metadata)
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.
-
setName
public void setName(java.lang.String name)
Full, legal name of the recipient.
-
setObject
public void setObject(java.lang.String object)
String representing the object's type. Objects of the same type share the same value.Equal to
recipient
.
-
setType
public void setType(java.lang.String type)
Type of the recipient, one ofindividual
orcorporation
.
-
setVerified
public void setVerified(java.lang.Boolean verified)
Whether the recipient has been verified. This field is non-standard, and maybe removed in the future
-
equals
public boolean equals(java.lang.Object o)
- Overrides:
equals
in classjava.lang.Object
-
canEqual
protected boolean canEqual(java.lang.Object other)
-
hashCode
public int hashCode()
- Overrides:
hashCode
in classjava.lang.Object
-
getId
public java.lang.String getId()
Unique identifier for the object.
-
getMetadata
public java.util.Map<java.lang.String,java.lang.String> getMetadata()
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.- Specified by:
getMetadata
in interfaceMetadataStore<Recipient>
-
-