Class File

All Implemented Interfaces:
HasId, StripeObjectInterface

public class File extends ApiResource implements HasId
  • Constructor Details

    • File

      public File()
  • Method Details

    • create

      public static File create(Map<String,Object> params) throws StripeException
      To upload a file to Stripe, you’ll need to send a request of type multipart/form-data. The request should contain the file you would like to upload, as well as the parameters for creating a file.
      Throws:
      StripeException
    • create

      public static File create(FileCreateParams params) throws StripeException
      To upload a file to Stripe, you’ll need to send a request of type multipart/form-data. The request should contain the file you would like to upload, as well as the parameters for creating a file.
      Throws:
      StripeException
    • create

      public static File create(FileCreateParams params, RequestOptions options) throws StripeException
      To upload a file to Stripe, you’ll need to send a request of type multipart/form-data. The request should contain the file you would like to upload, as well as the parameters for creating a file.
      Throws:
      StripeException
    • create

      public static File create(Map<String,Object> params, RequestOptions options) throws StripeException
      To upload a file to Stripe, you’ll need to send a request of type multipart/form-data. The request should contain the file you would like to upload, as well as the parameters for creating a file.
      Throws:
      StripeException
    • list

      public static FileCollection list(Map<String,Object> params) 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
    • list

      public static FileCollection list(Map<String,Object> 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
    • list

      public static FileCollection list(FileListParams params) 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
    • 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

      public static File retrieve(String id) 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.
      Throws:
      StripeException
    • retrieve

      public static File retrieve(String id, 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.
      Throws:
      StripeException
    • retrieve

      public static File retrieve(String id, Map<String,Object> 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.
      Throws:
      StripeException
    • getCreated

      public Long getCreated()
      Time at which the object was created. Measured in seconds since the Unix epoch.
    • getExpiresAt

      public Long getExpiresAt()
      The time at which the file expires and is no longer available in epoch seconds.
    • getFilename

      public String getFilename()
      A filename for the file, suitable for saving to a filesystem.
    • getLinks

      public FileLinkCollection getLinks()
    • getObject

      public String getObject()
      String representing the object's type. Objects of the same type share the same value.
    • getPurpose

      public String getPurpose()
      The purpose of the file. Possible values are business_icon, business_logo, customer_signature, dispute_evidence, finance_report_run, identity_document, pci_document, sigma_scheduled_query, or tax_document_user_upload.
    • getSize

      public Long getSize()
      The size in bytes of the file object.
    • getTitle

      public String getTitle()
      A user friendly title for the document.
    • getType

      public String getType()
      The type of the file returned (e.g., csv, pdf, jpg, or png).
    • getUrl

      public String getUrl()
      The URL from which the file can be downloaded using your live secret API key.
    • setCreated

      public void setCreated(Long created)
      Time at which the object was created. Measured in seconds since the Unix epoch.
    • setExpiresAt

      public void setExpiresAt(Long expiresAt)
      The time at which the file expires and is no longer available in epoch seconds.
    • setFilename

      public void setFilename(String filename)
      A filename for the file, suitable for saving to a filesystem.
    • setId

      public void setId(String id)
      Unique identifier for the object.
    • setLinks

      public void setLinks(FileLinkCollection links)
    • setObject

      public void setObject(String object)
      String representing the object's type. Objects of the same type share the same value.
    • setPurpose

      public void setPurpose(String purpose)
      The purpose of the file. Possible values are business_icon, business_logo, customer_signature, dispute_evidence, finance_report_run, identity_document, pci_document, sigma_scheduled_query, or tax_document_user_upload.
    • setSize

      public void setSize(Long size)
      The size in bytes of the file object.
    • setTitle

      public void setTitle(String title)
      A user friendly title for the document.
    • setType

      public void setType(String type)
      The type of the file returned (e.g., csv, pdf, jpg, or png).
    • setUrl

      public void setUrl(String url)
      The URL from which the file can be downloaded using your live secret API key.
    • equals

      public boolean equals(Object o)
      Overrides:
      equals in class Object
    • canEqual

      protected boolean canEqual(Object other)
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object
    • getId

      public String getId()
      Unique identifier for the object.
      Specified by:
      getId in interface HasId