Package com.stripe.model
Class FileLink
java.lang.Object
com.stripe.model.StripeObject
com.stripe.net.ApiResource
com.stripe.model.FileLink
- All Implemented Interfaces:
HasId
,MetadataStore<FileLink>
,StripeActiveObject
,StripeObjectInterface
To share the contents of a
File
object with non-Stripe users, you can create a
FileLink
. FileLink
s contain a URL that you can use to retrieve the contents of the file
without authentication.-
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 FileLink
create
(FileLinkCreateParams params) Creates a new file link object.static FileLink
create
(FileLinkCreateParams params, RequestOptions options) Creates a new file link object.static FileLink
Creates a new file link object.static FileLink
create
(Map<String, Object> params, RequestOptions options) Creates a new file link object.boolean
Time at which the object was created.Returns if the link is already expired.Time that the link expires.getFile()
Get ID of expandablefile
object.Get expandedfile
.getId()
Unique identifier for the object.Has the valuetrue
if the object exists in live mode or the valuefalse
if the object exists in test mode.Set of key-value pairs that you can attach to an object.String representing the object's type.getUrl()
The publicly accessible URL to download the file.int
hashCode()
static FileLinkCollection
list
(FileLinkListParams params) Returns a list of file links.static FileLinkCollection
list
(FileLinkListParams params, RequestOptions options) Returns a list of file links.static FileLinkCollection
Returns a list of file links.static FileLinkCollection
list
(Map<String, Object> params, RequestOptions options) Returns a list of file links.static FileLink
Retrieves the file link with the given ID.static FileLink
retrieve
(String link, RequestOptions options) Retrieves the file link with the given ID.static FileLink
retrieve
(String link, FileLinkRetrieveParams params, RequestOptions options) Retrieves the file link with the given ID.static FileLink
Retrieves the file link with the given ID.void
setCreated
(Long created) Time at which the object was created.void
setExpired
(Boolean expired) Returns if the link is already expired.void
setExpiresAt
(Long expiresAt) Time that the link expires.void
void
setFileObject
(File expandableObject) void
Unique identifier for the object.void
setLivemode
(Boolean livemode) Has the valuetrue
if the object exists in live mode or the valuefalse
if the object exists in test mode.void
setMetadata
(Map<String, String> metadata) Set of key-value pairs that you can attach to an object.void
String representing the object's type.void
setResponseGetter
(StripeResponseGetter responseGetter) Method is used by the containing object orStripeResponseGetter
implementations to set theStripeResponseGetter
instance used to make further requests.void
The publicly accessible URL to download the file.update
(FileLinkUpdateParams params) Updates an existing file link object.update
(FileLinkUpdateParams params, RequestOptions options) Updates an existing file link object.Updates an existing file link object.update
(Map<String, Object> params, RequestOptions options) Updates an existing file link object.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
-
FileLink
public FileLink()
-
-
Method Details
-
getFile
Get ID of expandablefile
object. -
setFile
-
getFileObject
Get expandedfile
. -
setFileObject
-
create
Creates a new file link object.- Throws:
StripeException
-
create
public static FileLink create(Map<String, Object> params, RequestOptions options) throws StripeExceptionCreates a new file link object.- Throws:
StripeException
-
create
Creates a new file link object.- Throws:
StripeException
-
create
public static FileLink create(FileLinkCreateParams params, RequestOptions options) throws StripeException Creates a new file link object.- Throws:
StripeException
-
list
Returns a list of file links.- Throws:
StripeException
-
list
public static FileLinkCollection list(Map<String, Object> params, RequestOptions options) throws StripeExceptionReturns a list of file links.- Throws:
StripeException
-
list
Returns a list of file links.- Throws:
StripeException
-
list
public static FileLinkCollection list(FileLinkListParams params, RequestOptions options) throws StripeException Returns a list of file links.- Throws:
StripeException
-
retrieve
Retrieves the file link with the given ID.- Throws:
StripeException
-
retrieve
Retrieves the file link with the given ID.- Throws:
StripeException
-
retrieve
public static FileLink retrieve(String link, Map<String, Object> params, RequestOptions options) throws StripeExceptionRetrieves the file link with the given ID.- Throws:
StripeException
-
retrieve
public static FileLink retrieve(String link, FileLinkRetrieveParams params, RequestOptions options) throws StripeException Retrieves the file link with the given ID.- Throws:
StripeException
-
update
Updates an existing file link object. Expired links can no longer be updated.- Specified by:
update
in interfaceMetadataStore<FileLink>
- Throws:
StripeException
-
update
Updates an existing file link object. Expired links can no longer be updated.- Specified by:
update
in interfaceMetadataStore<FileLink>
- Throws:
StripeException
-
update
Updates an existing file link object. Expired links can no longer be updated.- Throws:
StripeException
-
update
Updates an existing file link object. Expired links can no longer be updated.- 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. -
getExpired
Returns if the link is already expired. -
getExpiresAt
Time that the link expires. -
getLivemode
Has the valuetrue
if the object exists in live mode or the valuefalse
if the object exists in test mode. -
getObject
String representing the object's type. Objects of the same type share the same value.Equal to
file_link
. -
getUrl
The publicly accessible URL to download the file. -
setCreated
Time at which the object was created. Measured in seconds since the Unix epoch. -
setExpired
Returns if the link is already expired. -
setExpiresAt
Time that the link expires. -
setId
Unique identifier for the object. -
setLivemode
Has the valuetrue
if the object exists in live mode or the valuefalse
if the object exists in test mode. -
setMetadata
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. -
setObject
String representing the object's type. Objects of the same type share the same value.Equal to
file_link
. -
setUrl
The publicly accessible URL to download the file. -
equals
-
canEqual
-
hashCode
public int hashCode() -
getId
Unique identifier for the object. -
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<FileLink>
-