Sha256: 5114160cc986f7e3da882c084e7117752012c035b1e60abde9d2197e610d2bff

Contents?: true

Size: 1.19 KB

Versions: 49

Compression:

Stored size: 1.19 KB

Contents

# File generated from our OpenAPI spec
# frozen_string_literal: true

module Stripe
  # 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.
  class FileLink < APIResource
    extend Stripe::APIOperations::Create
    extend Stripe::APIOperations::List
    include Stripe::APIOperations::Save

    OBJECT_NAME = "file_link"
    def self.object_name
      "file_link"
    end

    # Creates a new file link object.
    def self.create(params = {}, opts = {})
      request_stripe_object(method: :post, path: "/v1/file_links", params: params, opts: opts)
    end

    # Returns a list of file links.
    def self.list(filters = {}, opts = {})
      request_stripe_object(method: :get, path: "/v1/file_links", params: filters, opts: opts)
    end

    # Updates an existing file link object. Expired links can no longer be updated.
    def self.update(id, params = {}, opts = {})
      request_stripe_object(
        method: :post,
        path: format("/v1/file_links/%<id>s", { id: CGI.escape(id) }),
        params: params,
        opts: opts
      )
    end
  end
end

Version data entries

49 entries across 49 versions & 1 rubygems

Version Path
stripe-13.3.0.pre.beta.1 lib/stripe/resources/file_link.rb
stripe-13.2.0 lib/stripe/resources/file_link.rb
stripe-13.1.2 lib/stripe/resources/file_link.rb
stripe-13.2.0.pre.beta.3 lib/stripe/resources/file_link.rb
stripe-13.2.0.pre.beta.2 lib/stripe/resources/file_link.rb
stripe-13.1.1 lib/stripe/resources/file_link.rb
stripe-13.2.0.pre.beta.1 lib/stripe/resources/file_link.rb
stripe-13.1.0 lib/stripe/resources/file_link.rb
stripe-13.0.2 lib/stripe/resources/file_link.rb
stripe-13.1.0.pre.beta.3 lib/stripe/resources/file_link.rb
stripe-13.0.1 lib/stripe/resources/file_link.rb
stripe-13.1.0.pre.beta.2 lib/stripe/resources/file_link.rb
stripe-13.0.0 lib/stripe/resources/file_link.rb
stripe-12.7.0.pre.beta.2 lib/stripe/resources/file_link.rb
stripe-12.7.0.pre.beta.1 lib/stripe/resources/file_link.rb
stripe-12.6.0 lib/stripe/resources/file_link.rb
stripe-12.6.0.pre.beta.1 lib/stripe/resources/file_link.rb
stripe-12.5.0 lib/stripe/resources/file_link.rb
stripe-12.5.0.pre.beta.2 lib/stripe/resources/file_link.rb
stripe-12.5.0.pre.beta.1 lib/stripe/resources/file_link.rb