Class File
- All Implemented Interfaces:
HasId,StripeActiveObject,StripeObjectInterface
Related guide: File upload guide
-
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, INTERNAL_GSONFields inherited from class com.stripe.model.StripeObject
PRETTY_PRINT_GSON -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected booleanstatic Filecreate(FileCreateParams params) To upload a file to Stripe, you need to send a request of typemultipart/form-data.static Filecreate(FileCreateParams params, RequestOptions options) To upload a file to Stripe, you need to send a request of typemultipart/form-data.static FileTo upload a file to Stripe, you need to send a request of typemultipart/form-data.static Filecreate(Map<String, Object> params, RequestOptions options) To upload a file to Stripe, you need to send a request of typemultipart/form-data.booleanTime at which the object was created.The file expires and isn't available at this time in epoch seconds.The suitable name for saving the file to a filesystem.getId()Unique identifier for the object.getLinks()A list of file links that point at this file.String representing the object's type.The purpose of the uploaded file.getSize()The size of the file object in bytes.getTitle()A suitable title for the document.getType()The returned file type (for example,csv,pdf,jpg, orpng).getUrl()Use your live secret API key to download the file from this URL.inthashCode()static FileCollectionlist(FileListParams params) Returns a list of the files that your account has access to.static FileCollectionlist(FileListParams params, RequestOptions options) Returns a list of the files that your account has access to.static FileCollectionReturns a list of the files that your account has access to.static FileCollectionlist(Map<String, Object> params, RequestOptions options) Returns a list of the files that your account has access to.static FileRetrieves the details of an existing file object.static Fileretrieve(String file, RequestOptions options) Retrieves the details of an existing file object.static Fileretrieve(String file, FileRetrieveParams params, RequestOptions options) Retrieves the details of an existing file object.static FileRetrieves the details of an existing file object.voidsetCreated(Long created) Time at which the object was created.voidsetExpiresAt(Long expiresAt) The file expires and isn't available at this time in epoch seconds.voidsetFilename(String filename) The suitable name for saving the file to a filesystem.voidUnique identifier for the object.voidsetLinks(FileLinkCollection links) A list of file links that point at this file.voidString representing the object's type.voidsetPurpose(String purpose) The purpose of the uploaded file.voidsetResponseGetter(StripeResponseGetter responseGetter) Method is used by the containing object orStripeResponseGetterimplementations to set theStripeResponseGetterinstance used to make further requests.voidThe size of the file object in bytes.voidA suitable title for the document.voidThe returned file type (for example,csv,pdf,jpg, orpng).voidUse your live secret API key to download the file from this URL.Methods inherited from class com.stripe.net.ApiResource
checkNullTypedParams, getGlobalResponseGetter, getResponseGetter, setExpandableFieldId, setGlobalResponseGetter, urlEncode, urlEncodeIdMethods inherited from class com.stripe.model.StripeObject
deserializeStripeObject, deserializeStripeObject, deserializeStripeObject, deserializeStripeObject, equals, getLastResponse, getRawJsonObject, setLastResponse, toJson, toStringMethods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface com.stripe.model.StripeActiveObject
trySetResponseGetter
-
Constructor Details
-
File
public File()
-
-
Method Details
-
create
To upload a file to Stripe, you need to send a request of typemultipart/form-data. Include the file you want to upload in the request, and the parameters for creating a file.All of Stripe’s officially supported Client libraries support sending
multipart/form-data.- Throws:
StripeException
-
create
To upload a file to Stripe, you need to send a request of typemultipart/form-data. Include the file you want to upload in the request, and the parameters for creating a file.All of Stripe’s officially supported Client libraries support sending
multipart/form-data.- Throws:
StripeException
-
create
To upload a file to Stripe, you need to send a request of typemultipart/form-data. Include the file you want to upload in the request, and the parameters for creating a file.All of Stripe’s officially supported Client libraries support sending
multipart/form-data.- Throws:
StripeException
-
create
To upload a file to Stripe, you need to send a request of typemultipart/form-data. Include the file you want to upload in the request, and the parameters for creating a file.All of Stripe’s officially supported Client libraries support sending
multipart/form-data.- Throws:
StripeException
-
list
Returns a list of the files that your account has access to. Stripe sorts and returns the files by their creation dates, placing the most recently created files at the top.- Throws:
StripeException
-
list
public static FileCollection list(Map<String, Object> params, RequestOptions options) throws StripeExceptionReturns a list of the files that your account has access to. Stripe sorts and returns the files by their creation dates, placing the most recently created files at the top.- Throws:
StripeException
-
list
Returns a list of the files that your account has access to. Stripe sorts and returns the files by their creation dates, placing the most recently created files at the top.- Throws:
StripeException
-
list
public static FileCollection list(FileListParams params, RequestOptions options) throws StripeException Returns a list of the files that your account has access to. Stripe sorts and returns the files by their creation dates, placing the most recently created files at the top.- Throws:
StripeException
-
retrieve
Retrieves the details of an existing file object. After you supply a unique file ID, Stripe returns the corresponding file object. Learn how to access file contents.- Throws:
StripeException
-
retrieve
Retrieves the details of an existing file object. After you supply a unique file ID, Stripe returns the corresponding file object. Learn how to access file contents.- Throws:
StripeException
-
retrieve
public static File retrieve(String file, Map<String, Object> params, RequestOptions options) throws StripeExceptionRetrieves the details of an existing file object. After you supply a unique file ID, Stripe returns the corresponding file object. Learn how to access file contents.- Throws:
StripeException
-
retrieve
public static File retrieve(String file, FileRetrieveParams params, RequestOptions options) throws StripeException Retrieves the details of an existing file object. After you supply a unique file ID, Stripe returns the corresponding file object. Learn how to access file contents.- Throws:
StripeException
-
setResponseGetter
Description copied from interface:StripeActiveObjectMethod is used by the containing object orStripeResponseGetterimplementations to set theStripeResponseGetterinstance used to make further requests.- Specified by:
setResponseGetterin interfaceStripeActiveObject- Overrides:
setResponseGetterin classApiResource- Parameters:
responseGetter- theStripeResponseGetterinstance to use for making further requests.
-
getCreated
Time at which the object was created. Measured in seconds since the Unix epoch. -
getExpiresAt
The file expires and isn't available at this time in epoch seconds. -
getFilename
The suitable name for saving the file to a filesystem. -
getLinks
A list of file links that point at this file. -
getObject
String representing the object's type. Objects of the same type share the same value.Equal to
file. -
getPurpose
The purpose of the uploaded file.One of
account_requirement,additional_verification,business_icon,business_logo,customer_signature,dispute_evidence,document_provider_identity_document,finance_report_run,financial_account_statement,identity_document,identity_document_downloadable,issuing_regulatory_reporting,pci_document,selfie,sigma_scheduled_query,tax_document_user_upload,terminal_android_apk, orterminal_reader_splashscreen. -
getSize
The size of the file object in bytes. -
getTitle
A suitable title for the document. -
getType
The returned file type (for example,csv,pdf,jpg, orpng). -
getUrl
Use your live secret API key to download the file from this URL. -
setCreated
Time at which the object was created. Measured in seconds since the Unix epoch. -
setExpiresAt
The file expires and isn't available at this time in epoch seconds. -
setFilename
The suitable name for saving the file to a filesystem. -
setId
Unique identifier for the object. -
setLinks
A list of file links that point at this file. -
setObject
String representing the object's type. Objects of the same type share the same value.Equal to
file. -
setPurpose
The purpose of the uploaded file.One of
account_requirement,additional_verification,business_icon,business_logo,customer_signature,dispute_evidence,document_provider_identity_document,finance_report_run,financial_account_statement,identity_document,identity_document_downloadable,issuing_regulatory_reporting,pci_document,selfie,sigma_scheduled_query,tax_document_user_upload,terminal_android_apk, orterminal_reader_splashscreen. -
setSize
The size of the file object in bytes. -
setTitle
A suitable title for the document. -
setType
The returned file type (for example,csv,pdf,jpg, orpng). -
setUrl
Use your live secret API key to download the file from this URL. -
equals
-
canEqual
-
hashCode
public int hashCode() -
getId
Unique identifier for the object.
-