Class File
- All Implemented Interfaces:
HasId
,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
Fields inherited from class com.stripe.model.StripeObject
PRETTY_PRINT_GSON
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionprotected boolean
static File
create
(FileCreateParams params) To upload a file to Stripe, you’ll need to send a request of typemultipart/form-data
.static File
create
(FileCreateParams params, RequestOptions options) To upload a file to Stripe, you’ll need to send a request of typemultipart/form-data
.static File
To upload a file to Stripe, you’ll need to send a request of typemultipart/form-data
.static File
create
(Map<String, Object> params, RequestOptions options) To upload a file to Stripe, you’ll need to send a request of typemultipart/form-data
.boolean
Time at which the object was created.The time at which the file expires and is no longer available in epoch seconds.A filename for the file, suitable for saving 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 in bytes of the file object.getTitle()
A user friendly title for the document.getType()
The type of the file returned (e.g.,csv
,pdf
,jpg
, orpng
).getUrl()
The URL from which the file can be downloaded using your live secret API key.int
hashCode()
static FileCollection
list
(FileListParams params) Returns a list of the files that your account has access to.static FileCollection
list
(FileListParams params, RequestOptions options) Returns a list of the files that your account has access to.static FileCollection
Returns a list of the files that your account has access to.static FileCollection
list
(Map<String, Object> params, RequestOptions options) Returns a list of the files that your account has access to.static File
Retrieves the details of an existing file object.static File
retrieve
(String file, RequestOptions options) Retrieves the details of an existing file object.static File
retrieve
(String file, FileRetrieveParams params, RequestOptions options) Retrieves the details of an existing file object.static File
Retrieves the details of an existing file object.void
setCreated
(Long created) Time at which the object was created.void
setExpiresAt
(Long expiresAt) The time at which the file expires and is no longer available in epoch seconds.void
setFilename
(String filename) A filename for the file, suitable for saving to a filesystem.void
Unique identifier for the object.void
setLinks
(FileLinkCollection links) A list of file links that point at this file.void
String representing the object's type.void
setPurpose
(String purpose) The purpose of the uploaded file.void
The size in bytes of the file object.void
A user friendly title for the document.void
The type of the file returned (e.g.,csv
,pdf
,jpg
, orpng
).void
The URL from which the file can be downloaded using your live secret API key.Methods inherited from class com.stripe.net.ApiResource
checkNullTypedParams, classUrl, classUrl, fullUrl, instanceUrl, instanceUrl, rawRequest, request, request, requestCollection, requestCollection, requestSearchResult, requestSearchResult, requestStream, requestStream, setExpandableFieldId, setStripeResponseGetter, singleClassUrl, singleClassUrl, subresourceUrl, urlEncode, urlEncodeId
Methods inherited from class com.stripe.model.StripeObject
deserializeStripeObject, equals, getLastResponse, getRawJsonObject, setLastResponse, toJson, toString
-
Constructor Details
-
File
public File()
-
-
Method Details
-
create
To upload a file to Stripe, you’ll need to send a request of typemultipart/form-data
. The request should contain the file you would like to upload, as well as the parameters for creating a file.All of Stripe’s officially supported Client libraries should have support for sending
multipart/form-data
.- Throws:
StripeException
-
create
To upload a file to Stripe, you’ll need to send a request of typemultipart/form-data
. The request should contain the file you would like to upload, as well as the parameters for creating a file.All of Stripe’s officially supported Client libraries should have support for sending
multipart/form-data
.- Throws:
StripeException
-
create
To upload a file to Stripe, you’ll need to send a request of typemultipart/form-data
. The request should contain the file you would like to upload, as well as the parameters for creating a file.All of Stripe’s officially supported Client libraries should have support for sending
multipart/form-data
.- Throws:
StripeException
-
create
To upload a file to Stripe, you’ll need to send a request of typemultipart/form-data
. The request should contain the file you would like to upload, as well as the parameters for creating a file.All of Stripe’s officially supported Client libraries should have support for sending
multipart/form-data
.- Throws:
StripeException
-
list
Returns a list of the files that your account has access to. The files are returned sorted by creation date, with the most recently created files appearing first.- 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. The files are returned sorted by creation date, with the most recently created files appearing first.- Throws:
StripeException
-
list
Returns a list of the files that your account has access to. The files are returned sorted by creation date, with the most recently created files appearing first.- 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. The files are returned sorted by creation date, with the most recently created files appearing first.- Throws:
StripeException
-
retrieve
Retrieves the details of an existing file object. Supply the unique file ID from a file, and Stripe will return the corresponding file object. To access file contents, see the File Upload Guide.- Throws:
StripeException
-
retrieve
Retrieves the details of an existing file object. Supply the unique file ID from a file, and Stripe will return the corresponding file object. To access file contents, see the File Upload Guide.- Throws:
StripeException
-
retrieve
public static File retrieve(String file, Map<String, Object> params, RequestOptions options) throws StripeExceptionRetrieves the details of an existing file object. Supply the unique file ID from a file, and Stripe will return the corresponding file object. To access file contents, see the File Upload Guide.- Throws:
StripeException
-
retrieve
public static File retrieve(String file, FileRetrieveParams params, RequestOptions options) throws StripeException Retrieves the details of an existing file object. Supply the unique file ID from a file, and Stripe will return the corresponding file object. To access file contents, see the File Upload Guide.- Throws:
StripeException
-
getCreated
Time at which the object was created. Measured in seconds since the Unix epoch. -
getExpiresAt
The time at which the file expires and is no longer available in epoch seconds. -
getFilename
A filename for the file, suitable for saving 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
,identity_document
,identity_document_downloadable
,pci_document
,selfie
,sigma_scheduled_query
,tax_document_user_upload
, orterminal_reader_splashscreen
. -
getSize
The size in bytes of the file object. -
getTitle
A user friendly title for the document. -
getType
The type of the file returned (e.g.,csv
,pdf
,jpg
, orpng
). -
getUrl
The URL from which the file can be downloaded using your live secret API key. -
setCreated
Time at which the object was created. Measured in seconds since the Unix epoch. -
setExpiresAt
The time at which the file expires and is no longer available in epoch seconds. -
setFilename
A filename for the file, suitable for saving 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
,identity_document
,identity_document_downloadable
,pci_document
,selfie
,sigma_scheduled_query
,tax_document_user_upload
, orterminal_reader_splashscreen
. -
setSize
The size in bytes of the file object. -
setTitle
A user friendly title for the document. -
setType
The type of the file returned (e.g.,csv
,pdf
,jpg
, orpng
). -
setUrl
The URL from which the file can be downloaded using your live secret API key. -
equals
-
canEqual
-
hashCode
public int hashCode() -
getId
Unique identifier for the object.
-