View Source ExOAPI.Stripe.SDK.Files (exoapi_stripe v0.1.4)

Link to this section Summary

Functions

description: <p>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.</p>

description: <p>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 <a href="/docs/file-upload#download-file-contents">File Upload Guide</a>.</p>

description: <p>To upload a file to Stripe, you’ll need to send a request of type <code>multipart/form-data</code>. The request should contain the file you would like to upload, as well as the parameters for creating a file.</p>

Link to this section Types

@type get_files_file_opts() :: {:expand, String.t()}
@type get_files_opts() ::
  {:starting_after, String.t()}
  | {:purpose, String.t()}
  | {:limit, String.t()}
  | {:expand, String.t()}
  | {:ending_before, String.t()}
  | {:created, String.t()}

Link to this section Functions

Link to this function

get_files(client, opts \\ [])

View Source
@spec get_files(client :: ExOAPI.Client.t(), [get_files_opts()]) ::
  {:ok,
   ExOAPI.Stripe.Schemas.Error.t()
   | %{
       url: String.t(),
       object: String.t() | :list,
       has_more: boolean(),
       data: [ExOAPI.Stripe.Schemas.File.t()]
     }
   | map()}
  | {:error, any()}

description: <p>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.</p>

Link to this function

get_files_file(client, file, opts \\ [])

View Source
@spec get_files_file(
  client :: ExOAPI.Client.t(),
  file :: String.t(),
  [get_files_file_opts()]
) ::
  {:ok,
   ExOAPI.Stripe.Schemas.Error.t() | ExOAPI.Stripe.Schemas.File.t() | map()}
  | {:error, any()}

description: <p>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 <a href="/docs/file-upload#download-file-contents">File Upload Guide</a>.</p>

Link to this function

post_files(client, body)

View Source
@spec post_files(client :: ExOAPI.Client.t(), body :: Tesla.Multipart.t()) ::
  {:ok,
   ExOAPI.Stripe.Schemas.Error.t() | ExOAPI.Stripe.Schemas.File.t() | map()}
  | {:error, any()}

description: <p>To upload a file to Stripe, you’ll need to send a request of type <code>multipart/form-data</code>. The request should contain the file you would like to upload, as well as the parameters for creating a file.</p>

All of Stripe’s officially supported Client libraries should have support for sending multipart/form-data.