stripe-ruby/rbi/stripe/services/file_link_service.rbi
2025-03-28 16:54:47 +00:00

124 lines
6.9 KiB
Ruby

# File generated from our OpenAPI spec
# frozen_string_literal: true
# typed: true
module Stripe
class FileLinkService < StripeService
class ListParams < Stripe::RequestParams
class Created < Stripe::RequestParams
# Minimum value to filter by (exclusive)
sig { returns(T.nilable(Integer)) }
attr_accessor :gt
# Minimum value to filter by (inclusive)
sig { returns(T.nilable(Integer)) }
attr_accessor :gte
# Maximum value to filter by (exclusive)
sig { returns(T.nilable(Integer)) }
attr_accessor :lt
# Maximum value to filter by (inclusive)
sig { returns(T.nilable(Integer)) }
attr_accessor :lte
sig {
params(gt: T.nilable(Integer), gte: T.nilable(Integer), lt: T.nilable(Integer), lte: T.nilable(Integer)).void
}
def initialize(gt: nil, gte: nil, lt: nil, lte: nil); end
end
# Only return links that were created during the given date interval.
sig { returns(T.nilable(T.any(::Stripe::FileLinkService::ListParams::Created, Integer))) }
attr_accessor :created
# A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list.
sig { returns(T.nilable(String)) }
attr_accessor :ending_before
# Specifies which fields in the response should be expanded.
sig { returns(T.nilable(T::Array[String])) }
attr_accessor :expand
# Filter links by their expiration status. By default, Stripe returns all links.
sig { returns(T.nilable(T::Boolean)) }
attr_accessor :expired
# Only return links for the given file.
sig { returns(T.nilable(String)) }
attr_accessor :file
# A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10.
sig { returns(T.nilable(Integer)) }
attr_accessor :limit
# A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list.
sig { returns(T.nilable(String)) }
attr_accessor :starting_after
sig {
params(created: T.nilable(T.any(::Stripe::FileLinkService::ListParams::Created, Integer)), ending_before: T.nilable(String), expand: T.nilable(T::Array[String]), expired: T.nilable(T::Boolean), file: T.nilable(String), limit: T.nilable(Integer), starting_after: T.nilable(String)).void
}
def initialize(
created: nil,
ending_before: nil,
expand: nil,
expired: nil,
file: nil,
limit: nil,
starting_after: nil
); end
end
class CreateParams < Stripe::RequestParams
# Specifies which fields in the response should be expanded.
sig { returns(T.nilable(T::Array[String])) }
attr_accessor :expand
# The link isn't usable after this future timestamp.
sig { returns(T.nilable(Integer)) }
attr_accessor :expires_at
# The ID of the file. The file's `purpose` must be one of the following: `business_icon`, `business_logo`, `customer_signature`, `dispute_evidence`, `finance_report_run`, `financial_account_statement`, `identity_document_downloadable`, `issuing_regulatory_reporting`, `pci_document`, `selfie`, `sigma_scheduled_query`, `tax_document_user_upload`, or `terminal_reader_splashscreen`.
sig { returns(String) }
attr_accessor :file
# Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`.
sig { returns(T.nilable(T.nilable(T.any(String, T::Hash[String, String])))) }
attr_accessor :metadata
sig {
params(expand: T.nilable(T::Array[String]), expires_at: T.nilable(Integer), file: String, metadata: T.nilable(T.nilable(T.any(String, T::Hash[String, String])))).void
}
def initialize(expand: nil, expires_at: nil, file: nil, metadata: nil); end
end
class RetrieveParams < Stripe::RequestParams
# Specifies which fields in the response should be expanded.
sig { returns(T.nilable(T::Array[String])) }
attr_accessor :expand
sig { params(expand: T.nilable(T::Array[String])).void }
def initialize(expand: nil); end
end
class UpdateParams < Stripe::RequestParams
# Specifies which fields in the response should be expanded.
sig { returns(T.nilable(T::Array[String])) }
attr_accessor :expand
# A future timestamp after which the link will no longer be usable, or `now` to expire the link immediately.
sig { returns(T.nilable(T.nilable(T.any(String, T.any(String, Integer))))) }
attr_accessor :expires_at
# Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`.
sig { returns(T.nilable(T.nilable(T.any(String, T::Hash[String, String])))) }
attr_accessor :metadata
sig {
params(expand: T.nilable(T::Array[String]), expires_at: T.nilable(T.nilable(T.any(String, T.any(String, Integer)))), metadata: T.nilable(T.nilable(T.any(String, T::Hash[String, String])))).void
}
def initialize(expand: nil, expires_at: nil, metadata: nil); end
end
# Creates a new file link object.
sig {
params(params: T.any(::Stripe::FileLinkService::CreateParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::FileLink)
}
def create(params = {}, opts = {}); end
# Returns a list of file links.
sig {
params(params: T.any(::Stripe::FileLinkService::ListParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::ListObject)
}
def list(params = {}, opts = {}); end
# Retrieves the file link with the given ID.
sig {
params(link: String, params: T.any(::Stripe::FileLinkService::RetrieveParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::FileLink)
}
def retrieve(link, params = {}, opts = {}); end
# Updates an existing file link object. Expired links can no longer be updated.
sig {
params(link: String, params: T.any(::Stripe::FileLinkService::UpdateParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::FileLink)
}
def update(link, params = {}, opts = {}); end
end
end