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 booleancanEqual(java.lang.Object other)static Recipientcreate(RecipientCreateParams params)Creates a newRecipientobject and verifies the recipient’s identity.static Recipientcreate(RecipientCreateParams params, RequestOptions options)Creates a newRecipientobject and verifies the recipient’s identity.static Recipientcreate(java.util.Map<java.lang.String,java.lang.Object> params)Creates a newRecipientobject and verifies the recipient’s identity.static Recipientcreate(java.util.Map<java.lang.String,java.lang.Object> params, RequestOptions options)Creates a newRecipientobject and verifies the recipient’s identity.Recipientdelete()Permanently deletes a recipient.Recipientdelete(RequestOptions options)Permanently deletes a recipient.Recipientdelete(java.util.Map<java.lang.String,java.lang.Object> params)Permanently deletes a recipient.Recipientdelete(java.util.Map<java.lang.String,java.lang.Object> params, RequestOptions options)Permanently deletes a recipient.booleanequals(java.lang.Object o)BankAccountgetActiveAccount()Hash describing the current account on the recipient, if there is one.CardCollectiongetCards()java.lang.LonggetCreated()Time at which the object was created.java.lang.StringgetDefaultCard()Get ID of expandabledefaultCardobject.CardgetDefaultCardObject()Get expandeddefaultCard.java.lang.BooleangetDeleted()Always true for a deleted object.java.lang.StringgetDescription()An arbitrary string attached to the object.java.lang.StringgetEmail()java.lang.StringgetId()Unique identifier for the object.java.lang.BooleangetLivemode()Has the valuetrueif the object exists in live mode or the valuefalseif 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.StringgetMigratedTo()Get ID of expandablemigratedToobject.AccountgetMigratedToObject()Get expandedmigratedTo.java.lang.StringgetName()Full, legal name of the recipient.java.lang.StringgetObject()String representing the object's type.java.lang.StringgetRolledBackFrom()Get ID of expandablerolledBackFromobject.AccountgetRolledBackFromObject()Get expandedrolledBackFrom.java.lang.StringgetType()Type of the recipient, one ofindividualorcorporation.java.lang.BooleangetVerified()Whether the recipient has been verified.inthashCode()static RecipientCollectionlist(RecipientListParams params)Returns a list of your recipients.static RecipientCollectionlist(RecipientListParams params, RequestOptions options)Returns a list of your recipients.static RecipientCollectionlist(java.util.Map<java.lang.String,java.lang.Object> params)Returns a list of your recipients.static RecipientCollectionlist(java.util.Map<java.lang.String,java.lang.Object> params, RequestOptions options)Returns a list of your recipients.static Recipientretrieve(java.lang.String id)Retrieves the details of an existing recipient.static Recipientretrieve(java.lang.String id, RequestOptions options)Retrieves the details of an existing recipient.static Recipientretrieve(java.lang.String id, RecipientRetrieveParams params, RequestOptions options)Retrieves the details of an existing recipient.static Recipientretrieve(java.lang.String id, java.util.Map<java.lang.String,java.lang.Object> params, RequestOptions options)Retrieves the details of an existing recipient.voidsetActiveAccount(BankAccount activeAccount)Hash describing the current account on the recipient, if there is one.voidsetCards(CardCollection cards)voidsetCreated(java.lang.Long created)Time at which the object was created.voidsetDefaultCard(java.lang.String id)voidsetDefaultCardObject(Card expandableObject)voidsetDeleted(java.lang.Boolean deleted)Always true for a deleted object.voidsetDescription(java.lang.String description)An arbitrary string attached to the object.voidsetEmail(java.lang.String email)voidsetId(java.lang.String id)Unique identifier for the object.voidsetLivemode(java.lang.Boolean livemode)Has the valuetrueif the object exists in live mode or the valuefalseif the object exists in test mode.voidsetMetadata(java.util.Map<java.lang.String,java.lang.String> metadata)Set of key-value pairs that you can attach to an object.voidsetMigratedTo(java.lang.String id)voidsetMigratedToObject(Account expandableObject)voidsetName(java.lang.String name)Full, legal name of the recipient.voidsetObject(java.lang.String object)String representing the object's type.voidsetRolledBackFrom(java.lang.String id)voidsetRolledBackFromObject(Account expandableObject)voidsetType(java.lang.String type)Type of the recipient, one ofindividualorcorporation.voidsetVerified(java.lang.Boolean verified)Whether the recipient has been verified.Recipientupdate(RecipientUpdateParams params)Updates the specified recipient by setting the values of the parameters passed.Recipientupdate(RecipientUpdateParams params, RequestOptions options)Updates the specified recipient by setting the values of the parameters passed.Recipientupdate(java.util.Map<java.lang.String,java.lang.Object> params)Updates the specified recipient by setting the values of the parameters passed.Recipientupdate(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, 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 expandabledefaultCardobject.
-
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 expandablemigratedToobject.
-
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 expandablerolledBackFromobject.
-
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 newRecipientobject 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 newRecipientobject 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 newRecipientobject 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 newRecipientobject 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:
updatein 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:
updatein 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 valuetrueif the object exists in live mode or the valuefalseif 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 ofindividualorcorporation.
-
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 valuetrueif the object exists in live mode or the valuefalseif 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 ofindividualorcorporation.
-
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:
equalsin classjava.lang.Object
-
canEqual
protected boolean canEqual(java.lang.Object other)
-
hashCode
public int hashCode()
- Overrides:
hashCodein 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:
getMetadatain interfaceMetadataStore<Recipient>
-
-