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_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 need to send a request of typemultipart/form-data
.static File
create
(FileCreateParams params, RequestOptions options) To upload a file to Stripe, you need to send a request of typemultipart/form-data
.static File
To upload a file to Stripe, you 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 need to send a request of typemultipart/form-data
.boolean
Time 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.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 file expires and isn't available at this time in epoch seconds.void
setFilename
(String filename) The suitable name for saving the file 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
setResponseGetter
(StripeResponseGetter responseGetter) Method is used by the containing object orStripeResponseGetter
implementations to set theStripeResponseGetter
instance used to make further requests.void
The size of the file object in bytes.void
A suitable title for the document.void
The returned file type (for example,csv
,pdf
,jpg
, orpng
).void
Use your live secret API key to download the file from this URL.Methods inherited from class com.stripe.net.ApiResource
checkNullTypedParams, getGlobalResponseGetter, getResponseGetter, setExpandableFieldId, setStripeResponseGetter, urlEncode, urlEncodeId
Methods inherited from class com.stripe.model.StripeObject
deserializeStripeObject, deserializeStripeObject, deserializeStripeObject, equals, getLastResponse, getRawJsonObject, setLastResponse, toJson, toString
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
Methods 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:StripeActiveObject
Method is used by the containing object orStripeResponseGetter
implementations to set theStripeResponseGetter
instance used to make further requests.- Specified by:
setResponseGetter
in interfaceStripeActiveObject
- Overrides:
setResponseGetter
in classApiResource
- Parameters:
responseGetter
- theStripeResponseGetter
instance 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
,identity_document
,identity_document_downloadable
,issuing_regulatory_reporting
,pci_document
,selfie
,sigma_scheduled_query
,tax_document_user_upload
, 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
,identity_document
,identity_document_downloadable
,issuing_regulatory_reporting
,pci_document
,selfie
,sigma_scheduled_query
,tax_document_user_upload
, 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.
-