Arie/serveme

View on GitHub
sorbet/rbi/gems/stripe@8.5.0.rbi

Summary

Maintainability
Test Coverage
# typed: true

# DO NOT EDIT MANUALLY
# This is an autogenerated file for types exported from the `stripe` gem.
# Please instead update this file by running `bin/tapioca gem stripe`.

# File generated from our OpenAPI spec
#
# source://stripe//lib/stripe/version.rb#3
module Stripe
  class << self
    # source://forwardable/1.3.3/forwardable.rb#231
    def api_base(*args, **_arg1, &block); end

    # source://forwardable/1.3.3/forwardable.rb#231
    def api_base=(*args, **_arg1, &block); end

    # source://forwardable/1.3.3/forwardable.rb#231
    def api_key(*args, **_arg1, &block); end

    # source://forwardable/1.3.3/forwardable.rb#231
    def api_key=(*args, **_arg1, &block); end

    # source://forwardable/1.3.3/forwardable.rb#231
    def api_version(*args, **_arg1, &block); end

    # source://forwardable/1.3.3/forwardable.rb#231
    def api_version=(*args, **_arg1, &block); end

    # Gets the application for a plugin that's identified some. See
    # #set_app_info.
    #
    # source://stripe//lib/stripe.rb#97
    def app_info; end

    # source://stripe//lib/stripe.rb#101
    def app_info=(info); end

    # source://forwardable/1.3.3/forwardable.rb#231
    def ca_bundle_path(*args, **_arg1, &block); end

    # source://forwardable/1.3.3/forwardable.rb#231
    def ca_bundle_path=(*args, **_arg1, &block); end

    # source://forwardable/1.3.3/forwardable.rb#231
    def ca_store(*args, **_arg1, &block); end

    # source://forwardable/1.3.3/forwardable.rb#231
    def client_id(*args, **_arg1, &block); end

    # source://forwardable/1.3.3/forwardable.rb#231
    def client_id=(*args, **_arg1, &block); end

    # Returns the value of attribute config.
    #
    # source://stripe//lib/stripe.rb#68
    def config; end

    # source://forwardable/1.3.3/forwardable.rb#231
    def connect_base(*args, **_arg1, &block); end

    # source://forwardable/1.3.3/forwardable.rb#231
    def connect_base=(*args, **_arg1, &block); end

    # source://forwardable/1.3.3/forwardable.rb#231
    def enable_telemetry=(*args, **_arg1, &block); end

    # source://forwardable/1.3.3/forwardable.rb#231
    def enable_telemetry?(*args, **_arg1, &block); end

    # source://forwardable/1.3.3/forwardable.rb#231
    def initial_network_retry_delay(*args, **_arg1, &block); end

    # source://forwardable/1.3.3/forwardable.rb#231
    def log_level(*args, **_arg1, &block); end

    # source://forwardable/1.3.3/forwardable.rb#231
    def log_level=(*args, **_arg1, &block); end

    # source://forwardable/1.3.3/forwardable.rb#231
    def logger(*args, **_arg1, &block); end

    # source://forwardable/1.3.3/forwardable.rb#231
    def logger=(*args, **_arg1, &block); end

    # source://forwardable/1.3.3/forwardable.rb#231
    def max_network_retries(*args, **_arg1, &block); end

    # source://forwardable/1.3.3/forwardable.rb#231
    def max_network_retries=(*args, **_arg1, &block); end

    # source://forwardable/1.3.3/forwardable.rb#231
    def max_network_retry_delay(*args, **_arg1, &block); end

    # source://forwardable/1.3.3/forwardable.rb#231
    def open_timeout(*args, **_arg1, &block); end

    # source://forwardable/1.3.3/forwardable.rb#231
    def open_timeout=(*args, **_arg1, &block); end

    # source://forwardable/1.3.3/forwardable.rb#231
    def proxy(*args, **_arg1, &block); end

    # source://forwardable/1.3.3/forwardable.rb#231
    def proxy=(*args, **_arg1, &block); end

    # source://forwardable/1.3.3/forwardable.rb#231
    def read_timeout(*args, **_arg1, &block); end

    # source://forwardable/1.3.3/forwardable.rb#231
    def read_timeout=(*args, **_arg1, &block); end

    # Sets some basic information about the running application that's sent along
    # with API requests. Useful for plugin authors to identify their plugin when
    # communicating with Stripe.
    #
    # Takes a name and optional partner program ID, plugin URL, and version.
    #
    # source://stripe//lib/stripe.rb#110
    def set_app_info(name, partner_id: T.unsafe(nil), url: T.unsafe(nil), version: T.unsafe(nil)); end

    # source://forwardable/1.3.3/forwardable.rb#231
    def stripe_account(*args, **_arg1, &block); end

    # source://forwardable/1.3.3/forwardable.rb#231
    def stripe_account=(*args, **_arg1, &block); end

    # source://forwardable/1.3.3/forwardable.rb#231
    def uploads_base(*args, **_arg1, &block); end

    # source://forwardable/1.3.3/forwardable.rb#231
    def uploads_base=(*args, **_arg1, &block); end

    # source://forwardable/1.3.3/forwardable.rb#231
    def verify_ssl_certs(*args, **_arg1, &block); end

    # source://forwardable/1.3.3/forwardable.rb#231
    def verify_ssl_certs=(*args, **_arg1, &block); end

    # source://forwardable/1.3.3/forwardable.rb#231
    def write_timeout(*args, **_arg1, &block); end

    # source://forwardable/1.3.3/forwardable.rb#231
    def write_timeout=(*args, **_arg1, &block); end
  end
end

# APIConnectionError is raised in the event that the SDK can't connect to
# Stripe's servers. That can be for a variety of different reasons from a
# downed network to a bad TLS certificate.
#
# source://stripe//lib/stripe/errors.rb#63
class Stripe::APIConnectionError < ::Stripe::StripeError; end

# APIError is a generic error that may be raised in cases where none of the
# other named errors cover the problem. It could also be raised in the case
# that a new error has been introduced in the API, but this version of the
# Ruby SDK doesn't know how to handle it.
#
# source://stripe//lib/stripe/errors.rb#70
class Stripe::APIError < ::Stripe::StripeError; end

# source://stripe//lib/stripe/api_operations/create.rb#4
module Stripe::APIOperations; end

# source://stripe//lib/stripe/api_operations/create.rb#5
module Stripe::APIOperations::Create
  # source://stripe//lib/stripe/api_operations/create.rb#6
  def create(params = T.unsafe(nil), opts = T.unsafe(nil)); end
end

# source://stripe//lib/stripe/api_operations/delete.rb#5
module Stripe::APIOperations::Delete
  mixes_in_class_methods ::Stripe::APIOperations::Delete::ClassMethods

  # source://stripe//lib/stripe/api_operations/delete.rb#30
  def delete(params = T.unsafe(nil), opts = T.unsafe(nil)); end

  class << self
    # @private
    #
    # source://stripe//lib/stripe/api_operations/delete.rb#39
    def included(base); end
  end
end

# source://stripe//lib/stripe/api_operations/delete.rb#6
module Stripe::APIOperations::Delete::ClassMethods
  # Deletes an API resource
  #
  # Deletes the identified resource with the passed in parameters.
  #
  # ==== Attributes
  #
  # * +id+ - ID of the resource to delete.
  # * +params+ - A hash of parameters to pass to the API
  # * +opts+ - A Hash of additional options (separate from the params /
  #   object values) to be added to the request. E.g. to allow for an
  #   idempotency_key to be passed in the request headers, or for the
  #   api_key to be overwritten. See
  #   {APIOperations::Request.execute_resource_request}.
  #
  # source://stripe//lib/stripe/api_operations/delete.rb#20
  def delete(id, params = T.unsafe(nil), opts = T.unsafe(nil)); end
end

# source://stripe//lib/stripe/api_operations/list.rb#5
module Stripe::APIOperations::List
  # source://stripe//lib/stripe/api_operations/list.rb#6
  def list(filters = T.unsafe(nil), opts = T.unsafe(nil)); end
end

# Adds methods to help manipulate a subresource from its parent resource so
# that it's possible to do so from a static context (i.e. without a
# pre-existing collection of subresources on the parent).
#
# For example, a transfer gains the static methods for reversals so that the
# methods `.create_reversal`, `.retrieve_reversal`, `.update_reversal`,
# etc. all become available.
#
# source://stripe//lib/stripe/api_operations/nested_resource.rb#12
module Stripe::APIOperations::NestedResource
  # @raise [ArgumentError]
  #
  # source://stripe//lib/stripe/api_operations/nested_resource.rb#13
  def nested_resource_class_methods(resource, path: T.unsafe(nil), operations: T.unsafe(nil), resource_plural: T.unsafe(nil)); end

  private

  # source://stripe//lib/stripe/api_operations/nested_resource.rb#38
  def define_operation(resource, operation, resource_url_method, resource_plural); end
end

# source://stripe//lib/stripe/api_operations/request.rb#5
module Stripe::APIOperations::Request
  mixes_in_class_methods ::Stripe::APIOperations::Request::ClassMethods

  protected

  # source://stripe//lib/stripe/api_operations/request.rb#115
  def execute_resource_request(method, url, params = T.unsafe(nil), opts = T.unsafe(nil)); end

  # source://stripe//lib/stripe/api_operations/request.rb#121
  def execute_resource_request_stream(method, url, params = T.unsafe(nil), opts = T.unsafe(nil), &read_body_chunk_block); end

  # See notes on `alias` above.
  #
  # source://stripe//lib/stripe/api_operations/request.rb#115
  def request(method, url, params = T.unsafe(nil), opts = T.unsafe(nil)); end

  private

  # source://stripe//lib/stripe/api_operations/request.rb#130
  def request_stripe_object(method:, path:, params:, opts: T.unsafe(nil)); end

  class << self
    # @private
    #
    # source://stripe//lib/stripe/api_operations/request.rb#111
    def included(base); end
  end
end

# source://stripe//lib/stripe/api_operations/request.rb#6
module Stripe::APIOperations::Request::ClassMethods
  # source://stripe//lib/stripe/api_operations/request.rb#7
  def execute_resource_request(method, url, params = T.unsafe(nil), opts = T.unsafe(nil)); end

  # source://stripe//lib/stripe/api_operations/request.rb#14
  def execute_resource_request_stream(method, url, params = T.unsafe(nil), opts = T.unsafe(nil), &read_body_chunk_block); end

  # This method used to be called `request`, but it's such a short name
  # that it eventually conflicted with the name of a field on an API
  # resource (specifically, `Event#request`), so it was renamed to
  # something more unique.
  #
  # The former name had been around for just about forever though, and
  # although all internal uses have been renamed, I've left this alias in
  # place for backwards compatibility. Consider removing it on the next
  # major.
  #
  # source://stripe//lib/stripe/api_operations/request.rb#7
  def request(method, url, params = T.unsafe(nil), opts = T.unsafe(nil)); end

  private

  # @raise [ArgumentError]
  #
  # source://stripe//lib/stripe/api_operations/request.rb#94
  def error_on_invalid_params(params); end

  # source://stripe//lib/stripe/api_operations/request.rb#80
  def error_on_non_string_user_opts(opts); end

  # source://stripe//lib/stripe/api_operations/request.rb#32
  def execute_resource_request_internal(client_request_method_sym, method, url, params, opts, &read_body_chunk_block); end

  # source://stripe//lib/stripe/api_operations/request.rb#27
  def request_stripe_object(method:, path:, params:, opts: T.unsafe(nil)); end

  # source://stripe//lib/stripe/api_operations/request.rb#102
  def warn_on_opts_in_params(params); end
end

# source://stripe//lib/stripe/api_operations/save.rb#5
module Stripe::APIOperations::Save
  extend ::Gem::Deprecate

  mixes_in_class_methods ::Stripe::APIOperations::Save::ClassMethods

  # source://stripe//lib/stripe/api_operations/save.rb#56
  def _deprecated_save(params = T.unsafe(nil), opts = T.unsafe(nil)); end

  # The `save` method is DEPRECATED and will be removed in a future major
  # version of the library. Use the `update` method on the resource instead.
  #
  # Creates or updates an API resource.
  #
  # If the resource doesn't yet have an assigned ID and the resource is one
  # that can be created, then the method attempts to create the resource.
  # The resource is updated otherwise.
  #
  # ==== Attributes
  #
  # * +params+ - Overrides any parameters in the resource's serialized data
  #   and includes them in the create or update. If +:req_url:+ is included
  #   in the list, it overrides the update URL used for the create or
  #   update.
  # * +opts+ - A Hash of additional options (separate from the params /
  #   object values) to be added to the request. E.g. to allow for an
  #   idempotency_key to be passed in the request headers, or for the
  #   api_key to be overwritten. See
  #   {APIOperations::Request.execute_resource_request}.
  def save(*args, **_arg1, &block); end

  private

  # source://stripe//lib/stripe/api_operations/save.rb#92
  def save_url; end

  class << self
    # @private
    #
    # source://stripe//lib/stripe/api_operations/save.rb#79
    def included(base); end
  end
end

# source://stripe//lib/stripe/api_operations/save.rb#6
module Stripe::APIOperations::Save::ClassMethods
  # Updates an API resource
  #
  # Updates the identified resource with the passed in parameters.
  #
  # ==== Attributes
  #
  # * +id+ - ID of the resource to update.
  # * +params+ - A hash of parameters to pass to the API
  # * +opts+ - A Hash of additional options (separate from the params /
  #   object values) to be added to the request. E.g. to allow for an
  #   idempotency_key to be passed in the request headers, or for the
  #   api_key to be overwritten. See
  #   {APIOperations::Request.execute_resource_request}.
  #
  # source://stripe//lib/stripe/api_operations/save.rb#20
  def update(id, params = T.unsafe(nil), opts = T.unsafe(nil)); end
end

# source://stripe//lib/stripe/api_operations/search.rb#5
module Stripe::APIOperations::Search
  # source://stripe//lib/stripe/api_operations/search.rb#6
  def _search(search_url, filters = T.unsafe(nil), opts = T.unsafe(nil)); end
end

# source://stripe//lib/stripe/api_resource.rb#4
class Stripe::APIResource < ::Stripe::StripeObject
  include ::Stripe::APIOperations::Request
  extend ::Stripe::APIOperations::Request::ClassMethods

  # source://stripe//lib/stripe/api_resource.rb#80
  def refresh; end

  # source://stripe//lib/stripe/api_resource.rb#93
  def request_stripe_object(method:, path:, params:, opts: T.unsafe(nil)); end

  # source://stripe//lib/stripe/api_resource.rb#69
  def resource_url; end

  # A flag that can be set a behavior that will cause this resource to be
  # encoded and sent up along with an update of its parent resource. This is
  # usually not desirable because resources are updated individually on their
  # own endpoints, but there are certain cases, replacing a customer's source
  # for example, where this is allowed.
  #
  # source://stripe//lib/stripe/api_resource.rb#12
  def save_with_parent; end

  # A flag that can be set a behavior that will cause this resource to be
  # encoded and sent up along with an update of its parent resource. This is
  # usually not desirable because resources are updated individually on their
  # own endpoints, but there are certain cases, replacing a customer's source
  # for example, where this is allowed.
  #
  # source://stripe//lib/stripe/api_resource.rb#12
  def save_with_parent=(_arg0); end

  protected

  # source://stripe//lib/stripe/api_resource.rb#104
  def request_stream(method:, path:, params:, opts: T.unsafe(nil), &read_body_chunk_block); end

  class << self
    # source://stripe//lib/stripe/api_resource.rb#14
    def class_name; end

    # Adds a custom method to a resource class. This is used to add support for
    # non-CRUDL API requests, e.g. capturing charges. custom_method takes the
    # following parameters:
    # - name: the name of the custom method to create (as a symbol)
    # - http_verb: the HTTP verb for the API request (:get, :post, or :delete)
    # - http_path: the path to append to the resource's URL. If not provided,
    #              the name is used as the path
    #
    # For example, this call:
    #     custom_method :capture, http_verb: post
    # adds a `capture` class method to the resource class that, when called,
    # will send a POST request to `/v1/<object_name>/capture`.
    #
    # source://stripe//lib/stripe/api_resource.rb#65
    def custom_method(name, http_verb:, http_path: T.unsafe(nil)); end

    # source://stripe//lib/stripe/api_resource.rb#18
    def resource_url; end

    # source://stripe//lib/stripe/api_resource.rb#86
    def retrieve(id, opts = T.unsafe(nil)); end

    # A metaprogramming call that specifies that a field of a resource can be
    # its own type of API resource (say a nested card under an account for
    # example), and if that resource is set, it should be transmitted to the
    # API on a create or update. Doing so is not the default behavior because
    # API resources should normally be persisted on their own RESTful
    # endpoints.
    #
    # source://stripe//lib/stripe/api_resource.rb#35
    def save_nested_resource(name); end
  end
end

# The base class for nested TestHelpers classes in resource objects.
# The APIResourceTestHelpers handles URL generation and custom method
# support for test-helper methods.
#
#  class MyAPIResource < APIResource
#    class TestHelpers < APIResourceTestHelpers
#
# source://stripe//lib/stripe/api_resource_test_helpers.rb#10
class Stripe::APIResourceTestHelpers
  include ::Stripe::APIOperations::Request
  extend ::Stripe::APIOperations::Request::ClassMethods

  # @return [APIResourceTestHelpers] a new instance of APIResourceTestHelpers
  #
  # source://stripe//lib/stripe/api_resource_test_helpers.rb#13
  def initialize(resource); end

  # source://stripe//lib/stripe/api_resource_test_helpers.rb#38
  def resource_url; end

  class << self
    # Adds a custom method to a test helper. This is used to add support for
    # non-CRUDL API requests, e.g. capturing charges. custom_method takes the
    # following parameters:
    # - name: the name of the custom method to create (as a symbol)
    # - http_verb: the HTTP verb for the API request (:get, :post, or :delete)
    # - http_path: the path to append to the resource's URL. If not provided,
    #              the name is used as the path
    #
    # For example, this call:
    #     custom_method :capture, http_verb: post
    # adds a `capture` class method to the resource class that, when called,
    # will send a POST request to `/v1/<object_name>/capture`.
    #
    # source://stripe//lib/stripe/api_resource_test_helpers.rb#29
    def custom_method(name, http_verb:, http_path: T.unsafe(nil)); end

    # source://stripe//lib/stripe/api_resource_test_helpers.rb#33
    def resource_url; end
  end
end

# This is an object representing a Stripe account. You can retrieve it to see
# properties on the account like its current requirements or if the account is
# enabled to make live charges or receive payouts.
#
# For Custom accounts, the properties below are always returned. For other accounts, some properties are returned until that
# account has started to go through Connect Onboarding. Once you create an [Account Link](https://stripe.com/docs/api/account_links)
# for a Standard or Express account, some parameters are no longer returned. These are marked as **Custom Only** or **Custom and Express**
# below. Learn about the differences [between accounts](https://stripe.com/docs/connect/accounts).
#
# source://stripe//lib/stripe/resources/account.rb#13
class Stripe::Account < ::Stripe::APIResource
  include ::Stripe::APIOperations::Delete
  include ::Stripe::APIOperations::Save
  extend ::Gem::Deprecate
  extend ::Stripe::APIOperations::Create
  extend ::Stripe::APIOperations::Delete::ClassMethods
  extend ::Stripe::APIOperations::List
  extend ::Stripe::APIOperations::Save::ClassMethods
  extend ::Stripe::APIOperations::NestedResource

  # source://stripe//lib/stripe/resources/account.rb#157
  def deauthorize(client_id = T.unsafe(nil), opts = T.unsafe(nil)); end

  # source://stripe//lib/stripe/api_resource.rb#36
  def external_account=(value); end

  # source://stripe//lib/stripe/resources/account.rb#146
  def legal_entity; end

  # @raise [NoMethodError]
  #
  # source://stripe//lib/stripe/resources/account.rb#150
  def legal_entity=(_legal_entity); end

  # source://stripe//lib/stripe/resources/account.rb#29
  def persons(params = T.unsafe(nil), opts = T.unsafe(nil)); end

  # source://stripe//lib/stripe/resources/account.rb#38
  def reject(params = T.unsafe(nil), opts = T.unsafe(nil)); end

  # source://stripe//lib/stripe/resources/account.rb#71
  def resource_url; end

  # Somewhat unfortunately, we attempt to do a special encoding trick when
  # serializing `additional_owners` under an account: when updating a value,
  # we actually send the update parameters up as an integer-indexed hash
  # rather than an array. So instead of this:
  #
  #     field[]=item1&field[]=item2&field[]=item3
  #
  # We send this:
  #
  #     field[0]=item1&field[1]=item2&field[2]=item3
  #
  # There are two major problems with this technique:
  #
  #     * Entities are addressed by array index, which is not stable and can
  #       easily result in unexpected results between two different requests.
  #
  #     * A replacement of the array's contents is ambiguous with setting a
  #       subset of the array. Because of this, the only way to shorten an
  #       array is to unset it completely by making sure it goes into the
  #       server as an empty string, then setting its contents again.
  #
  # We're trying to get this overturned on the server side, but for now,
  # patch in a special allowance.
  #
  # source://stripe//lib/stripe/resources/account.rb#122
  def serialize_params(options = T.unsafe(nil)); end

  # source://stripe//lib/stripe/resources/account.rb#126
  def serialize_params_account(_obj, update_hash, options = T.unsafe(nil)); end

  private

  # source://stripe//lib/stripe/resources/account.rb#166
  def serialize_additional_owners(legal_entity, additional_owners); end

  class << self
    # source://stripe//lib/stripe/api_operations/nested_resource.rb#22
    def capabilitys_url(id, nested_id = T.unsafe(nil)); end

    # source://stripe//lib/stripe/api_operations/nested_resource.rb#47
    def create_external_account(id, params = T.unsafe(nil), opts = T.unsafe(nil)); end

    # source://stripe//lib/stripe/api_operations/nested_resource.rb#47
    def create_login_link(id, params = T.unsafe(nil), opts = T.unsafe(nil)); end

    # source://stripe//lib/stripe/api_operations/nested_resource.rb#47
    def create_person(id, params = T.unsafe(nil), opts = T.unsafe(nil)); end

    # source://stripe//lib/stripe/api_operations/nested_resource.rb#77
    def delete_external_account(id, nested_id, params = T.unsafe(nil), opts = T.unsafe(nil)); end

    # source://stripe//lib/stripe/api_operations/nested_resource.rb#77
    def delete_person(id, nested_id, params = T.unsafe(nil), opts = T.unsafe(nil)); end

    # source://stripe//lib/stripe/api_operations/nested_resource.rb#22
    def external_accounts_url(id, nested_id = T.unsafe(nil)); end

    # source://stripe//lib/stripe/api_operations/nested_resource.rb#87
    def list_capabilities(id, params = T.unsafe(nil), opts = T.unsafe(nil)); end

    # source://stripe//lib/stripe/api_operations/nested_resource.rb#87
    def list_external_accounts(id, params = T.unsafe(nil), opts = T.unsafe(nil)); end

    # source://stripe//lib/stripe/api_operations/nested_resource.rb#87
    def list_persons(id, params = T.unsafe(nil), opts = T.unsafe(nil)); end

    # source://stripe//lib/stripe/api_operations/nested_resource.rb#22
    def login_links_url(id, nested_id = T.unsafe(nil)); end

    # source://stripe//lib/stripe/resources/account.rb#47
    def persons(account, params = T.unsafe(nil), opts = T.unsafe(nil)); end

    # source://stripe//lib/stripe/api_operations/nested_resource.rb#22
    def persons_url(id, nested_id = T.unsafe(nil)); end

    # source://stripe//lib/stripe/resources/account.rb#142
    def protected_fields; end

    # source://stripe//lib/stripe/resources/account.rb#56
    def reject(account, params = T.unsafe(nil), opts = T.unsafe(nil)); end

    # source://stripe//lib/stripe/resources/account.rb#80
    def retrieve(id = T.unsafe(nil), opts = T.unsafe(nil)); end

    # source://stripe//lib/stripe/api_operations/nested_resource.rb#57
    def retrieve_capability(id, nested_id, opts = T.unsafe(nil)); end

    # source://stripe//lib/stripe/api_operations/nested_resource.rb#57
    def retrieve_external_account(id, nested_id, opts = T.unsafe(nil)); end

    # source://stripe//lib/stripe/api_operations/nested_resource.rb#57
    def retrieve_person(id, nested_id, opts = T.unsafe(nil)); end

    # source://stripe//lib/stripe/api_operations/nested_resource.rb#67
    def update_capability(id, nested_id, params = T.unsafe(nil), opts = T.unsafe(nil)); end

    # source://stripe//lib/stripe/api_operations/nested_resource.rb#67
    def update_external_account(id, nested_id, params = T.unsafe(nil), opts = T.unsafe(nil)); end

    # source://stripe//lib/stripe/api_operations/nested_resource.rb#67
    def update_person(id, nested_id, params = T.unsafe(nil), opts = T.unsafe(nil)); end
  end
end

# source://stripe//lib/stripe/resources/account.rb#21
Stripe::Account::OBJECT_NAME = T.let(T.unsafe(nil), String)

# Account Links are the means by which a Connect platform grants a connected account permission to access
# Stripe-hosted applications, such as Connect Onboarding.
#
# Related guide: [Connect Onboarding](https://stripe.com/docs/connect/connect-onboarding).
#
# source://stripe//lib/stripe/resources/account_link.rb#9
class Stripe::AccountLink < ::Stripe::APIResource
  extend ::Stripe::APIOperations::Create
end

# source://stripe//lib/stripe/resources/account_link.rb#12
Stripe::AccountLink::OBJECT_NAME = T.let(T.unsafe(nil), String)

# Domains registered for Apple Pay on the Web
#
# source://stripe//lib/stripe/resources/apple_pay_domain.rb#6
class Stripe::ApplePayDomain < ::Stripe::APIResource
  include ::Stripe::APIOperations::Delete
  extend ::Stripe::APIOperations::Create
  extend ::Stripe::APIOperations::Delete::ClassMethods
  extend ::Stripe::APIOperations::List

  class << self
    # source://stripe//lib/stripe/resources/apple_pay_domain.rb#13
    def resource_url; end
  end
end

# source://stripe//lib/stripe/resources/apple_pay_domain.rb#11
Stripe::ApplePayDomain::OBJECT_NAME = T.let(T.unsafe(nil), String)

# source://stripe//lib/stripe/resources/application_fee.rb#5
class Stripe::ApplicationFee < ::Stripe::APIResource
  extend ::Stripe::APIOperations::List
  extend ::Stripe::APIOperations::NestedResource

  class << self
    # source://stripe//lib/stripe/api_operations/nested_resource.rb#47
    def create_refund(id, params = T.unsafe(nil), opts = T.unsafe(nil)); end

    # source://stripe//lib/stripe/api_operations/nested_resource.rb#87
    def list_refunds(id, params = T.unsafe(nil), opts = T.unsafe(nil)); end

    # source://stripe//lib/stripe/api_operations/nested_resource.rb#22
    def refunds_url(id, nested_id = T.unsafe(nil)); end

    # source://stripe//lib/stripe/api_operations/nested_resource.rb#57
    def retrieve_refund(id, nested_id, opts = T.unsafe(nil)); end

    # source://stripe//lib/stripe/api_operations/nested_resource.rb#67
    def update_refund(id, nested_id, params = T.unsafe(nil), opts = T.unsafe(nil)); end
  end
end

# source://stripe//lib/stripe/resources/application_fee.rb#9
Stripe::ApplicationFee::OBJECT_NAME = T.let(T.unsafe(nil), String)

# `Application Fee Refund` objects allow you to refund an application fee that
# has previously been created but not yet refunded. Funds will be refunded to
# the Stripe account from which the fee was originally collected.
#
# Related guide: [Refunding Application Fees](https://stripe.com/docs/connect/destination-charges#refunding-app-fee).
#
# source://stripe//lib/stripe/resources/application_fee_refund.rb#10
class Stripe::ApplicationFeeRefund < ::Stripe::APIResource
  include ::Stripe::APIOperations::Save
  extend ::Stripe::APIOperations::List
  extend ::Stripe::APIOperations::Save::ClassMethods

  # source://stripe//lib/stripe/resources/application_fee_refund.rb#16
  def resource_url; end

  class << self
    # @raise [NotImplementedError]
    #
    # source://stripe//lib/stripe/resources/application_fee_refund.rb#29
    def retrieve(_id, _api_key = T.unsafe(nil)); end

    # @raise [NotImplementedError]
    #
    # source://stripe//lib/stripe/resources/application_fee_refund.rb#21
    def update(_id, _params = T.unsafe(nil), _opts = T.unsafe(nil)); end
  end
end

# source://stripe//lib/stripe/resources/application_fee_refund.rb#14
Stripe::ApplicationFeeRefund::OBJECT_NAME = T.let(T.unsafe(nil), String)

# source://stripe//lib/stripe/resources/apps/secret.rb#5
module Stripe::Apps; end

# Secret Store is an API that allows Stripe Apps developers to securely persist secrets for use by UI Extensions and app backends.
#
# The primary resource in Secret Store is a `secret`. Other apps can't view secrets created by an app. Additionally, secrets are scoped to provide further permission control.
#
# All Dashboard users and the app backend share `account` scoped secrets. Use the `account` scope for secrets that don't change per-user, like a third-party API key.
#
# A `user` scoped secret is accessible by the app backend and one specific Dashboard user. Use the `user` scope for per-user secrets like per-user OAuth tokens, where different users might have different permissions.
#
# Related guide: [Store data between page reloads](https://stripe.com/docs/stripe-apps/store-auth-data-custom-objects).
#
# source://stripe//lib/stripe/resources/apps/secret.rb#15
class Stripe::Apps::Secret < ::Stripe::APIResource
  extend ::Stripe::APIOperations::Create
  extend ::Stripe::APIOperations::List

  class << self
    # source://stripe//lib/stripe/resources/apps/secret.rb#21
    def delete_where(params = T.unsafe(nil), opts = T.unsafe(nil)); end

    # source://stripe//lib/stripe/resources/apps/secret.rb#30
    def find(params = T.unsafe(nil), opts = T.unsafe(nil)); end
  end
end

# source://stripe//lib/stripe/resources/apps/secret.rb#19
Stripe::Apps::Secret::OBJECT_NAME = T.let(T.unsafe(nil), String)

# AuthenticationError is raised when invalid credentials are used to connect
# to Stripe's servers.
#
# source://stripe//lib/stripe/errors.rb#57
class Stripe::AuthenticationError < ::Stripe::StripeError; end

# This is an object representing your Stripe balance. You can retrieve it to see
# the balance currently on your Stripe account.
#
# You can also retrieve the balance history, which contains a list of
# [transactions](https://stripe.com/docs/reporting/balance-transaction-types) that contributed to the balance
# (charges, payouts, and so forth).
#
# The available and pending amounts for each currency are broken down further by
# payment source types.
#
# Related guide: [Understanding Connect Account Balances](https://stripe.com/docs/connect/account-balances).
#
# source://stripe//lib/stripe/resources/balance.rb#16
class Stripe::Balance < ::Stripe::SingletonAPIResource; end

# source://stripe//lib/stripe/resources/balance.rb#17
Stripe::Balance::OBJECT_NAME = T.let(T.unsafe(nil), String)

# Balance transactions represent funds moving through your Stripe account.
# They're created for every type of transaction that comes into or flows out of your Stripe account balance.
#
# Related guide: [Balance Transaction Types](https://stripe.com/docs/reports/balance-transaction-types).
#
# source://stripe//lib/stripe/resources/balance_transaction.rb#9
class Stripe::BalanceTransaction < ::Stripe::APIResource
  extend ::Stripe::APIOperations::List
end

# source://stripe//lib/stripe/resources/balance_transaction.rb#12
Stripe::BalanceTransaction::OBJECT_NAME = T.let(T.unsafe(nil), String)

# These bank accounts are payment methods on `Customer` objects.
#
# On the other hand [External Accounts](https://stripe.com/docs/api#external_accounts) are transfer
# destinations on `Account` objects for [Custom accounts](https://stripe.com/docs/connect/custom-accounts).
# They can be bank accounts or debit cards as well, and are documented in the links above.
#
# Related guide: [Bank Debits and Transfers](https://stripe.com/docs/payments/bank-debits-transfers).
#
# source://stripe//lib/stripe/resources/bank_account.rb#12
class Stripe::BankAccount < ::Stripe::APIResource
  include ::Stripe::APIOperations::Delete
  include ::Stripe::APIOperations::Save
  extend ::Stripe::APIOperations::Delete::ClassMethods
  extend ::Stripe::APIOperations::List
  extend ::Stripe::APIOperations::Save::ClassMethods

  # source://stripe//lib/stripe/resources/bank_account.rb#24
  def resource_url; end

  # source://stripe//lib/stripe/resources/bank_account.rb#19
  def verify(params = T.unsafe(nil), opts = T.unsafe(nil)); end

  class << self
    # @raise [NotImplementedError]
    #
    # source://stripe//lib/stripe/resources/bank_account.rb#41
    def retrieve(_id, _opts = T.unsafe(nil)); end

    # @raise [NotImplementedError]
    #
    # source://stripe//lib/stripe/resources/bank_account.rb#32
    def update(_id, _params = T.unsafe(nil), _opts = T.unsafe(nil)); end
  end
end

# source://stripe//lib/stripe/resources/bank_account.rb#17
Stripe::BankAccount::OBJECT_NAME = T.let(T.unsafe(nil), String)

# source://stripe//lib/stripe/resources/billing_portal/configuration.rb#5
module Stripe::BillingPortal; end

# A portal configuration describes the functionality and behavior of a portal session.
#
# source://stripe//lib/stripe/resources/billing_portal/configuration.rb#7
class Stripe::BillingPortal::Configuration < ::Stripe::APIResource
  include ::Stripe::APIOperations::Save
  extend ::Stripe::APIOperations::Create
  extend ::Stripe::APIOperations::List
  extend ::Stripe::APIOperations::Save::ClassMethods
end

# source://stripe//lib/stripe/resources/billing_portal/configuration.rb#12
Stripe::BillingPortal::Configuration::OBJECT_NAME = T.let(T.unsafe(nil), String)

# The Billing customer portal is a Stripe-hosted UI for subscription and
# billing management.
#
# A portal configuration describes the functionality and features that you
# want to provide to your customers through the portal.
#
# A portal session describes the instantiation of the customer portal for
# a particular customer. By visiting the session's URL, the customer
# can manage their subscriptions and billing details. For security reasons,
# sessions are short-lived and will expire if the customer does not visit the URL.
# Create sessions on-demand when customers intend to manage their subscriptions
# and billing details.
#
# Learn more in the [integration guide](https://stripe.com/docs/billing/subscriptions/integrating-customer-portal).
#
# source://stripe//lib/stripe/resources/billing_portal/session.rb#20
class Stripe::BillingPortal::Session < ::Stripe::APIResource
  extend ::Stripe::APIOperations::Create
end

# source://stripe//lib/stripe/resources/billing_portal/session.rb#23
Stripe::BillingPortal::Session::OBJECT_NAME = T.let(T.unsafe(nil), String)

# This is an object representing a capability for a Stripe account.
#
# Related guide: [Account capabilities](https://stripe.com/docs/connect/account-capabilities).
#
# source://stripe//lib/stripe/resources/capability.rb#8
class Stripe::Capability < ::Stripe::APIResource
  include ::Stripe::APIOperations::Save
  extend ::Stripe::APIOperations::List
  extend ::Stripe::APIOperations::Save::ClassMethods

  # source://stripe//lib/stripe/resources/capability.rb#14
  def resource_url; end

  class << self
    # @raise [NotImplementedError]
    #
    # source://stripe//lib/stripe/resources/capability.rb#23
    def retrieve(_id, _opts = T.unsafe(nil)); end

    # @raise [NotImplementedError]
    #
    # source://stripe//lib/stripe/resources/capability.rb#30
    def update(_id, _params = T.unsafe(nil), _opts = T.unsafe(nil)); end
  end
end

# source://stripe//lib/stripe/resources/capability.rb#12
Stripe::Capability::OBJECT_NAME = T.let(T.unsafe(nil), String)

# You can store multiple cards on a customer in order to charge the customer
# later. You can also store multiple debit cards on a recipient in order to
# transfer to those cards later.
#
# Related guide: [Card Payments with Sources](https://stripe.com/docs/sources/cards).
#
# source://stripe//lib/stripe/resources/card.rb#10
class Stripe::Card < ::Stripe::APIResource
  include ::Stripe::APIOperations::Delete
  include ::Stripe::APIOperations::Save
  extend ::Stripe::APIOperations::Delete::ClassMethods
  extend ::Stripe::APIOperations::List
  extend ::Stripe::APIOperations::Save::ClassMethods

  # source://stripe//lib/stripe/resources/card.rb#17
  def resource_url; end

  class << self
    # @raise [NotImplementedError]
    #
    # source://stripe//lib/stripe/resources/card.rb#33
    def retrieve(_id, _opts = T.unsafe(nil)); end

    # @raise [NotImplementedError]
    #
    # source://stripe//lib/stripe/resources/card.rb#25
    def update(_id, _params = T.unsafe(nil), _opts = T.unsafe(nil)); end
  end
end

# source://stripe//lib/stripe/resources/card.rb#15
Stripe::Card::OBJECT_NAME = T.let(T.unsafe(nil), String)

# CardError is raised when a user enters a card that can't be charged for
# some reason.
#
# source://stripe//lib/stripe/errors.rb#75
class Stripe::CardError < ::Stripe::StripeError
  # @return [CardError] a new instance of CardError
  #
  # source://stripe//lib/stripe/errors.rb#78
  def initialize(message, param, code: T.unsafe(nil), http_status: T.unsafe(nil), http_body: T.unsafe(nil), json_body: T.unsafe(nil), http_headers: T.unsafe(nil)); end

  # Returns the value of attribute param.
  #
  # source://stripe//lib/stripe/errors.rb#76
  def param; end
end

# A customer's `Cash balance` represents real funds. Customers can add funds to their cash balance by sending a bank transfer. These funds can be used for payment and can eventually be paid out to your bank account.
#
# source://stripe//lib/stripe/resources/cash_balance.rb#6
class Stripe::CashBalance < ::Stripe::APIResource
  # source://stripe//lib/stripe/resources/cash_balance.rb#9
  def resource_url; end

  class << self
    # @raise [NotImplementedError]
    #
    # source://stripe//lib/stripe/resources/cash_balance.rb#17
    def retrieve(_id, _opts = T.unsafe(nil)); end
  end
end

# source://stripe//lib/stripe/resources/cash_balance.rb#7
Stripe::CashBalance::OBJECT_NAME = T.let(T.unsafe(nil), String)

# To charge a credit or a debit card, you create a `Charge` object. You can
# retrieve and refund individual charges as well as list all charges. Charges
# are identified by a unique, random ID.
#
# Related guide: [Accept a payment with the Charges API](https://stripe.com/docs/payments/accept-a-payment-charges).
#
# source://stripe//lib/stripe/resources/charge.rb#10
class Stripe::Charge < ::Stripe::APIResource
  include ::Stripe::APIOperations::Save
  extend ::Stripe::APIOperations::Create
  extend ::Stripe::APIOperations::List
  extend ::Stripe::APIOperations::Search
  extend ::Stripe::APIOperations::Save::ClassMethods

  # source://stripe//lib/stripe/resources/charge.rb#18
  def capture(params = T.unsafe(nil), opts = T.unsafe(nil)); end

  class << self
    # source://stripe//lib/stripe/resources/charge.rb#27
    def capture(charge, params = T.unsafe(nil), opts = T.unsafe(nil)); end

    # source://stripe//lib/stripe/resources/charge.rb#36
    def search(params = T.unsafe(nil), opts = T.unsafe(nil)); end

    # source://stripe//lib/stripe/resources/charge.rb#40
    def search_auto_paging_each(params = T.unsafe(nil), opts = T.unsafe(nil), &blk); end
  end
end

# source://stripe//lib/stripe/resources/charge.rb#16
Stripe::Charge::OBJECT_NAME = T.let(T.unsafe(nil), String)

# source://stripe//lib/stripe/resources/checkout/session.rb#5
module Stripe::Checkout; end

# A Checkout Session represents your customer's session as they pay for
# one-time purchases or subscriptions through [Checkout](https://stripe.com/docs/payments/checkout)
# or [Payment Links](https://stripe.com/docs/payments/payment-links). We recommend creating a
# new Session each time your customer attempts to pay.
#
# Once payment is successful, the Checkout Session will contain a reference
# to the [Customer](https://stripe.com/docs/api/customers), and either the successful
# [PaymentIntent](https://stripe.com/docs/api/payment_intents) or an active
# [Subscription](https://stripe.com/docs/api/subscriptions).
#
# You can create a Checkout Session on your server and redirect to its URL
# to begin Checkout.
#
# Related guide: [Checkout Quickstart](https://stripe.com/docs/checkout/quickstart).
#
# source://stripe//lib/stripe/resources/checkout/session.rb#20
class Stripe::Checkout::Session < ::Stripe::APIResource
  extend ::Stripe::APIOperations::Create
  extend ::Stripe::APIOperations::List

  # source://stripe//lib/stripe/resources/checkout/session.rb#26
  def expire(params = T.unsafe(nil), opts = T.unsafe(nil)); end

  # source://stripe//lib/stripe/resources/checkout/session.rb#35
  def list_line_items(params = T.unsafe(nil), opts = T.unsafe(nil)); end

  class << self
    # source://stripe//lib/stripe/resources/checkout/session.rb#44
    def expire(session, params = T.unsafe(nil), opts = T.unsafe(nil)); end

    # source://stripe//lib/stripe/resources/checkout/session.rb#53
    def list_line_items(session, params = T.unsafe(nil), opts = T.unsafe(nil)); end
  end
end

# source://stripe//lib/stripe/resources/checkout/session.rb#24
Stripe::Checkout::Session::OBJECT_NAME = T.let(T.unsafe(nil), String)

# Manages connections across multiple hosts which is useful because the
# library may connect to multiple hosts during a typical session (main API,
# Connect, Uploads). Ruby doesn't provide an easy way to make this happen
# easily, so this class is designed to track what we're connected to and
# manage the lifecycle of those connections.
#
# Note that this class in itself is *not* thread safe. We expect it to be
# instantiated once per thread.
#
# source://stripe//lib/stripe/connection_manager.rb#12
class Stripe::ConnectionManager
  # @return [ConnectionManager] a new instance of ConnectionManager
  #
  # source://stripe//lib/stripe/connection_manager.rb#20
  def initialize(config = T.unsafe(nil)); end

  # Finishes any active connections by closing their TCP connection and
  # clears them from internal tracking.
  #
  # source://stripe//lib/stripe/connection_manager.rb#37
  def clear; end

  # Returns the value of attribute config.
  #
  # source://stripe//lib/stripe/connection_manager.rb#18
  def config; end

  # Gets a connection for a given URI. This is for internal use only as it's
  # subject to change (we've moved between HTTP client schemes in the past
  # and may do it again).
  #
  # `uri` is expected to be a string.
  #
  # source://stripe//lib/stripe/connection_manager.rb#51
  def connection_for(uri); end

  # Executes an HTTP request to the given URI with the given method. Also
  # allows a request body, headers, and query string to be specified.
  #
  # @raise [ArgumentError]
  #
  # source://stripe//lib/stripe/connection_manager.rb#69
  def execute_request(method, uri, body: T.unsafe(nil), headers: T.unsafe(nil), query: T.unsafe(nil), &block); end

  # Timestamp (in seconds procured from the system's monotonic clock)
  # indicating when the connection manager last made a request. This is used
  # by `StripeClient` to determine whether a connection manager should be
  # garbage collected or not.
  #
  # source://stripe//lib/stripe/connection_manager.rb#17
  def last_used; end

  private

  # `uri` should be a parsed `URI` object.
  #
  # source://stripe//lib/stripe/connection_manager.rb#141
  def create_connection(uri); end

  # `Net::HTTP` somewhat awkwardly requires each component of a proxy URI
  # (host, port, etc.) rather than the URI itself. This method simply parses
  # out those pieces to make passing them into a new connection a little less
  # ugly.
  #
  # source://stripe//lib/stripe/connection_manager.rb#181
  def proxy_parts; end

  # source://stripe//lib/stripe/connection_manager.rb#190
  def warn_ssl_verify_none; end
end

# Stripe needs to collect certain pieces of information about each account
# created. These requirements can differ depending on the account's country. The
# Country Specs API makes these rules available to your integration.
#
# You can also view the information from this API call as [an online
# guide](https://stripe.com/docs/connect/required-verification-information).
#
# source://stripe//lib/stripe/resources/country_spec.rb#11
class Stripe::CountrySpec < ::Stripe::APIResource
  extend ::Stripe::APIOperations::List
end

# source://stripe//lib/stripe/resources/country_spec.rb#14
Stripe::CountrySpec::OBJECT_NAME = T.let(T.unsafe(nil), String)

# A coupon contains information about a percent-off or amount-off discount you
# might want to apply to a customer. Coupons may be applied to [subscriptions](https://stripe.com/docs/api#subscriptions), [invoices](https://stripe.com/docs/api#invoices),
# [checkout sessions](https://stripe.com/docs/api/checkout/sessions), [quotes](https://stripe.com/docs/api#quotes), and more. Coupons do not work with conventional one-off [charges](https://stripe.com/docs/api#create_charge) or [payment intents](https://stripe.com/docs/api/payment_intents).
#
# source://stripe//lib/stripe/resources/coupon.rb#8
class Stripe::Coupon < ::Stripe::APIResource
  include ::Stripe::APIOperations::Delete
  include ::Stripe::APIOperations::Save
  extend ::Stripe::APIOperations::Create
  extend ::Stripe::APIOperations::Delete::ClassMethods
  extend ::Stripe::APIOperations::List
  extend ::Stripe::APIOperations::Save::ClassMethods
end

# source://stripe//lib/stripe/resources/coupon.rb#14
Stripe::Coupon::OBJECT_NAME = T.let(T.unsafe(nil), String)

# Issue a credit note to adjust an invoice's amount after the invoice is finalized.
#
# Related guide: [Credit Notes](https://stripe.com/docs/billing/invoices/credit-notes).
#
# source://stripe//lib/stripe/resources/credit_note.rb#8
class Stripe::CreditNote < ::Stripe::APIResource
  include ::Stripe::APIOperations::Save
  extend ::Stripe::APIOperations::Create
  extend ::Stripe::APIOperations::List
  extend ::Stripe::APIOperations::Save::ClassMethods

  # source://stripe//lib/stripe/resources/credit_note.rb#15
  def void_credit_note(params = T.unsafe(nil), opts = T.unsafe(nil)); end

  class << self
    # source://stripe//lib/stripe/resources/credit_note.rb#24
    def list_preview_line_items(params = T.unsafe(nil), opts = T.unsafe(nil)); end

    # source://stripe//lib/stripe/resources/credit_note.rb#33
    def preview(params = T.unsafe(nil), opts = T.unsafe(nil)); end

    # source://stripe//lib/stripe/resources/credit_note.rb#42
    def void_credit_note(id, params = T.unsafe(nil), opts = T.unsafe(nil)); end
  end
end

# source://stripe//lib/stripe/resources/credit_note.rb#13
Stripe::CreditNote::OBJECT_NAME = T.let(T.unsafe(nil), String)

# source://stripe//lib/stripe/resources/credit_note_line_item.rb#5
class Stripe::CreditNoteLineItem < ::Stripe::StripeObject; end

# source://stripe//lib/stripe/resources/credit_note_line_item.rb#6
Stripe::CreditNoteLineItem::OBJECT_NAME = T.let(T.unsafe(nil), String)

# This object represents a customer of your business. It lets you create recurring charges and track payments that belong to the same customer.
#
# Related guide: [Save a card during payment](https://stripe.com/docs/payments/save-during-payment).
#
# source://stripe//lib/stripe/resources/customer.rb#8
class Stripe::Customer < ::Stripe::APIResource
  include ::Stripe::APIOperations::Delete
  include ::Stripe::APIOperations::Save
  extend ::Stripe::APIOperations::Create
  extend ::Stripe::APIOperations::Delete::ClassMethods
  extend ::Stripe::APIOperations::List
  extend ::Stripe::APIOperations::Search
  extend ::Stripe::APIOperations::Save::ClassMethods
  extend ::Stripe::APIOperations::NestedResource

  # source://stripe//lib/stripe/resources/customer.rb#25
  def create_funding_instructions(params = T.unsafe(nil), opts = T.unsafe(nil)); end

  # source://stripe//lib/stripe/resources/customer.rb#34
  def delete_discount(params = T.unsafe(nil), opts = T.unsafe(nil)); end

  # source://stripe//lib/stripe/resources/customer.rb#43
  def list_payment_methods(params = T.unsafe(nil), opts = T.unsafe(nil)); end

  # source://stripe//lib/stripe/resources/customer.rb#52
  def retrieve_payment_method(payment_method, params = T.unsafe(nil), opts = T.unsafe(nil)); end

  # source://stripe//lib/stripe/api_resource.rb#36
  def source=(value); end

  # source://stripe//lib/stripe/resources/customer.rb#138
  def test_helpers; end

  class << self
    # source://stripe//lib/stripe/api_operations/nested_resource.rb#22
    def balance_transactions_url(id, nested_id = T.unsafe(nil)); end

    # source://stripe//lib/stripe/api_operations/nested_resource.rb#22
    def cash_balance_transactions_url(id, nested_id = T.unsafe(nil)); end

    # source://stripe//lib/stripe/api_operations/nested_resource.rb#47
    def create_balance_transaction(id, params = T.unsafe(nil), opts = T.unsafe(nil)); end

    # source://stripe//lib/stripe/resources/customer.rb#61
    def create_funding_instructions(customer, params = T.unsafe(nil), opts = T.unsafe(nil)); end

    # source://stripe//lib/stripe/api_operations/nested_resource.rb#47
    def create_source(id, params = T.unsafe(nil), opts = T.unsafe(nil)); end

    # source://stripe//lib/stripe/api_operations/nested_resource.rb#47
    def create_tax_id(id, params = T.unsafe(nil), opts = T.unsafe(nil)); end

    # source://stripe//lib/stripe/resources/customer.rb#70
    def delete_discount(customer, params = T.unsafe(nil), opts = T.unsafe(nil)); end

    # source://stripe//lib/stripe/api_operations/nested_resource.rb#77
    def delete_source(id, nested_id, params = T.unsafe(nil), opts = T.unsafe(nil)); end

    # source://stripe//lib/stripe/api_operations/nested_resource.rb#77
    def delete_tax_id(id, nested_id, params = T.unsafe(nil), opts = T.unsafe(nil)); end

    # source://stripe//lib/stripe/api_operations/nested_resource.rb#77
    def detach_source(id, nested_id, params = T.unsafe(nil), opts = T.unsafe(nil)); end

    # source://stripe//lib/stripe/api_operations/nested_resource.rb#87
    def list_balance_transactions(id, params = T.unsafe(nil), opts = T.unsafe(nil)); end

    # source://stripe//lib/stripe/api_operations/nested_resource.rb#87
    def list_cash_balance_transactions(id, params = T.unsafe(nil), opts = T.unsafe(nil)); end

    # source://stripe//lib/stripe/resources/customer.rb#79
    def list_payment_methods(customer, params = T.unsafe(nil), opts = T.unsafe(nil)); end

    # source://stripe//lib/stripe/api_operations/nested_resource.rb#87
    def list_sources(id, params = T.unsafe(nil), opts = T.unsafe(nil)); end

    # source://stripe//lib/stripe/api_operations/nested_resource.rb#87
    def list_tax_ids(id, params = T.unsafe(nil), opts = T.unsafe(nil)); end

    # source://stripe//lib/stripe/api_operations/nested_resource.rb#57
    def retrieve_balance_transaction(id, nested_id, opts = T.unsafe(nil)); end

    # source://stripe//lib/stripe/resources/customer.rb#120
    def retrieve_cash_balance(customer, params = T.unsafe(nil), opts = T.unsafe(nil)); end

    # source://stripe//lib/stripe/api_operations/nested_resource.rb#57
    def retrieve_cash_balance_transaction(id, nested_id, opts = T.unsafe(nil)); end

    # source://stripe//lib/stripe/resources/customer.rb#88
    def retrieve_payment_method(customer, payment_method, params = T.unsafe(nil), opts = T.unsafe(nil)); end

    # source://stripe//lib/stripe/api_operations/nested_resource.rb#57
    def retrieve_source(id, nested_id, opts = T.unsafe(nil)); end

    # source://stripe//lib/stripe/api_operations/nested_resource.rb#57
    def retrieve_tax_id(id, nested_id, opts = T.unsafe(nil)); end

    # source://stripe//lib/stripe/resources/customer.rb#112
    def search(params = T.unsafe(nil), opts = T.unsafe(nil)); end

    # source://stripe//lib/stripe/resources/customer.rb#116
    def search_auto_paging_each(params = T.unsafe(nil), opts = T.unsafe(nil), &blk); end

    # source://stripe//lib/stripe/api_operations/nested_resource.rb#22
    def sources_url(id, nested_id = T.unsafe(nil)); end

    # source://stripe//lib/stripe/api_operations/nested_resource.rb#22
    def tax_ids_url(id, nested_id = T.unsafe(nil)); end

    # source://stripe//lib/stripe/api_operations/nested_resource.rb#67
    def update_balance_transaction(id, nested_id, params = T.unsafe(nil), opts = T.unsafe(nil)); end

    # source://stripe//lib/stripe/resources/customer.rb#129
    def update_cash_balance(customer, params = T.unsafe(nil), opts = T.unsafe(nil)); end

    # source://stripe//lib/stripe/api_operations/nested_resource.rb#67
    def update_source(id, nested_id, params = T.unsafe(nil), opts = T.unsafe(nil)); end
  end
end

# source://stripe//lib/stripe/resources/customer.rb#16
Stripe::Customer::OBJECT_NAME = T.let(T.unsafe(nil), String)

# source://stripe//lib/stripe/resources/customer.rb#142
class Stripe::Customer::TestHelpers < ::Stripe::APIResourceTestHelpers
  # source://stripe//lib/stripe/resources/customer.rb#154
  def fund_cash_balance(params = T.unsafe(nil), opts = T.unsafe(nil)); end

  class << self
    # source://stripe//lib/stripe/resources/customer.rb#145
    def fund_cash_balance(customer, params = T.unsafe(nil), opts = T.unsafe(nil)); end
  end
end

# source://stripe//lib/stripe/resources/customer.rb#143
Stripe::Customer::TestHelpers::RESOURCE_CLASS = Stripe::Customer

# Each customer has a [`balance`](https://stripe.com/docs/api/customers/object#customer_object-balance) value,
# which denotes a debit or credit that's automatically applied to their next invoice upon finalization.
# You may modify the value directly by using the [update customer API](https://stripe.com/docs/api/customers/update),
# or by creating a Customer Balance Transaction, which increments or decrements the customer's `balance` by the specified `amount`.
#
# Related guide: [Customer Balance](https://stripe.com/docs/billing/customer/balance) to learn more.
#
# source://stripe//lib/stripe/resources/customer_balance_transaction.rb#11
class Stripe::CustomerBalanceTransaction < ::Stripe::APIResource
  include ::Stripe::APIOperations::Save
  extend ::Stripe::APIOperations::List
  extend ::Stripe::APIOperations::Save::ClassMethods

  # source://stripe//lib/stripe/resources/customer_balance_transaction.rb#17
  def resource_url; end

  class << self
    # @raise [NotImplementedError]
    #
    # source://stripe//lib/stripe/resources/customer_balance_transaction.rb#25
    def retrieve(_id, _opts = T.unsafe(nil)); end

    # @raise [NotImplementedError]
    #
    # source://stripe//lib/stripe/resources/customer_balance_transaction.rb#31
    def update(_id, _params = T.unsafe(nil), _opts = T.unsafe(nil)); end
  end
end

# source://stripe//lib/stripe/resources/customer_balance_transaction.rb#15
Stripe::CustomerBalanceTransaction::OBJECT_NAME = T.let(T.unsafe(nil), String)

# Customers with certain payments enabled have a cash balance, representing funds that were paid
# by the customer to a merchant, but have not yet been allocated to a payment. Cash Balance Transactions
# represent when funds are moved into or out of this balance. This includes funding by the customer, allocation
# to payments, and refunds to the customer.
#
# source://stripe//lib/stripe/resources/customer_cash_balance_transaction.rb#9
class Stripe::CustomerCashBalanceTransaction < ::Stripe::APIResource
  extend ::Stripe::APIOperations::List
end

# source://stripe//lib/stripe/resources/customer_cash_balance_transaction.rb#12
Stripe::CustomerCashBalanceTransaction::OBJECT_NAME = T.let(T.unsafe(nil), String)

# source://stripe//lib/stripe.rb#54
Stripe::DEFAULT_CA_BUNDLE_PATH = T.let(T.unsafe(nil), String)

# A discount represents the actual application of a [coupon](https://stripe.com/docs/api#coupons) or [promotion code](https://stripe.com/docs/api#promotion_codes).
# It contains information about when the discount began, when it will end, and what it is applied to.
#
# Related guide: [Applying Discounts to Subscriptions](https://stripe.com/docs/billing/subscriptions/discounts).
#
# source://stripe//lib/stripe/resources/discount.rb#9
class Stripe::Discount < ::Stripe::StripeObject; end

# source://stripe//lib/stripe/resources/discount.rb#10
Stripe::Discount::OBJECT_NAME = T.let(T.unsafe(nil), String)

# A dispute occurs when a customer questions your charge with their card issuer.
# When this happens, you're given the opportunity to respond to the dispute with
# evidence that shows that the charge is legitimate. You can find more
# information about the dispute process in our [Disputes and
# Fraud](https://stripe.com/docs/disputes) documentation.
#
# Related guide: [Disputes and Fraud](https://stripe.com/docs/disputes).
#
# source://stripe//lib/stripe/resources/dispute.rb#12
class Stripe::Dispute < ::Stripe::APIResource
  include ::Stripe::APIOperations::Save
  extend ::Stripe::APIOperations::List
  extend ::Stripe::APIOperations::Save::ClassMethods

  # source://stripe//lib/stripe/resources/dispute.rb#18
  def close(params = T.unsafe(nil), opts = T.unsafe(nil)); end

  class << self
    # source://stripe//lib/stripe/resources/dispute.rb#27
    def close(dispute, params = T.unsafe(nil), opts = T.unsafe(nil)); end
  end
end

# source://stripe//lib/stripe/resources/dispute.rb#16
Stripe::Dispute::OBJECT_NAME = T.let(T.unsafe(nil), String)

# source://stripe//lib/stripe/resources/ephemeral_key.rb#5
class Stripe::EphemeralKey < ::Stripe::APIResource
  include ::Stripe::APIOperations::Delete
  extend ::Stripe::APIOperations::Create
  extend ::Stripe::APIOperations::Delete::ClassMethods

  class << self
    # source://stripe//lib/stripe/resources/ephemeral_key.rb#11
    def create(params = T.unsafe(nil), opts = T.unsafe(nil)); end
  end
end

# source://stripe//lib/stripe/resources/ephemeral_key.rb#9
Stripe::EphemeralKey::OBJECT_NAME = T.let(T.unsafe(nil), String)

# Represents an error object as returned by the API.
#
# @see https://stripe.com/docs/api/errors
#
# source://stripe//lib/stripe/error_object.rb#7
class Stripe::ErrorObject < ::Stripe::StripeObject
  # For card errors, the ID of the failed charge.
  #
  # source://stripe//lib/stripe/error_object.rb#15
  def charge; end

  # For some errors that could be handled programmatically, a short string
  # indicating the error code reported.
  #
  # source://stripe//lib/stripe/error_object.rb#21
  def code; end

  # For card errors resulting from a card issuer decline, a short string
  # indicating the card issuer's reason for the decline if they provide one.
  #
  # source://stripe//lib/stripe/error_object.rb#27
  def decline_code; end

  # A URL to more information about the error code reported.
  #
  # source://stripe//lib/stripe/error_object.rb#32
  def doc_url; end

  # A human-readable message providing more details about the error. For card
  # errors, these messages can be shown to your users.
  #
  # source://stripe//lib/stripe/error_object.rb#38
  def message; end

  # If the error is parameter-specific, the parameter related to the error.
  # For example, you can use this to display a message near the correct form
  # field.
  #
  # source://stripe//lib/stripe/error_object.rb#45
  def param; end

  # The PaymentIntent object for errors returned on a request involving a
  # PaymentIntent.
  #
  # source://stripe//lib/stripe/error_object.rb#51
  def payment_intent; end

  # The PaymentMethod object for errors returned on a request involving a
  # PaymentMethod.
  #
  # source://stripe//lib/stripe/error_object.rb#57
  def payment_method; end

  # The SetupIntent object for errors returned on a request involving a
  # SetupIntent.
  #
  # source://stripe//lib/stripe/error_object.rb#63
  def setup_intent; end

  # The source object for errors returned on a request involving a source.
  #
  # source://stripe//lib/stripe/error_object.rb#68
  def source; end

  # The type of error returned. One of `api_error`, `card_error`,
  # `idempotency_error`, or `invalid_request_error`.
  #
  # source://stripe//lib/stripe/error_object.rb#74
  def type; end
end

# Events are our way of letting you know when something interesting happens in
# your account. When an interesting event occurs, we create a new `Event`
# object. For example, when a charge succeeds, we create a `charge.succeeded`
# event; and when an invoice payment attempt fails, we create an
# `invoice.payment_failed` event. Note that many API requests may cause multiple
# events to be created. For example, if you create a new subscription for a
# customer, you will receive both a `customer.subscription.created` event and a
# `charge.succeeded` event.
#
# Events occur when the state of another API resource changes. The state of that
# resource at the time of the change is embedded in the event's data field. For
# example, a `charge.succeeded` event will contain a charge, and an
# `invoice.payment_failed` event will contain an invoice.
#
# As with other API resources, you can use endpoints to retrieve an
# [individual event](https://stripe.com/docs/api#retrieve_event) or a [list of events](https://stripe.com/docs/api#list_events)
# from the API. We also have a separate
# [webhooks](http://en.wikipedia.org/wiki/Webhook) system for sending the
# `Event` objects directly to an endpoint on your server. Webhooks are managed
# in your
# [account settings](https://dashboard.stripe.com/account/webhooks),
# and our [Using Webhooks](https://stripe.com/docs/webhooks) guide will help you get set up.
#
# When using [Connect](https://stripe.com/docs/connect), you can also receive notifications of
# events that occur in connected accounts. For these events, there will be an
# additional `account` attribute in the received `Event` object.
#
# **NOTE:** Right now, access to events through the [Retrieve Event API](https://stripe.com/docs/api#retrieve_event) is
# guaranteed only for 30 days.
#
# source://stripe//lib/stripe/resources/event.rb#34
class Stripe::Event < ::Stripe::APIResource
  extend ::Stripe::APIOperations::List
end

# source://stripe//lib/stripe/resources/event.rb#37
Stripe::Event::OBJECT_NAME = T.let(T.unsafe(nil), String)

# `Exchange Rate` objects allow you to determine the rates that Stripe is
# currently using to convert from one currency to another. Since this number is
# variable throughout the day, there are various reasons why you might want to
# know the current rate (for example, to dynamically price an item for a user
# with a default payment in a foreign currency).
#
# If you want a guarantee that the charge is made with a certain exchange rate
# you expect is current, you can pass in `exchange_rate` to charges endpoints.
# If the value is no longer up to date, the charge won't go through. Please
# refer to our [Exchange Rates API](https://stripe.com/docs/exchange-rates) guide for more
# details.
#
# source://stripe//lib/stripe/resources/exchange_rate.rb#16
class Stripe::ExchangeRate < ::Stripe::APIResource
  extend ::Stripe::APIOperations::List
end

# source://stripe//lib/stripe/resources/exchange_rate.rb#19
Stripe::ExchangeRate::OBJECT_NAME = T.let(T.unsafe(nil), String)

# This is an object representing a file hosted on Stripe's servers. The
# file may have been uploaded by yourself using the [create file](https://stripe.com/docs/api#create_file)
# request (for example, when uploading dispute evidence) or it may have
# been created by Stripe (for example, the results of a [Sigma scheduled
# query](https://stripe.com/docs/api#scheduled_queries)).
#
# Related guide: [File Upload Guide](https://stripe.com/docs/file-upload).
#
# source://stripe//lib/stripe/resources/file.rb#12
class Stripe::File < ::Stripe::APIResource
  extend ::Stripe::APIOperations::Create
  extend ::Stripe::APIOperations::List

  class << self
    # source://stripe//lib/stripe/resources/file.rb#28
    def create(params = T.unsafe(nil), opts = T.unsafe(nil)); end

    # source://stripe//lib/stripe/resources/file.rb#24
    def resource_url; end
  end
end

# source://stripe//lib/stripe/resources/file.rb#16
Stripe::File::OBJECT_NAME = T.let(T.unsafe(nil), String)

# This resource can have two different object names. In latter API
# versions, only `file` is used, but since stripe-ruby may be used with
# any API version, we need to support deserializing the older
# `file_upload` object into the same class.
#
# source://stripe//lib/stripe/resources/file.rb#22
Stripe::File::OBJECT_NAME_ALT = T.let(T.unsafe(nil), String)

# To share the contents of a `File` object with non-Stripe users, you can
# create a `FileLink`. `FileLink`s contain a URL that can be used to
# retrieve the contents of the file without authentication.
#
# source://stripe//lib/stripe/resources/file_link.rb#8
class Stripe::FileLink < ::Stripe::APIResource
  include ::Stripe::APIOperations::Save
  extend ::Stripe::APIOperations::Create
  extend ::Stripe::APIOperations::List
  extend ::Stripe::APIOperations::Save::ClassMethods
end

# source://stripe//lib/stripe/resources/file_link.rb#13
Stripe::FileLink::OBJECT_NAME = T.let(T.unsafe(nil), String)

# source://stripe//lib/stripe/resources/financial_connections/account.rb#5
module Stripe::FinancialConnections; end

# A Financial Connections Account represents an account that exists outside of Stripe, to which you have been granted some degree of access.
#
# source://stripe//lib/stripe/resources/financial_connections/account.rb#7
class Stripe::FinancialConnections::Account < ::Stripe::APIResource
  extend ::Stripe::APIOperations::List

  # source://stripe//lib/stripe/resources/financial_connections/account.rb#12
  def disconnect(params = T.unsafe(nil), opts = T.unsafe(nil)); end

  # source://stripe//lib/stripe/resources/financial_connections/account.rb#21
  def list_owners(params = T.unsafe(nil), opts = T.unsafe(nil)); end

  # source://stripe//lib/stripe/resources/financial_connections/account.rb#30
  def refresh_account(params = T.unsafe(nil), opts = T.unsafe(nil)); end

  class << self
    # source://stripe//lib/stripe/resources/financial_connections/account.rb#39
    def disconnect(account, params = T.unsafe(nil), opts = T.unsafe(nil)); end

    # source://stripe//lib/stripe/resources/financial_connections/account.rb#48
    def list_owners(account, params = T.unsafe(nil), opts = T.unsafe(nil)); end

    # source://stripe//lib/stripe/resources/financial_connections/account.rb#57
    def refresh_account(account, params = T.unsafe(nil), opts = T.unsafe(nil)); end
  end
end

# source://stripe//lib/stripe/resources/financial_connections/account.rb#10
Stripe::FinancialConnections::Account::OBJECT_NAME = T.let(T.unsafe(nil), String)

# source://stripe//lib/stripe/resources/financial_connections/account_owner.rb#6
class Stripe::FinancialConnections::AccountOwner < ::Stripe::StripeObject; end

# source://stripe//lib/stripe/resources/financial_connections/account_owner.rb#7
Stripe::FinancialConnections::AccountOwner::OBJECT_NAME = T.let(T.unsafe(nil), String)

# Describes a snapshot of the owners of an account at a particular point in time.
#
# source://stripe//lib/stripe/resources/financial_connections/account_ownership.rb#7
class Stripe::FinancialConnections::AccountOwnership < ::Stripe::StripeObject; end

# source://stripe//lib/stripe/resources/financial_connections/account_ownership.rb#8
Stripe::FinancialConnections::AccountOwnership::OBJECT_NAME = T.let(T.unsafe(nil), String)

# A Financial Connections Session is the secure way to programmatically launch the client-side Stripe.js modal that lets your users link their accounts.
#
# source://stripe//lib/stripe/resources/financial_connections/session.rb#7
class Stripe::FinancialConnections::Session < ::Stripe::APIResource
  extend ::Stripe::APIOperations::Create
end

# source://stripe//lib/stripe/resources/financial_connections/session.rb#10
Stripe::FinancialConnections::Session::OBJECT_NAME = T.let(T.unsafe(nil), String)

# Each customer has a [`balance`](https://stripe.com/docs/api/customers/object#customer_object-balance) that is
# automatically applied to future invoices and payments using the `customer_balance` payment method.
# Customers can fund this balance by initiating a bank transfer to any account in the
# `financial_addresses` field.
# Related guide: [Customer Balance - Funding Instructions](https://stripe.com/docs/payments/customer-balance/funding-instructions) to learn more
#
# source://stripe//lib/stripe/resources/funding_instructions.rb#10
class Stripe::FundingInstructions < ::Stripe::APIResource
  # source://stripe//lib/stripe/resources/funding_instructions.rb#13
  def resource_url; end
end

# source://stripe//lib/stripe/resources/funding_instructions.rb#11
Stripe::FundingInstructions::OBJECT_NAME = T.let(T.unsafe(nil), String)

# IdempotencyError is raised in cases where an idempotency key was used
# improperly.
#
# source://stripe//lib/stripe/errors.rb#89
class Stripe::IdempotencyError < ::Stripe::StripeError; end

# source://stripe//lib/stripe/resources/identity/verification_report.rb#5
module Stripe::Identity; end

# A VerificationReport is the result of an attempt to collect and verify data from a user.
# The collection of verification checks performed is determined from the `type` and `options`
# parameters used. You can find the result of each verification check performed in the
# appropriate sub-resource: `document`, `id_number`, `selfie`.
#
# Each VerificationReport contains a copy of any data collected by the user as well as
# reference IDs which can be used to access collected images through the [FileUpload](https://stripe.com/docs/api/files)
# API. To configure and create VerificationReports, use the
# [VerificationSession](https://stripe.com/docs/api/identity/verification_sessions) API.
#
# Related guides: [Accessing verification results](https://stripe.com/docs/identity/verification-sessions#results).
#
# source://stripe//lib/stripe/resources/identity/verification_report.rb#17
class Stripe::Identity::VerificationReport < ::Stripe::APIResource
  extend ::Stripe::APIOperations::List
end

# source://stripe//lib/stripe/resources/identity/verification_report.rb#20
Stripe::Identity::VerificationReport::OBJECT_NAME = T.let(T.unsafe(nil), String)

# A VerificationSession guides you through the process of collecting and verifying the identities
# of your users. It contains details about the type of verification, such as what [verification
# check](https://stripe.com/docs/identity/verification-checks) to perform. Only create one VerificationSession for
# each verification in your system.
#
# A VerificationSession transitions through [multiple
# statuses](https://stripe.com/docs/identity/how-sessions-work) throughout its lifetime as it progresses through
# the verification flow. The VerificationSession contains the user's verified data after
# verification checks are complete.
#
# Related guide: [The Verification Sessions API](https://stripe.com/docs/identity/verification-sessions)
#
# source://stripe//lib/stripe/resources/identity/verification_session.rb#17
class Stripe::Identity::VerificationSession < ::Stripe::APIResource
  include ::Stripe::APIOperations::Save
  extend ::Stripe::APIOperations::Create
  extend ::Stripe::APIOperations::List
  extend ::Stripe::APIOperations::Save::ClassMethods

  # source://stripe//lib/stripe/resources/identity/verification_session.rb#24
  def cancel(params = T.unsafe(nil), opts = T.unsafe(nil)); end

  # source://stripe//lib/stripe/resources/identity/verification_session.rb#33
  def redact(params = T.unsafe(nil), opts = T.unsafe(nil)); end

  class << self
    # source://stripe//lib/stripe/resources/identity/verification_session.rb#42
    def cancel(session, params = T.unsafe(nil), opts = T.unsafe(nil)); end

    # source://stripe//lib/stripe/resources/identity/verification_session.rb#51
    def redact(session, params = T.unsafe(nil), opts = T.unsafe(nil)); end
  end
end

# source://stripe//lib/stripe/resources/identity/verification_session.rb#22
Stripe::Identity::VerificationSession::OBJECT_NAME = T.let(T.unsafe(nil), String)

# source://stripe//lib/stripe/instrumentation.rb#4
class Stripe::Instrumentation
  class << self
    # Returns true if there are a non-zero number of subscribers on the given
    # topic, and false otherwise.
    #
    # @return [Boolean]
    #
    # source://stripe//lib/stripe/instrumentation.rb#100
    def any_subscribers?(topic); end

    # source://stripe//lib/stripe/instrumentation.rb#113
    def notify(topic, event); end

    # source://stripe//lib/stripe/instrumentation.rb#104
    def subscribe(topic, name = T.unsafe(nil), &block); end

    # source://stripe//lib/stripe/instrumentation.rb#109
    def unsubscribe(topic, name); end

    private

    # source://stripe//lib/stripe/instrumentation.rb#117
    def subscribers; end
  end
end

# Event emitted on `request_begin` callback.
#
# source://stripe//lib/stripe/instrumentation.rb#6
class Stripe::Instrumentation::RequestBeginEvent
  # @return [RequestBeginEvent] a new instance of RequestBeginEvent
  #
  # source://stripe//lib/stripe/instrumentation.rb#20
  def initialize(method:, path:, user_data:); end

  # Returns the value of attribute method.
  #
  # source://stripe//lib/stripe/instrumentation.rb#7
  def method; end

  # Returns the value of attribute path.
  #
  # source://stripe//lib/stripe/instrumentation.rb#8
  def path; end

  # Arbitrary user-provided data in the form of a Ruby hash that's passed
  # from subscribers on `request_begin` to subscribers on `request_end`.
  # `request_begin` subscribers can set keys which will then be available
  # in `request_end`.
  #
  # Note that all subscribers of `request_begin` share the same object, so
  # they must be careful to set unique keys so as to not conflict with data
  # set by other subscribers.
  #
  # source://stripe//lib/stripe/instrumentation.rb#18
  def user_data; end
end

# source://stripe//lib/stripe/instrumentation.rb#64
class Stripe::Instrumentation::RequestContext
  # @return [RequestContext] a new instance of RequestContext
  #
  # source://stripe//lib/stripe/instrumentation.rb#72
  def initialize(duration:, context:, header:); end

  # Returns the value of attribute body.
  #
  # source://stripe//lib/stripe/instrumentation.rb#69
  def body; end

  # Returns the value of attribute duration.
  #
  # source://stripe//lib/stripe/instrumentation.rb#65
  def duration; end

  # Returns the value of attribute header.
  #
  # source://stripe//lib/stripe/instrumentation.rb#70
  def header; end

  # Returns the value of attribute method.
  #
  # source://stripe//lib/stripe/instrumentation.rb#66
  def method; end

  # Returns the value of attribute path.
  #
  # source://stripe//lib/stripe/instrumentation.rb#67
  def path; end

  # Returns the value of attribute request_id.
  #
  # source://stripe//lib/stripe/instrumentation.rb#68
  def request_id; end
end

# Event emitted on `request_end` callback.
#
# source://stripe//lib/stripe/instrumentation.rb#29
class Stripe::Instrumentation::RequestEndEvent
  # @return [RequestEndEvent] a new instance of RequestEndEvent
  #
  # source://stripe//lib/stripe/instrumentation.rb#47
  def initialize(request_context:, response_context:, num_retries:, user_data: T.unsafe(nil)); end

  # Returns the value of attribute duration.
  #
  # source://stripe//lib/stripe/instrumentation.rb#30
  def duration; end

  # Returns the value of attribute http_status.
  #
  # source://stripe//lib/stripe/instrumentation.rb#31
  def http_status; end

  # Returns the value of attribute method.
  #
  # source://stripe//lib/stripe/instrumentation.rb#32
  def method; end

  # Returns the value of attribute num_retries.
  #
  # source://stripe//lib/stripe/instrumentation.rb#33
  def num_retries; end

  # Returns the value of attribute path.
  #
  # source://stripe//lib/stripe/instrumentation.rb#34
  def path; end

  # Returns the value of attribute request_body.
  #
  # source://stripe//lib/stripe/instrumentation.rb#39
  def request_body; end

  # Returns the value of attribute request_header.
  #
  # source://stripe//lib/stripe/instrumentation.rb#38
  def request_header; end

  # Returns the value of attribute request_id.
  #
  # source://stripe//lib/stripe/instrumentation.rb#35
  def request_id; end

  # Returns the value of attribute response_body.
  #
  # source://stripe//lib/stripe/instrumentation.rb#37
  def response_body; end

  # Returns the value of attribute response_header.
  #
  # source://stripe//lib/stripe/instrumentation.rb#36
  def response_header; end

  # Arbitrary user-provided data in the form of a Ruby hash that's passed
  # from subscribers on `request_begin` to subscribers on `request_end`.
  # `request_begin` subscribers can set keys which will then be available
  # in `request_end`.
  #
  # source://stripe//lib/stripe/instrumentation.rb#45
  def user_data; end
end

# This class was renamed for consistency. This alias is here for backwards
# compatibility.
#
# source://stripe//lib/stripe/instrumentation.rb#96
Stripe::Instrumentation::RequestEvent = Stripe::Instrumentation::RequestEndEvent

# source://stripe//lib/stripe/instrumentation.rb#82
class Stripe::Instrumentation::ResponseContext
  # @return [ResponseContext] a new instance of ResponseContext
  #
  # source://stripe//lib/stripe/instrumentation.rb#87
  def initialize(http_status:, response:); end

  # Returns the value of attribute body.
  #
  # source://stripe//lib/stripe/instrumentation.rb#84
  def body; end

  # Returns the value of attribute header.
  #
  # source://stripe//lib/stripe/instrumentation.rb#85
  def header; end

  # Returns the value of attribute http_status.
  #
  # source://stripe//lib/stripe/instrumentation.rb#83
  def http_status; end
end

# InvalidRequestError is raised when a request is initiated with invalid
# parameters.
#
# source://stripe//lib/stripe/errors.rb#94
class Stripe::InvalidRequestError < ::Stripe::StripeError
  # @return [InvalidRequestError] a new instance of InvalidRequestError
  #
  # source://stripe//lib/stripe/errors.rb#97
  def initialize(message, param, http_status: T.unsafe(nil), http_body: T.unsafe(nil), json_body: T.unsafe(nil), http_headers: T.unsafe(nil), code: T.unsafe(nil)); end

  # Returns the value of attribute param.
  #
  # source://stripe//lib/stripe/errors.rb#95
  def param; end

  # Sets the attribute param
  #
  # @param value the value to set the attribute param to.
  #
  # source://stripe//lib/stripe/errors.rb#95
  def param=(_arg0); end
end

# Invoices are statements of amounts owed by a customer, and are either
# generated one-off, or generated periodically from a subscription.
#
# They contain [invoice items](https://stripe.com/docs/api#invoiceitems), and proration adjustments
# that may be caused by subscription upgrades/downgrades (if necessary).
#
# If your invoice is configured to be billed through automatic charges,
# Stripe automatically finalizes your invoice and attempts payment. Note
# that finalizing the invoice,
# [when automatic](https://stripe.com/docs/billing/invoices/workflow/#auto_advance), does
# not happen immediately as the invoice is created. Stripe waits
# until one hour after the last webhook was successfully sent (or the last
# webhook timed out after failing). If you (and the platforms you may have
# connected to) have no webhooks configured, Stripe waits one hour after
# creation to finalize the invoice.
#
# If your invoice is configured to be billed by sending an email, then based on your
# [email settings](https://dashboard.stripe.com/account/billing/automatic),
# Stripe will email the invoice to your customer and await payment. These
# emails can contain a link to a hosted page to pay the invoice.
#
# Stripe applies any customer credit on the account before determining the
# amount due for the invoice (i.e., the amount that will be actually
# charged). If the amount due for the invoice is less than Stripe's [minimum allowed charge
# per currency](https://stripe.com/docs/currencies#minimum-and-maximum-charge-amounts), the
# invoice is automatically marked paid, and we add the amount due to the
# customer's credit balance which is applied to the next invoice.
#
# More details on the customer's credit balance are
# [here](https://stripe.com/docs/billing/customer/balance).
#
# Related guide: [Send Invoices to Customers](https://stripe.com/docs/billing/invoices/sending).
#
# source://stripe//lib/stripe/resources/invoice.rb#37
class Stripe::Invoice < ::Stripe::APIResource
  include ::Stripe::APIOperations::Delete
  include ::Stripe::APIOperations::Save
  extend ::Stripe::APIOperations::Create
  extend ::Stripe::APIOperations::Delete::ClassMethods
  extend ::Stripe::APIOperations::List
  extend ::Stripe::APIOperations::Search
  extend ::Stripe::APIOperations::Save::ClassMethods

  # source://stripe//lib/stripe/resources/invoice.rb#46
  def finalize_invoice(params = T.unsafe(nil), opts = T.unsafe(nil)); end

  # source://stripe//lib/stripe/resources/invoice.rb#55
  def mark_uncollectible(params = T.unsafe(nil), opts = T.unsafe(nil)); end

  # source://stripe//lib/stripe/resources/invoice.rb#64
  def pay(params = T.unsafe(nil), opts = T.unsafe(nil)); end

  # source://stripe//lib/stripe/resources/invoice.rb#73
  def send_invoice(params = T.unsafe(nil), opts = T.unsafe(nil)); end

  # source://stripe//lib/stripe/resources/invoice.rb#82
  def void_invoice(params = T.unsafe(nil), opts = T.unsafe(nil)); end

  class << self
    # source://stripe//lib/stripe/resources/invoice.rb#91
    def finalize_invoice(invoice, params = T.unsafe(nil), opts = T.unsafe(nil)); end

    # source://stripe//lib/stripe/resources/invoice.rb#100
    def list_upcoming_line_items(params = T.unsafe(nil), opts = T.unsafe(nil)); end

    # source://stripe//lib/stripe/resources/invoice.rb#109
    def mark_uncollectible(invoice, params = T.unsafe(nil), opts = T.unsafe(nil)); end

    # source://stripe//lib/stripe/resources/invoice.rb#118
    def pay(invoice, params = T.unsafe(nil), opts = T.unsafe(nil)); end

    # source://stripe//lib/stripe/resources/invoice.rb#154
    def search(params = T.unsafe(nil), opts = T.unsafe(nil)); end

    # source://stripe//lib/stripe/resources/invoice.rb#158
    def search_auto_paging_each(params = T.unsafe(nil), opts = T.unsafe(nil), &blk); end

    # source://stripe//lib/stripe/resources/invoice.rb#127
    def send_invoice(invoice, params = T.unsafe(nil), opts = T.unsafe(nil)); end

    # source://stripe//lib/stripe/resources/invoice.rb#136
    def upcoming(params = T.unsafe(nil), opts = T.unsafe(nil)); end

    # source://stripe//lib/stripe/resources/invoice.rb#145
    def void_invoice(invoice, params = T.unsafe(nil), opts = T.unsafe(nil)); end
  end
end

# source://stripe//lib/stripe/resources/invoice.rb#44
Stripe::Invoice::OBJECT_NAME = T.let(T.unsafe(nil), String)

# Invoice Items represent the component lines of an [invoice](https://stripe.com/docs/api/invoices). An invoice item is added to an
# invoice by creating or updating it with an `invoice` field, at which point it will be included as
# [an invoice line item](https://stripe.com/docs/api/invoices/line_item) within
# [invoice.lines](https://stripe.com/docs/api/invoices/object#invoice_object-lines).
#
# Invoice Items can be created before you are ready to actually send the invoice. This can be particularly useful when combined
# with a [subscription](https://stripe.com/docs/api/subscriptions). Sometimes you want to add a charge or credit to a customer, but actually charge
# or credit the customer's card only at the end of a regular billing cycle. This is useful for combining several charges
# (to minimize per-transaction fees), or for having Stripe tabulate your usage-based billing totals.
#
# Related guides: [Integrate with the Invoicing API](https://stripe.com/docs/invoicing/integration), [Subscription Invoices](https://stripe.com/docs/billing/invoices/subscription#adding-upcoming-invoice-items).
#
# source://stripe//lib/stripe/resources/invoice_item.rb#16
class Stripe::InvoiceItem < ::Stripe::APIResource
  include ::Stripe::APIOperations::Delete
  include ::Stripe::APIOperations::Save
  extend ::Stripe::APIOperations::Create
  extend ::Stripe::APIOperations::Delete::ClassMethods
  extend ::Stripe::APIOperations::List
  extend ::Stripe::APIOperations::Save::ClassMethods
end

# source://stripe//lib/stripe/resources/invoice_item.rb#22
Stripe::InvoiceItem::OBJECT_NAME = T.let(T.unsafe(nil), String)

# source://stripe//lib/stripe/resources/invoice_line_item.rb#5
class Stripe::InvoiceLineItem < ::Stripe::StripeObject; end

# source://stripe//lib/stripe/resources/invoice_line_item.rb#6
Stripe::InvoiceLineItem::OBJECT_NAME = T.let(T.unsafe(nil), String)

# source://stripe//lib/stripe/resources/issuing/authorization.rb#5
module Stripe::Issuing; end

# When an [issued card](https://stripe.com/docs/issuing) is used to make a purchase, an Issuing `Authorization`
# object is created. [Authorizations](https://stripe.com/docs/issuing/purchases/authorizations) must be approved for the
# purchase to be completed successfully.
#
# Related guide: [Issued Card Authorizations](https://stripe.com/docs/issuing/purchases/authorizations).
#
# source://stripe//lib/stripe/resources/issuing/authorization.rb#11
class Stripe::Issuing::Authorization < ::Stripe::APIResource
  include ::Stripe::APIOperations::Save
  extend ::Stripe::APIOperations::List
  extend ::Stripe::APIOperations::Save::ClassMethods

  # source://stripe//lib/stripe/resources/issuing/authorization.rb#17
  def approve(params = T.unsafe(nil), opts = T.unsafe(nil)); end

  # source://stripe//lib/stripe/resources/issuing/authorization.rb#26
  def decline(params = T.unsafe(nil), opts = T.unsafe(nil)); end

  class << self
    # source://stripe//lib/stripe/resources/issuing/authorization.rb#35
    def approve(authorization, params = T.unsafe(nil), opts = T.unsafe(nil)); end

    # source://stripe//lib/stripe/resources/issuing/authorization.rb#44
    def decline(authorization, params = T.unsafe(nil), opts = T.unsafe(nil)); end
  end
end

# source://stripe//lib/stripe/resources/issuing/authorization.rb#15
Stripe::Issuing::Authorization::OBJECT_NAME = T.let(T.unsafe(nil), String)

# You can [create physical or virtual cards](https://stripe.com/docs/issuing/cards) that are issued to cardholders.
#
# source://stripe//lib/stripe/resources/issuing/card.rb#7
class Stripe::Issuing::Card < ::Stripe::APIResource
  include ::Stripe::APIOperations::Save
  extend ::Stripe::APIOperations::Create
  extend ::Stripe::APIOperations::List
  extend ::Stripe::APIOperations::Save::ClassMethods

  # source://stripe//lib/stripe/resources/issuing/card.rb#14
  def test_helpers; end
end

# source://stripe//lib/stripe/resources/issuing/card.rb#12
Stripe::Issuing::Card::OBJECT_NAME = T.let(T.unsafe(nil), String)

# source://stripe//lib/stripe/resources/issuing/card.rb#18
class Stripe::Issuing::Card::TestHelpers < ::Stripe::APIResourceTestHelpers
  # source://stripe//lib/stripe/resources/issuing/card.rb#57
  def deliver_card(params = T.unsafe(nil), opts = T.unsafe(nil)); end

  # source://stripe//lib/stripe/resources/issuing/card.rb#66
  def fail_card(params = T.unsafe(nil), opts = T.unsafe(nil)); end

  # source://stripe//lib/stripe/resources/issuing/card.rb#75
  def return_card(params = T.unsafe(nil), opts = T.unsafe(nil)); end

  # source://stripe//lib/stripe/resources/issuing/card.rb#84
  def ship_card(params = T.unsafe(nil), opts = T.unsafe(nil)); end

  class << self
    # source://stripe//lib/stripe/resources/issuing/card.rb#21
    def deliver_card(card, params = T.unsafe(nil), opts = T.unsafe(nil)); end

    # source://stripe//lib/stripe/resources/issuing/card.rb#30
    def fail_card(card, params = T.unsafe(nil), opts = T.unsafe(nil)); end

    # source://stripe//lib/stripe/resources/issuing/card.rb#39
    def return_card(card, params = T.unsafe(nil), opts = T.unsafe(nil)); end

    # source://stripe//lib/stripe/resources/issuing/card.rb#48
    def ship_card(card, params = T.unsafe(nil), opts = T.unsafe(nil)); end
  end
end

# source://stripe//lib/stripe/resources/issuing/card.rb#19
Stripe::Issuing::Card::TestHelpers::RESOURCE_CLASS = Stripe::Issuing::Card

# An Issuing `Cardholder` object represents an individual or business entity who is [issued](https://stripe.com/docs/issuing) cards.
#
# Related guide: [How to create a Cardholder](https://stripe.com/docs/issuing/cards#create-cardholder)
#
# source://stripe//lib/stripe/resources/issuing/cardholder.rb#9
class Stripe::Issuing::Cardholder < ::Stripe::APIResource
  include ::Stripe::APIOperations::Save
  extend ::Stripe::APIOperations::Create
  extend ::Stripe::APIOperations::List
  extend ::Stripe::APIOperations::Save::ClassMethods
end

# source://stripe//lib/stripe/resources/issuing/cardholder.rb#14
Stripe::Issuing::Cardholder::OBJECT_NAME = T.let(T.unsafe(nil), String)

# As a [card issuer](https://stripe.com/docs/issuing), you can dispute transactions that the cardholder does not recognize, suspects to be fraudulent, or has other issues with.
#
# Related guide: [Disputing Transactions](https://stripe.com/docs/issuing/purchases/disputes)
#
# source://stripe//lib/stripe/resources/issuing/dispute.rb#9
class Stripe::Issuing::Dispute < ::Stripe::APIResource
  include ::Stripe::APIOperations::Save
  extend ::Stripe::APIOperations::Create
  extend ::Stripe::APIOperations::List
  extend ::Stripe::APIOperations::Save::ClassMethods

  # source://stripe//lib/stripe/resources/issuing/dispute.rb#16
  def submit(params = T.unsafe(nil), opts = T.unsafe(nil)); end

  class << self
    # source://stripe//lib/stripe/resources/issuing/dispute.rb#25
    def submit(dispute, params = T.unsafe(nil), opts = T.unsafe(nil)); end
  end
end

# source://stripe//lib/stripe/resources/issuing/dispute.rb#14
Stripe::Issuing::Dispute::OBJECT_NAME = T.let(T.unsafe(nil), String)

# Any use of an [issued card](https://stripe.com/docs/issuing) that results in funds entering or leaving
# your Stripe account, such as a completed purchase or refund, is represented by an Issuing
# `Transaction` object.
#
# Related guide: [Issued Card Transactions](https://stripe.com/docs/issuing/purchases/transactions).
#
# source://stripe//lib/stripe/resources/issuing/transaction.rb#11
class Stripe::Issuing::Transaction < ::Stripe::APIResource
  include ::Stripe::APIOperations::Save
  extend ::Stripe::APIOperations::List
  extend ::Stripe::APIOperations::Save::ClassMethods
end

# source://stripe//lib/stripe/resources/issuing/transaction.rb#15
Stripe::Issuing::Transaction::OBJECT_NAME = T.let(T.unsafe(nil), String)

# map to the same values as the standard library's logger
#
# source://stripe//lib/stripe.rb#57
Stripe::LEVEL_DEBUG = T.let(T.unsafe(nil), Integer)

# source://stripe//lib/stripe.rb#58
Stripe::LEVEL_ERROR = T.let(T.unsafe(nil), Integer)

# source://stripe//lib/stripe.rb#59
Stripe::LEVEL_INFO = T.let(T.unsafe(nil), Integer)

# A line item.
#
# source://stripe//lib/stripe/resources/line_item.rb#6
class Stripe::LineItem < ::Stripe::APIResource; end

# source://stripe//lib/stripe/resources/line_item.rb#7
Stripe::LineItem::OBJECT_NAME = T.let(T.unsafe(nil), String)

# source://stripe//lib/stripe/list_object.rb#4
class Stripe::ListObject < ::Stripe::StripeObject
  include ::Stripe::APIOperations::List
  include ::Stripe::APIOperations::Request
  include ::Stripe::APIOperations::Create
  extend ::Stripe::APIOperations::Request::ClassMethods

  # @return [ListObject] a new instance of ListObject
  #
  # source://stripe//lib/stripe/list_object.rb#24
  def initialize(*args); end

  # source://stripe//lib/stripe/list_object.rb#29
  def [](key); end

  # Iterates through each resource in all pages, making additional fetches to
  # the API as necessary.
  #
  # The default iteration direction is forwards according to Stripe's API
  # "natural" ordering direction -- newer objects first, and moving towards
  # older objects.
  #
  # However, if the initial list object was fetched using an `ending_before`
  # cursor (and only `ending_before`, `starting_after` cannot also be
  # included), the method assumes that the user is trying to iterate
  # backwards compared to natural ordering and returns results that way --
  # older objects first, and moving towards newer objects.
  #
  # Note that this method will make as many API calls as necessary to fetch
  # all resources. For more granular control, please see +each+ and
  # +next_page+.
  #
  # source://stripe//lib/stripe/list_object.rb#67
  def auto_paging_each(&blk); end

  # Iterates through each resource in the page represented by the current
  # `ListObject`.
  #
  # Note that this method makes no effort to fetch a new page when it gets to
  # the end of the current page's resources. See also +auto_paging_each+.
  #
  # source://stripe//lib/stripe/list_object.rb#47
  def each(&blk); end

  # Returns true if the page object contains no elements.
  #
  # @return [Boolean]
  #
  # source://stripe//lib/stripe/list_object.rb#89
  def empty?; end

  # This accessor allows a `ListObject` to inherit various filters that were
  # given to a predecessor. This allows for things like consistent limits,
  # expansions, and predicates as a user pages through resources.
  #
  # source://stripe//lib/stripe/list_object.rb#15
  def filters; end

  # This accessor allows a `ListObject` to inherit various filters that were
  # given to a predecessor. This allows for things like consistent limits,
  # expansions, and predicates as a user pages through resources.
  #
  # source://stripe//lib/stripe/list_object.rb#15
  def filters=(_arg0); end

  # Fetches the next page in the resource list (if there is one).
  #
  # This method will try to respect the limit of the current page. If none
  # was given, the default limit will be fetched again.
  #
  # source://stripe//lib/stripe/list_object.rb#104
  def next_page(params = T.unsafe(nil), opts = T.unsafe(nil)); end

  # Fetches the previous page in the resource list (if there is one).
  #
  # This method will try to respect the limit of the current page. If none
  # was given, the default limit will be fetched again.
  #
  # source://stripe//lib/stripe/list_object.rb#118
  def previous_page(params = T.unsafe(nil), opts = T.unsafe(nil)); end

  # source://stripe//lib/stripe/list_object.rb#128
  def resource_url; end

  # source://stripe//lib/stripe/list_object.rb#93
  def retrieve(id, opts = T.unsafe(nil)); end

  # Iterates through each resource in the page represented by the current
  # `ListObject` in reverse.
  #
  # source://stripe//lib/stripe/list_object.rb#135
  def reverse_each(&blk); end

  class << self
    # An empty list object. This is returned from +next+ when we know that
    # there isn't a next page in order to replicate the behavior of the API
    # when it attempts to return a page beyond the last.
    #
    # source://stripe//lib/stripe/list_object.rb#20
    def empty_list(opts = T.unsafe(nil)); end
  end
end

# source://stripe//lib/stripe/list_object.rb#10
Stripe::ListObject::OBJECT_NAME = T.let(T.unsafe(nil), String)

# source://stripe//lib/stripe/resources/login_link.rb#5
class Stripe::LoginLink < ::Stripe::APIResource
  class << self
    # @raise [NotImplementedError]
    #
    # source://stripe//lib/stripe/resources/login_link.rb#8
    def retrieve(_id, _opts = T.unsafe(nil)); end
  end
end

# source://stripe//lib/stripe/resources/login_link.rb#6
Stripe::LoginLink::OBJECT_NAME = T.let(T.unsafe(nil), String)

# A Mandate is a record of the permission a customer has given you to debit their payment method.
#
# source://stripe//lib/stripe/resources/mandate.rb#6
class Stripe::Mandate < ::Stripe::APIResource; end

# source://stripe//lib/stripe/resources/mandate.rb#7
Stripe::Mandate::OBJECT_NAME = T.let(T.unsafe(nil), String)

# Encodes parameters into a `multipart/form-data` payload as described by RFC
# 2388:
#
#     https://tools.ietf.org/html/rfc2388
#
# This is most useful for transferring file-like objects.
#
# Parameters should be added with `#encode`. When ready, use `#body` to get
# the encoded result and `#content_type` to get the value that should be
# placed in the `Content-Type` header of a subsequent request (which includes
# a boundary value).
#
# source://stripe//lib/stripe/multipart_encoder.rb#18
class Stripe::MultipartEncoder
  # Initializes a new multipart encoder.
  #
  # @return [MultipartEncoder] a new instance of MultipartEncoder
  #
  # source://stripe//lib/stripe/multipart_encoder.rb#37
  def initialize; end

  # Gets the encoded body. `#close` must be called first.
  #
  # source://stripe//lib/stripe/multipart_encoder.rb#52
  def body; end

  # Gets the object's randomly generated boundary string.
  #
  # source://stripe//lib/stripe/multipart_encoder.rb#34
  def boundary; end

  # Finalizes the object by writing the final boundary.
  #
  # source://stripe//lib/stripe/multipart_encoder.rb#59
  def close; end

  # Gets the value including boundary that should be put into a multipart
  # request's `Content-Type`.
  #
  # source://stripe//lib/stripe/multipart_encoder.rb#72
  def content_type; end

  # Encodes a set of parameters to the body.
  #
  # Note that parameters are expected to be a hash, but a "flat" hash such
  # that complex substructures like hashes and arrays have already been
  # appropriately Stripe-encoded. Pass a complex structure through
  # `Util.flatten_params` first before handing it off to this method.
  #
  # source://stripe//lib/stripe/multipart_encoder.rb#82
  def encode(params); end

  private

  # Escapes double quotes so that the given value can be used in a
  # double-quoted string and replaces any linebreak characters with spaces.
  #
  # source://stripe//lib/stripe/multipart_encoder.rb#104
  def escape(str); end

  # source://stripe//lib/stripe/multipart_encoder.rb#108
  def write_field(name, data, filename:); end

  class << self
    # A shortcut for encoding a single set of parameters and finalizing a
    # result.
    #
    # Returns an encoded body and the value that should be set in the content
    # type header of a subsequent request.
    #
    # source://stripe//lib/stripe/multipart_encoder.rb#26
    def encode(params); end
  end
end

# source://stripe//lib/stripe/multipart_encoder.rb#19
Stripe::MultipartEncoder::MULTIPART_FORM_DATA = T.let(T.unsafe(nil), String)

# source://stripe//lib/stripe/errors.rb#128
module Stripe::OAuth
  class << self
    # source://stripe//lib/stripe/oauth.rb#31
    def authorize_url(params = T.unsafe(nil), opts = T.unsafe(nil)); end

    # source://stripe//lib/stripe/oauth.rb#55
    def deauthorize(params = T.unsafe(nil), opts = T.unsafe(nil)); end

    # source://stripe//lib/stripe/oauth.rb#17
    def get_client_id(params = T.unsafe(nil)); end

    # source://stripe//lib/stripe/oauth.rb#45
    def token(params = T.unsafe(nil), opts = T.unsafe(nil)); end
  end
end

# InvalidClientError is raised when the client doesn't belong to you, or
# the API key mode (live or test) doesn't match the client mode. Or the
# stripe_user_id doesn't exist or isn't connected to your application.
#
# source://stripe//lib/stripe/errors.rb#148
class Stripe::OAuth::InvalidClientError < ::Stripe::OAuth::OAuthError; end

# InvalidGrantError is raised when a specified code doesn't exist, is
# expired, has been used, or doesn't belong to you; a refresh token doesn't
# exist, or doesn't belong to you; or if an API key's mode (live or test)
# doesn't match the mode of a code or refresh token.
#
# source://stripe//lib/stripe/errors.rb#155
class Stripe::OAuth::InvalidGrantError < ::Stripe::OAuth::OAuthError; end

# InvalidRequestError is raised when a code, refresh token, or grant type
# parameter is not provided, but was required.
#
# source://stripe//lib/stripe/errors.rb#160
class Stripe::OAuth::InvalidRequestError < ::Stripe::OAuth::OAuthError; end

# InvalidScopeError is raised when an invalid scope parameter is provided.
#
# source://stripe//lib/stripe/errors.rb#164
class Stripe::OAuth::InvalidScopeError < ::Stripe::OAuth::OAuthError; end

# OAuthError is raised when the OAuth API returns an error.
#
# source://stripe//lib/stripe/errors.rb#130
class Stripe::OAuth::OAuthError < ::Stripe::StripeError
  # @return [OAuthError] a new instance of OAuthError
  #
  # source://stripe//lib/stripe/errors.rb#131
  def initialize(code, description, http_status: T.unsafe(nil), http_body: T.unsafe(nil), json_body: T.unsafe(nil), http_headers: T.unsafe(nil)); end

  # source://stripe//lib/stripe/errors.rb#138
  def construct_error_object; end
end

# source://stripe//lib/stripe/oauth.rb#5
module Stripe::OAuth::OAuthOperations
  extend ::Stripe::APIOperations::Request::ClassMethods

  class << self
    # source://stripe//lib/stripe/oauth.rb#8
    def execute_resource_request(method, url, params, opts); end
  end
end

# UnsupportedGrantTypeError is raised when an unuspported grant type
# parameter is specified.
#
# source://stripe//lib/stripe/errors.rb#169
class Stripe::OAuth::UnsupportedGrantTypeError < ::Stripe::OAuth::OAuthError; end

# UnsupportedResponseTypeError is raised when an unsupported response type
# parameter is specified.
#
# source://stripe//lib/stripe/errors.rb#174
class Stripe::OAuth::UnsupportedResponseTypeError < ::Stripe::OAuth::OAuthError; end

# Represents on OAuth error returned by the OAuth API.
#
# @see https://stripe.com/docs/connect/oauth-reference#post-token-errors
#
# source://stripe//lib/stripe/error_object.rb#82
class Stripe::OAuthErrorObject < ::Stripe::StripeObject
  # A unique error code per error type.
  #
  # source://stripe//lib/stripe/error_object.rb#84
  def error; end

  # A human readable description of the error.
  #
  # source://stripe//lib/stripe/error_object.rb#89
  def error_description; end
end

# source://stripe//lib/stripe/object_types.rb#7
module Stripe::ObjectTypes
  class << self
    # source://stripe//lib/stripe/object_types.rb#8
    def object_names_to_classes; end
  end
end

# A PaymentIntent guides you through the process of collecting a payment from your customer.
# We recommend that you create exactly one PaymentIntent for each order or
# customer session in your system. You can reference the PaymentIntent later to
# see the history of payment attempts for a particular session.
#
# A PaymentIntent transitions through
# [multiple statuses](https://stripe.com/docs/payments/intents#intent-statuses)
# throughout its lifetime as it interfaces with Stripe.js to perform
# authentication flows and ultimately creates at most one successful charge.
#
# Related guide: [Payment Intents API](https://stripe.com/docs/payments/payment-intents).
#
# source://stripe//lib/stripe/resources/payment_intent.rb#16
class Stripe::PaymentIntent < ::Stripe::APIResource
  include ::Stripe::APIOperations::Save
  extend ::Stripe::APIOperations::Create
  extend ::Stripe::APIOperations::List
  extend ::Stripe::APIOperations::Search
  extend ::Stripe::APIOperations::Save::ClassMethods

  # source://stripe//lib/stripe/resources/payment_intent.rb#24
  def apply_customer_balance(params = T.unsafe(nil), opts = T.unsafe(nil)); end

  # source://stripe//lib/stripe/resources/payment_intent.rb#33
  def cancel(params = T.unsafe(nil), opts = T.unsafe(nil)); end

  # source://stripe//lib/stripe/resources/payment_intent.rb#42
  def capture(params = T.unsafe(nil), opts = T.unsafe(nil)); end

  # source://stripe//lib/stripe/resources/payment_intent.rb#51
  def confirm(params = T.unsafe(nil), opts = T.unsafe(nil)); end

  # source://stripe//lib/stripe/resources/payment_intent.rb#60
  def increment_authorization(params = T.unsafe(nil), opts = T.unsafe(nil)); end

  # source://stripe//lib/stripe/resources/payment_intent.rb#69
  def verify_microdeposits(params = T.unsafe(nil), opts = T.unsafe(nil)); end

  class << self
    # source://stripe//lib/stripe/resources/payment_intent.rb#78
    def apply_customer_balance(intent, params = T.unsafe(nil), opts = T.unsafe(nil)); end

    # source://stripe//lib/stripe/resources/payment_intent.rb#87
    def cancel(intent, params = T.unsafe(nil), opts = T.unsafe(nil)); end

    # source://stripe//lib/stripe/resources/payment_intent.rb#96
    def capture(intent, params = T.unsafe(nil), opts = T.unsafe(nil)); end

    # source://stripe//lib/stripe/resources/payment_intent.rb#105
    def confirm(intent, params = T.unsafe(nil), opts = T.unsafe(nil)); end

    # source://stripe//lib/stripe/resources/payment_intent.rb#114
    def increment_authorization(intent, params = T.unsafe(nil), opts = T.unsafe(nil)); end

    # source://stripe//lib/stripe/resources/payment_intent.rb#132
    def search(params = T.unsafe(nil), opts = T.unsafe(nil)); end

    # source://stripe//lib/stripe/resources/payment_intent.rb#136
    def search_auto_paging_each(params = T.unsafe(nil), opts = T.unsafe(nil), &blk); end

    # source://stripe//lib/stripe/resources/payment_intent.rb#123
    def verify_microdeposits(intent, params = T.unsafe(nil), opts = T.unsafe(nil)); end
  end
end

# source://stripe//lib/stripe/resources/payment_intent.rb#22
Stripe::PaymentIntent::OBJECT_NAME = T.let(T.unsafe(nil), String)

# A payment link is a shareable URL that will take your customers to a hosted payment page. A payment link can be shared and used multiple times.
#
# When a customer opens a payment link it will open a new [checkout session](https://stripe.com/docs/api/checkout/sessions) to render the payment page. You can use [checkout session events](https://stripe.com/docs/api/events/types#event_types-checkout.session.completed) to track payments through payment links.
#
# Related guide: [Payment Links API](https://stripe.com/docs/payment-links)
#
# source://stripe//lib/stripe/resources/payment_link.rb#10
class Stripe::PaymentLink < ::Stripe::APIResource
  include ::Stripe::APIOperations::Save
  extend ::Stripe::APIOperations::Create
  extend ::Stripe::APIOperations::List
  extend ::Stripe::APIOperations::Save::ClassMethods

  # source://stripe//lib/stripe/resources/payment_link.rb#17
  def list_line_items(params = T.unsafe(nil), opts = T.unsafe(nil)); end

  class << self
    # source://stripe//lib/stripe/resources/payment_link.rb#26
    def list_line_items(payment_link, params = T.unsafe(nil), opts = T.unsafe(nil)); end
  end
end

# source://stripe//lib/stripe/resources/payment_link.rb#15
Stripe::PaymentLink::OBJECT_NAME = T.let(T.unsafe(nil), String)

# PaymentMethod objects represent your customer's payment instruments.
# You can use them with [PaymentIntents](https://stripe.com/docs/payments/payment-intents) to collect payments or save them to
# Customer objects to store instrument details for future payments.
#
# Related guides: [Payment Methods](https://stripe.com/docs/payments/payment-methods) and [More Payment Scenarios](https://stripe.com/docs/payments/more-payment-scenarios).
#
# source://stripe//lib/stripe/resources/payment_method.rb#10
class Stripe::PaymentMethod < ::Stripe::APIResource
  include ::Stripe::APIOperations::Save
  extend ::Stripe::APIOperations::Create
  extend ::Stripe::APIOperations::List
  extend ::Stripe::APIOperations::Save::ClassMethods

  # source://stripe//lib/stripe/resources/payment_method.rb#17
  def attach(params = T.unsafe(nil), opts = T.unsafe(nil)); end

  # source://stripe//lib/stripe/resources/payment_method.rb#26
  def detach(params = T.unsafe(nil), opts = T.unsafe(nil)); end

  class << self
    # source://stripe//lib/stripe/resources/payment_method.rb#35
    def attach(payment_method, params = T.unsafe(nil), opts = T.unsafe(nil)); end

    # source://stripe//lib/stripe/resources/payment_method.rb#44
    def detach(payment_method, params = T.unsafe(nil), opts = T.unsafe(nil)); end
  end
end

# source://stripe//lib/stripe/resources/payment_method.rb#15
Stripe::PaymentMethod::OBJECT_NAME = T.let(T.unsafe(nil), String)

# A `Payout` object is created when you receive funds from Stripe, or when you
# initiate a payout to either a bank account or debit card of a [connected
# Stripe account](https://stripe.com/docs/connect/bank-debit-card-payouts). You can retrieve individual payouts,
# as well as list all payouts. Payouts are made on [varying
# schedules](https://stripe.com/docs/connect/manage-payout-schedule), depending on your country and
# industry.
#
# Related guide: [Receiving Payouts](https://stripe.com/docs/payouts).
#
# source://stripe//lib/stripe/resources/payout.rb#13
class Stripe::Payout < ::Stripe::APIResource
  include ::Stripe::APIOperations::Save
  extend ::Stripe::APIOperations::Create
  extend ::Stripe::APIOperations::List
  extend ::Stripe::APIOperations::Save::ClassMethods

  # source://stripe//lib/stripe/resources/payout.rb#20
  def cancel(params = T.unsafe(nil), opts = T.unsafe(nil)); end

  # source://stripe//lib/stripe/resources/payout.rb#29
  def reverse(params = T.unsafe(nil), opts = T.unsafe(nil)); end

  class << self
    # source://stripe//lib/stripe/resources/payout.rb#38
    def cancel(payout, params = T.unsafe(nil), opts = T.unsafe(nil)); end

    # source://stripe//lib/stripe/resources/payout.rb#47
    def reverse(payout, params = T.unsafe(nil), opts = T.unsafe(nil)); end
  end
end

# source://stripe//lib/stripe/resources/payout.rb#18
Stripe::Payout::OBJECT_NAME = T.let(T.unsafe(nil), String)

# PermissionError is raised in cases where access was attempted on a resource
# that wasn't allowed.
#
# source://stripe//lib/stripe/errors.rb#108
class Stripe::PermissionError < ::Stripe::StripeError; end

# This is an object representing a person associated with a Stripe account.
#
# A platform cannot access a Standard or Express account's persons after the account starts onboarding, such as after generating an account link for the account.
# See the [Standard onboarding](https://stripe.com/docs/connect/standard-accounts) or [Express onboarding documentation](https://stripe.com/docs/connect/express-accounts) for information about platform pre-filling and account onboarding steps.
#
# Related guide: [Handling Identity Verification with the API](https://stripe.com/docs/connect/identity-verification-api#person-information).
#
# source://stripe//lib/stripe/resources/person.rb#11
class Stripe::Person < ::Stripe::APIResource
  include ::Stripe::APIOperations::Save
  extend ::Stripe::APIOperations::List
  extend ::Stripe::APIOperations::Save::ClassMethods

  # source://stripe//lib/stripe/resources/person.rb#17
  def resource_url; end

  class << self
    # @raise [NotImplementedError]
    #
    # source://stripe//lib/stripe/resources/person.rb#25
    def retrieve(_id, _opts = T.unsafe(nil)); end

    # @raise [NotImplementedError]
    #
    # source://stripe//lib/stripe/resources/person.rb#31
    def update(_id, _params = T.unsafe(nil), _opts = T.unsafe(nil)); end
  end
end

# source://stripe//lib/stripe/resources/person.rb#15
Stripe::Person::OBJECT_NAME = T.let(T.unsafe(nil), String)

# You can now model subscriptions more flexibly using the [Prices API](https://stripe.com/docs/api#prices). It replaces the Plans API and is backwards compatible to simplify your migration.
#
# Plans define the base price, currency, and billing cycle for recurring purchases of products.
# [Products](https://stripe.com/docs/api#products) help you track inventory or provisioning, and plans help you track pricing. Different physical goods or levels of service should be represented by products, and pricing options should be represented by plans. This approach lets you change prices without having to change your provisioning scheme.
#
# For example, you might have a single "gold" product that has plans for $10/month, $100/year, €9/month, and €90/year.
#
# Related guides: [Set up a subscription](https://stripe.com/docs/billing/subscriptions/set-up-subscription) and more about [products and prices](https://stripe.com/docs/products-prices/overview).
#
# source://stripe//lib/stripe/resources/plan.rb#13
class Stripe::Plan < ::Stripe::APIResource
  include ::Stripe::APIOperations::Delete
  include ::Stripe::APIOperations::Save
  extend ::Stripe::APIOperations::Create
  extend ::Stripe::APIOperations::Delete::ClassMethods
  extend ::Stripe::APIOperations::List
  extend ::Stripe::APIOperations::Save::ClassMethods
end

# source://stripe//lib/stripe/resources/plan.rb#19
Stripe::Plan::OBJECT_NAME = T.let(T.unsafe(nil), String)

# Prices define the unit cost, currency, and (optional) billing cycle for both recurring and one-time purchases of products.
# [Products](https://stripe.com/docs/api#products) help you track inventory or provisioning, and prices help you track payment terms. Different physical goods or levels of service should be represented by products, and pricing options should be represented by prices. This approach lets you change prices without having to change your provisioning scheme.
#
# For example, you might have a single "gold" product that has prices for $10/month, $100/year, and €9 once.
#
# Related guides: [Set up a subscription](https://stripe.com/docs/billing/subscriptions/set-up-subscription), [create an invoice](https://stripe.com/docs/billing/invoices/create), and more about [products and prices](https://stripe.com/docs/products-prices/overview).
#
# source://stripe//lib/stripe/resources/price.rb#11
class Stripe::Price < ::Stripe::APIResource
  include ::Stripe::APIOperations::Save
  extend ::Stripe::APIOperations::Create
  extend ::Stripe::APIOperations::List
  extend ::Stripe::APIOperations::Search
  extend ::Stripe::APIOperations::Save::ClassMethods

  class << self
    # source://stripe//lib/stripe/resources/price.rb#19
    def search(params = T.unsafe(nil), opts = T.unsafe(nil)); end

    # source://stripe//lib/stripe/resources/price.rb#23
    def search_auto_paging_each(params = T.unsafe(nil), opts = T.unsafe(nil), &blk); end
  end
end

# source://stripe//lib/stripe/resources/price.rb#17
Stripe::Price::OBJECT_NAME = T.let(T.unsafe(nil), String)

# Products describe the specific goods or services you offer to your customers.
# For example, you might offer a Standard and Premium version of your goods or service; each version would be a separate Product.
# They can be used in conjunction with [Prices](https://stripe.com/docs/api#prices) to configure pricing in Payment Links, Checkout, and Subscriptions.
#
# Related guides: [Set up a subscription](https://stripe.com/docs/billing/subscriptions/set-up-subscription),
# [share a Payment Link](https://stripe.com/docs/payment-links),
# [accept payments with Checkout](https://stripe.com/docs/payments/accept-a-payment#create-product-prices-upfront),
# and more about [Products and Prices](https://stripe.com/docs/products-prices/overview)
#
# source://stripe//lib/stripe/resources/product.rb#13
class Stripe::Product < ::Stripe::APIResource
  include ::Stripe::APIOperations::Delete
  include ::Stripe::APIOperations::Save
  extend ::Stripe::APIOperations::Create
  extend ::Stripe::APIOperations::Delete::ClassMethods
  extend ::Stripe::APIOperations::List
  extend ::Stripe::APIOperations::Search
  extend ::Stripe::APIOperations::Save::ClassMethods

  class << self
    # source://stripe//lib/stripe/resources/product.rb#22
    def search(params = T.unsafe(nil), opts = T.unsafe(nil)); end

    # source://stripe//lib/stripe/resources/product.rb#26
    def search_auto_paging_each(params = T.unsafe(nil), opts = T.unsafe(nil), &blk); end
  end
end

# source://stripe//lib/stripe/resources/product.rb#20
Stripe::Product::OBJECT_NAME = T.let(T.unsafe(nil), String)

# A Promotion Code represents a customer-redeemable code for a [coupon](https://stripe.com/docs/api#coupons). It can be used to
# create multiple codes for a single coupon.
#
# source://stripe//lib/stripe/resources/promotion_code.rb#7
class Stripe::PromotionCode < ::Stripe::APIResource
  include ::Stripe::APIOperations::Save
  extend ::Stripe::APIOperations::Create
  extend ::Stripe::APIOperations::List
  extend ::Stripe::APIOperations::Save::ClassMethods
end

# source://stripe//lib/stripe/resources/promotion_code.rb#12
Stripe::PromotionCode::OBJECT_NAME = T.let(T.unsafe(nil), String)

# A Quote is a way to model prices that you'd like to provide to a customer.
# Once accepted, it will automatically create an invoice, subscription or subscription schedule.
#
# source://stripe//lib/stripe/resources/quote.rb#7
class Stripe::Quote < ::Stripe::APIResource
  include ::Stripe::APIOperations::Save
  extend ::Stripe::APIOperations::Create
  extend ::Stripe::APIOperations::List
  extend ::Stripe::APIOperations::Save::ClassMethods

  # source://stripe//lib/stripe/resources/quote.rb#14
  def accept(params = T.unsafe(nil), opts = T.unsafe(nil)); end

  # source://stripe//lib/stripe/resources/quote.rb#23
  def cancel(params = T.unsafe(nil), opts = T.unsafe(nil)); end

  # source://stripe//lib/stripe/resources/quote.rb#32
  def finalize_quote(params = T.unsafe(nil), opts = T.unsafe(nil)); end

  # source://stripe//lib/stripe/resources/quote.rb#41
  def list_computed_upfront_line_items(params = T.unsafe(nil), opts = T.unsafe(nil)); end

  # source://stripe//lib/stripe/resources/quote.rb#50
  def list_line_items(params = T.unsafe(nil), opts = T.unsafe(nil)); end

  # source://stripe//lib/stripe/resources/quote.rb#104
  def pdf(params = T.unsafe(nil), opts = T.unsafe(nil), &read_body_chunk_block); end

  class << self
    # source://stripe//lib/stripe/resources/quote.rb#59
    def accept(quote, params = T.unsafe(nil), opts = T.unsafe(nil)); end

    # source://stripe//lib/stripe/resources/quote.rb#68
    def cancel(quote, params = T.unsafe(nil), opts = T.unsafe(nil)); end

    # source://stripe//lib/stripe/resources/quote.rb#77
    def finalize_quote(quote, params = T.unsafe(nil), opts = T.unsafe(nil)); end

    # source://stripe//lib/stripe/resources/quote.rb#86
    def list_computed_upfront_line_items(quote, params = T.unsafe(nil), opts = T.unsafe(nil)); end

    # source://stripe//lib/stripe/resources/quote.rb#95
    def list_line_items(quote, params = T.unsafe(nil), opts = T.unsafe(nil)); end

    # source://stripe//lib/stripe/resources/quote.rb#122
    def pdf(id, params = T.unsafe(nil), opts = T.unsafe(nil), &read_body_chunk_block); end
  end
end

# source://stripe//lib/stripe/resources/quote.rb#12
Stripe::Quote::OBJECT_NAME = T.let(T.unsafe(nil), String)

# source://stripe//lib/stripe/resources/radar/early_fraud_warning.rb#5
module Stripe::Radar; end

# An early fraud warning indicates that the card issuer has notified us that a
# charge may be fraudulent.
#
# Related guide: [Early Fraud Warnings](https://stripe.com/docs/disputes/measuring#early-fraud-warnings).
#
# source://stripe//lib/stripe/resources/radar/early_fraud_warning.rb#10
class Stripe::Radar::EarlyFraudWarning < ::Stripe::APIResource
  extend ::Stripe::APIOperations::List
end

# source://stripe//lib/stripe/resources/radar/early_fraud_warning.rb#13
Stripe::Radar::EarlyFraudWarning::OBJECT_NAME = T.let(T.unsafe(nil), String)

# Value lists allow you to group values together which can then be referenced in rules.
#
# Related guide: [Default Stripe Lists](https://stripe.com/docs/radar/lists#managing-list-items).
#
# source://stripe//lib/stripe/resources/radar/value_list.rb#9
class Stripe::Radar::ValueList < ::Stripe::APIResource
  include ::Stripe::APIOperations::Delete
  include ::Stripe::APIOperations::Save
  extend ::Stripe::APIOperations::Create
  extend ::Stripe::APIOperations::Delete::ClassMethods
  extend ::Stripe::APIOperations::List
  extend ::Stripe::APIOperations::Save::ClassMethods
end

# source://stripe//lib/stripe/resources/radar/value_list.rb#15
Stripe::Radar::ValueList::OBJECT_NAME = T.let(T.unsafe(nil), String)

# Value list items allow you to add specific values to a given Radar value list, which can then be used in rules.
#
# Related guide: [Managing List Items](https://stripe.com/docs/radar/lists#managing-list-items).
#
# source://stripe//lib/stripe/resources/radar/value_list_item.rb#9
class Stripe::Radar::ValueListItem < ::Stripe::APIResource
  include ::Stripe::APIOperations::Delete
  extend ::Stripe::APIOperations::Create
  extend ::Stripe::APIOperations::Delete::ClassMethods
  extend ::Stripe::APIOperations::List
end

# source://stripe//lib/stripe/resources/radar/value_list_item.rb#14
Stripe::Radar::ValueListItem::OBJECT_NAME = T.let(T.unsafe(nil), String)

# RateLimitError is raised in cases where an account is putting too much load
# on Stripe's API servers (usually by performing too many requests). Please
# back off on request rate.
#
# source://stripe//lib/stripe/errors.rb#114
class Stripe::RateLimitError < ::Stripe::StripeError; end

# `Refund` objects allow you to refund a charge that has previously been created
# but not yet refunded. Funds will be refunded to the credit or debit card that
# was originally charged.
#
# Related guide: [Refunds](https://stripe.com/docs/refunds).
#
# source://stripe//lib/stripe/resources/refund.rb#10
class Stripe::Refund < ::Stripe::APIResource
  include ::Stripe::APIOperations::Save
  extend ::Stripe::APIOperations::Create
  extend ::Stripe::APIOperations::List
  extend ::Stripe::APIOperations::Save::ClassMethods

  # source://stripe//lib/stripe/resources/refund.rb#17
  def cancel(params = T.unsafe(nil), opts = T.unsafe(nil)); end

  # source://stripe//lib/stripe/resources/refund.rb#35
  def test_helpers; end

  class << self
    # source://stripe//lib/stripe/resources/refund.rb#26
    def cancel(refund, params = T.unsafe(nil), opts = T.unsafe(nil)); end
  end
end

# source://stripe//lib/stripe/resources/refund.rb#15
Stripe::Refund::OBJECT_NAME = T.let(T.unsafe(nil), String)

# source://stripe//lib/stripe/resources/refund.rb#39
class Stripe::Refund::TestHelpers < ::Stripe::APIResourceTestHelpers
  # source://stripe//lib/stripe/resources/refund.rb#51
  def expire(params = T.unsafe(nil), opts = T.unsafe(nil)); end

  class << self
    # source://stripe//lib/stripe/resources/refund.rb#42
    def expire(refund, params = T.unsafe(nil), opts = T.unsafe(nil)); end
  end
end

# source://stripe//lib/stripe/resources/refund.rb#40
Stripe::Refund::TestHelpers::RESOURCE_CLASS = Stripe::Refund

# source://stripe//lib/stripe/resources/reporting/report_run.rb#5
module Stripe::Reporting; end

# The Report Run object represents an instance of a report type generated with
# specific run parameters. Once the object is created, Stripe begins processing the report.
# When the report has finished running, it will give you a reference to a file
# where you can retrieve your results. For an overview, see
# [API Access to Reports](https://stripe.com/docs/reporting/statements/api).
#
# Note that certain report types can only be run based on your live-mode data (not test-mode
# data), and will error when queried without a [live-mode API key](https://stripe.com/docs/keys#test-live-modes).
#
# source://stripe//lib/stripe/resources/reporting/report_run.rb#14
class Stripe::Reporting::ReportRun < ::Stripe::APIResource
  extend ::Stripe::APIOperations::Create
  extend ::Stripe::APIOperations::List
end

# source://stripe//lib/stripe/resources/reporting/report_run.rb#18
Stripe::Reporting::ReportRun::OBJECT_NAME = T.let(T.unsafe(nil), String)

# The Report Type resource corresponds to a particular type of report, such as
# the "Activity summary" or "Itemized payouts" reports. These objects are
# identified by an ID belonging to a set of enumerated values. See
# [API Access to Reports documentation](https://stripe.com/docs/reporting/statements/api)
# for those Report Type IDs, along with required and optional parameters.
#
# Note that certain report types can only be run based on your live-mode data (not test-mode
# data), and will error when queried without a [live-mode API key](https://stripe.com/docs/keys#test-live-modes).
#
# source://stripe//lib/stripe/resources/reporting/report_type.rb#14
class Stripe::Reporting::ReportType < ::Stripe::APIResource
  extend ::Stripe::APIOperations::List
end

# source://stripe//lib/stripe/resources/reporting/report_type.rb#17
Stripe::Reporting::ReportType::OBJECT_NAME = T.let(T.unsafe(nil), String)

# [Stripe Connect](https://stripe.com/docs/connect) platforms can reverse transfers made to a
# connected account, either entirely or partially, and can also specify whether
# to refund any related application fees. Transfer reversals add to the
# platform's balance and subtract from the destination account's balance.
#
# Reversing a transfer that was made for a [destination
# charge](https://stripe.com/docs/connect/destination-charges) is allowed only up to the amount of
# the charge. It is possible to reverse a
# [transfer_group](https://stripe.com/docs/connect/charges-transfers#transfer-options)
# transfer only if the destination account has enough balance to cover the
# reversal.
#
# Related guide: [Reversing Transfers](https://stripe.com/docs/connect/charges-transfers#reversing-transfers).
#
# source://stripe//lib/stripe/resources/reversal.rb#18
class Stripe::Reversal < ::Stripe::APIResource
  include ::Stripe::APIOperations::Save
  extend ::Stripe::APIOperations::List
  extend ::Stripe::APIOperations::Save::ClassMethods

  # source://stripe//lib/stripe/resources/reversal.rb#24
  def resource_url; end

  class << self
    # @raise [NotImplementedError]
    #
    # source://stripe//lib/stripe/resources/reversal.rb#36
    def retrieve(_id, _opts = T.unsafe(nil)); end

    # @raise [NotImplementedError]
    #
    # source://stripe//lib/stripe/resources/reversal.rb#29
    def update(_id, _params = T.unsafe(nil), _opts = T.unsafe(nil)); end
  end
end

# source://stripe//lib/stripe/resources/reversal.rb#22
Stripe::Reversal::OBJECT_NAME = T.let(T.unsafe(nil), String)

# Reviews can be used to supplement automated fraud detection with human expertise.
#
# Learn more about [Radar](https://stripe.com/radar) and reviewing payments
# [here](https://stripe.com/docs/radar/reviews).
#
# source://stripe//lib/stripe/resources/review.rb#9
class Stripe::Review < ::Stripe::APIResource
  extend ::Stripe::APIOperations::List

  # source://stripe//lib/stripe/resources/review.rb#14
  def approve(params = T.unsafe(nil), opts = T.unsafe(nil)); end

  class << self
    # source://stripe//lib/stripe/resources/review.rb#23
    def approve(review, params = T.unsafe(nil), opts = T.unsafe(nil)); end
  end
end

# source://stripe//lib/stripe/resources/review.rb#12
Stripe::Review::OBJECT_NAME = T.let(T.unsafe(nil), String)

# source://stripe//lib/stripe/search_result_object.rb#4
class Stripe::SearchResultObject < ::Stripe::StripeObject
  include ::Stripe::APIOperations::Search
  include ::Stripe::APIOperations::Request
  extend ::Stripe::APIOperations::Request::ClassMethods

  # @return [SearchResultObject] a new instance of SearchResultObject
  #
  # source://stripe//lib/stripe/search_result_object.rb#23
  def initialize(*args); end

  # source://stripe//lib/stripe/search_result_object.rb#28
  def [](key); end

  # Iterates through each resource in all pages, making additional fetches to
  # the API as necessary.
  #
  # Note that this method will make as many API calls as necessary to fetch
  # all resources. For more granular control, please see +each+ and
  # +next_search_result_page+.
  #
  # source://stripe//lib/stripe/search_result_object.rb#61
  def auto_paging_each(&blk); end

  # Iterates through each resource in the page represented by the current
  # `SearchListObject`.
  #
  # Note that this method makes no effort to fetch a new page when it gets to
  # the end of the current page's resources. See also +auto_paging_each+.
  #
  # source://stripe//lib/stripe/search_result_object.rb#46
  def each(&blk); end

  # Returns true if the page object contains no elements.
  #
  # @return [Boolean]
  #
  # source://stripe//lib/stripe/search_result_object.rb#51
  def empty?; end

  # This accessor allows a `SearchResultObject` to inherit various filters
  # that were given to a predecessor. This allows for things like consistent
  # limits, expansions, and predicates as a user pages through resources.
  #
  # source://stripe//lib/stripe/search_result_object.rb#14
  def filters; end

  # This accessor allows a `SearchResultObject` to inherit various filters
  # that were given to a predecessor. This allows for things like consistent
  # limits, expansions, and predicates as a user pages through resources.
  #
  # source://stripe//lib/stripe/search_result_object.rb#14
  def filters=(_arg0); end

  # Fetches the next page in the resource list (if there is one).
  #
  # This method will try to respect the limit of the current page. If none
  # was given, the default limit will be fetched again.
  #
  # source://stripe//lib/stripe/search_result_object.rb#78
  def next_search_result_page(params = T.unsafe(nil), opts = T.unsafe(nil)); end

  class << self
    # An empty search result object. This is returned from +next+ when we know
    # that there isn't a next page in order to replicate the behavior of the API
    # when it attempts to return a page beyond the last.
    #
    # source://stripe//lib/stripe/search_result_object.rb#19
    def empty_search_result(opts = T.unsafe(nil)); end
  end
end

# source://stripe//lib/stripe/search_result_object.rb#9
Stripe::SearchResultObject::OBJECT_NAME = T.let(T.unsafe(nil), String)

# A SetupAttempt describes one attempted confirmation of a SetupIntent,
# whether that confirmation was successful or unsuccessful. You can use
# SetupAttempts to inspect details of a specific attempt at setting up a
# payment method using a SetupIntent.
#
# source://stripe//lib/stripe/resources/setup_attempt.rb#9
class Stripe::SetupAttempt < ::Stripe::APIResource
  extend ::Stripe::APIOperations::List
end

# source://stripe//lib/stripe/resources/setup_attempt.rb#12
Stripe::SetupAttempt::OBJECT_NAME = T.let(T.unsafe(nil), String)

# A SetupIntent guides you through the process of setting up and saving a customer's payment credentials for future payments.
# For example, you could use a SetupIntent to set up and save your customer's card without immediately collecting a payment.
# Later, you can use [PaymentIntents](https://stripe.com/docs/api#payment_intents) to drive the payment flow.
#
# Create a SetupIntent as soon as you're ready to collect your customer's payment credentials.
# Do not maintain long-lived, unconfirmed SetupIntents as they may no longer be valid.
# The SetupIntent then transitions through multiple [statuses](https://stripe.com/docs/payments/intents#intent-statuses) as it guides
# you through the setup process.
#
# Successful SetupIntents result in payment credentials that are optimized for future payments.
# For example, cardholders in [certain regions](https://stripe.com/guides/strong-customer-authentication) may need to be run through
# [Strong Customer Authentication](https://stripe.com/docs/strong-customer-authentication) at the time of payment method collection
# in order to streamline later [off-session payments](https://stripe.com/docs/payments/setup-intents).
# If the SetupIntent is used with a [Customer](https://stripe.com/docs/api#setup_intent_object-customer), upon success,
# it will automatically attach the resulting payment method to that Customer.
# We recommend using SetupIntents or [setup_future_usage](https://stripe.com/docs/api#payment_intent_object-setup_future_usage) on
# PaymentIntents to save payment methods in order to prevent saving invalid or unoptimized payment methods.
#
# By using SetupIntents, you ensure that your customers experience the minimum set of required friction,
# even as regulations change over time.
#
# Related guide: [Setup Intents API](https://stripe.com/docs/payments/setup-intents).
#
# source://stripe//lib/stripe/resources/setup_intent.rb#27
class Stripe::SetupIntent < ::Stripe::APIResource
  include ::Stripe::APIOperations::Save
  extend ::Stripe::APIOperations::Create
  extend ::Stripe::APIOperations::List
  extend ::Stripe::APIOperations::Save::ClassMethods

  # source://stripe//lib/stripe/resources/setup_intent.rb#34
  def cancel(params = T.unsafe(nil), opts = T.unsafe(nil)); end

  # source://stripe//lib/stripe/resources/setup_intent.rb#43
  def confirm(params = T.unsafe(nil), opts = T.unsafe(nil)); end

  # source://stripe//lib/stripe/resources/setup_intent.rb#52
  def verify_microdeposits(params = T.unsafe(nil), opts = T.unsafe(nil)); end

  class << self
    # source://stripe//lib/stripe/resources/setup_intent.rb#61
    def cancel(intent, params = T.unsafe(nil), opts = T.unsafe(nil)); end

    # source://stripe//lib/stripe/resources/setup_intent.rb#70
    def confirm(intent, params = T.unsafe(nil), opts = T.unsafe(nil)); end

    # source://stripe//lib/stripe/resources/setup_intent.rb#79
    def verify_microdeposits(intent, params = T.unsafe(nil), opts = T.unsafe(nil)); end
  end
end

# source://stripe//lib/stripe/resources/setup_intent.rb#32
Stripe::SetupIntent::OBJECT_NAME = T.let(T.unsafe(nil), String)

# Shipping rates describe the price of shipping presented to your customers and can be
# applied to [Checkout Sessions](https://stripe.com/docs/payments/checkout/shipping)
# and [Orders](https://stripe.com/docs/orders/shipping) to collect shipping costs.
#
# source://stripe//lib/stripe/resources/shipping_rate.rb#8
class Stripe::ShippingRate < ::Stripe::APIResource
  include ::Stripe::APIOperations::Save
  extend ::Stripe::APIOperations::Create
  extend ::Stripe::APIOperations::List
  extend ::Stripe::APIOperations::Save::ClassMethods
end

# source://stripe//lib/stripe/resources/shipping_rate.rb#13
Stripe::ShippingRate::OBJECT_NAME = T.let(T.unsafe(nil), String)

# source://stripe//lib/stripe/resources/sigma/scheduled_query_run.rb#5
module Stripe::Sigma; end

# If you have [scheduled a Sigma query](https://stripe.com/docs/sigma/scheduled-queries), you'll
# receive a `sigma.scheduled_query_run.created` webhook each time the query
# runs. The webhook contains a `ScheduledQueryRun` object, which you can use to
# retrieve the query results.
#
# source://stripe//lib/stripe/resources/sigma/scheduled_query_run.rb#10
class Stripe::Sigma::ScheduledQueryRun < ::Stripe::APIResource
  extend ::Stripe::APIOperations::List

  class << self
    # source://stripe//lib/stripe/resources/sigma/scheduled_query_run.rb#15
    def resource_url; end
  end
end

# source://stripe//lib/stripe/resources/sigma/scheduled_query_run.rb#13
Stripe::Sigma::ScheduledQueryRun::OBJECT_NAME = T.let(T.unsafe(nil), String)

# SignatureVerificationError is raised when the signature verification for a
# webhook fails
#
# source://stripe//lib/stripe/errors.rb#119
class Stripe::SignatureVerificationError < ::Stripe::StripeError
  # @return [SignatureVerificationError] a new instance of SignatureVerificationError
  #
  # source://stripe//lib/stripe/errors.rb#122
  def initialize(message, sig_header, http_body: T.unsafe(nil)); end

  # Returns the value of attribute sig_header.
  #
  # source://stripe//lib/stripe/errors.rb#120
  def sig_header; end

  # Sets the attribute sig_header
  #
  # @param value the value to set the attribute sig_header to.
  #
  # source://stripe//lib/stripe/errors.rb#120
  def sig_header=(_arg0); end
end

# source://stripe//lib/stripe/singleton_api_resource.rb#4
class Stripe::SingletonAPIResource < ::Stripe::APIResource
  # source://stripe//lib/stripe/singleton_api_resource.rb#16
  def resource_url; end

  class << self
    # source://stripe//lib/stripe/singleton_api_resource.rb#5
    def resource_url; end

    # source://stripe//lib/stripe/singleton_api_resource.rb#20
    def retrieve(opts = T.unsafe(nil)); end
  end
end

# `Source` objects allow you to accept a variety of payment methods. They
# represent a customer's payment instrument, and can be used with the Stripe API
# just like a `Card` object: once chargeable, they can be charged, or can be
# attached to customers.
#
# Stripe doesn't recommend using the deprecated [Sources API](https://stripe.com/docs/api/sources).
# We recommend that you adopt the [PaymentMethods API](https://stripe.com/docs/api/payment_methods).
# This newer API provides access to our latest features and payment method types.
#
# Related guides: [Sources API](https://stripe.com/docs/sources) and [Sources & Customers](https://stripe.com/docs/sources/customers).
#
# source://stripe//lib/stripe/resources/source.rb#15
class Stripe::Source < ::Stripe::APIResource
  include ::Stripe::APIOperations::Save
  extend ::Stripe::APIOperations::Create
  extend ::Stripe::APIOperations::Save::ClassMethods
  extend ::Stripe::APIOperations::NestedResource
  extend ::Gem::Deprecate

  # source://stripe//lib/stripe/resources/source.rb#56
  def _deprecated_source_transactions(params = T.unsafe(nil), opts = T.unsafe(nil)); end

  # source://stripe//lib/stripe/resources/source.rb#43
  def detach(params = T.unsafe(nil), opts = T.unsafe(nil)); end

  def source_transactions(*args, **_arg1, &block); end

  # source://stripe//lib/stripe/resources/source.rb#25
  def verify(params = T.unsafe(nil), opts = T.unsafe(nil)); end

  class << self
    # source://stripe//lib/stripe/api_operations/nested_resource.rb#87
    def list_source_transactions(id, params = T.unsafe(nil), opts = T.unsafe(nil)); end

    # source://stripe//lib/stripe/api_operations/nested_resource.rb#57
    def retrieve_source_transaction(id, nested_id, opts = T.unsafe(nil)); end

    # source://stripe//lib/stripe/api_operations/nested_resource.rb#22
    def source_transactions_url(id, nested_id = T.unsafe(nil)); end

    # source://stripe//lib/stripe/resources/source.rb#34
    def verify(source, params = T.unsafe(nil), opts = T.unsafe(nil)); end
  end
end

# source://stripe//lib/stripe/resources/source.rb#20
Stripe::Source::OBJECT_NAME = T.let(T.unsafe(nil), String)

# Some payment methods have no required amount that a customer must send.
# Customers can be instructed to send any amount, and it can be made up of
# multiple transactions. As such, sources can have multiple associated
# transactions.
#
# source://stripe//lib/stripe/resources/source_transaction.rb#9
class Stripe::SourceTransaction < ::Stripe::StripeObject; end

# source://stripe//lib/stripe/resources/source_transaction.rb#10
Stripe::SourceTransaction::OBJECT_NAME = T.let(T.unsafe(nil), String)

# StripeClient executes requests against the Stripe API and allows a user to
# recover both a resource a call returns as well as a response object that
# contains information on the HTTP call.
#
# source://stripe//lib/stripe/stripe_client.rb#9
class Stripe::StripeClient
  extend ::Gem::Deprecate

  # Initializes a new StripeClient
  #
  # @return [StripeClient] a new instance of StripeClient
  #
  # source://stripe//lib/stripe/stripe_client.rb#17
  def initialize(config_arg = T.unsafe(nil)); end

  # source://stripe//lib/stripe/stripe_client.rb#183
  def _deprecated_connection_manager; end

  # Returns the value of attribute config.
  #
  # source://stripe//lib/stripe/stripe_client.rb#39
  def config; end

  # Gets the connection manager in use for the current `StripeClient`.
  #
  # This method is DEPRECATED and for backwards compatibility only.
  def connection_manager(*args, **_arg1, &block); end

  # source://stripe//lib/stripe/stripe_client.rb#214
  def execute_request(method, path, api_base: T.unsafe(nil), api_key: T.unsafe(nil), headers: T.unsafe(nil), params: T.unsafe(nil)); end

  # Executes a request and returns the body as a stream instead of converting
  # it to a StripeObject. This should be used for any request where we expect
  # an arbitrary binary response.
  #
  # A `read_body_chunk` block can be passed, which will be called repeatedly
  # with the body chunks read from the socket.
  #
  # If a block is passed, a StripeHeadersOnlyResponse is returned as the
  # block is expected to do all the necessary body processing. If no block is
  # passed, then a StripeStreamResponse is returned containing an IO stream
  # with the response body.
  #
  # source://stripe//lib/stripe/stripe_client.rb#245
  def execute_request_stream(method, path, api_base: T.unsafe(nil), api_key: T.unsafe(nil), headers: T.unsafe(nil), params: T.unsafe(nil), &read_body_chunk_block); end

  # @return [Boolean]
  #
  # source://stripe//lib/stripe/stripe_client.rb#272
  def last_response_has_key?(object_id); end

  # Returns the value of attribute options.
  #
  # source://stripe//lib/stripe/stripe_client.rb#40
  def options; end

  # Executes the API call within the given block. Usage looks like:
  #
  #     client = StripeClient.new
  #     charge, resp = client.request { Charge.create }
  #
  # source://stripe//lib/stripe/stripe_client.rb#194
  def request; end

  # source://stripe//lib/stripe/stripe_client.rb#266
  def store_last_response(object_id, resp); end

  private

  # source://stripe//lib/stripe/stripe_client.rb#511
  def api_url(url = T.unsafe(nil), api_base = T.unsafe(nil)); end

  # @raise [AuthenticationError]
  #
  # source://stripe//lib/stripe/stripe_client.rb#515
  def check_api_key!(api_key); end

  # Encodes a set of body parameters using multipart if `Content-Type` is set
  # for that, or standard form-encoding otherwise. Returns the encoded body
  # and a version of the encoded body that's safe to be logged.
  #
  # source://stripe//lib/stripe/stripe_client.rb#535
  def encode_body(body_params, headers); end

  # @raise [ArgumentError]
  #
  # source://stripe//lib/stripe/stripe_client.rb#433
  def execute_request_internal(method, path, api_base, api_key, headers, params, &read_body_chunk_block); end

  # source://stripe//lib/stripe/stripe_client.rb#568
  def execute_request_with_rescues(method, api_base, headers, context); end

  # Formats a plugin "app info" hash into a string that we can tack onto the
  # end of a User-Agent string where it'll be fairly prominent in places like
  # the Dashboard. Note that this formatting has been implemented to match
  # other libraries, and shouldn't be changed without universal consensus.
  #
  # source://stripe//lib/stripe/stripe_client.rb#698
  def format_app_info(info); end

  # source://stripe//lib/stripe/stripe_client.rb#688
  def general_api_error(status, body); end

  # source://stripe//lib/stripe/stripe_client.rb#705
  def handle_error_response(http_resp, context); end

  # @raise [APIConnectionError]
  #
  # source://stripe//lib/stripe/stripe_client.rb#833
  def handle_network_error(error, context, num_retries, api_base = T.unsafe(nil)); end

  # source://stripe//lib/stripe/stripe_client.rb#901
  def log_request(context, num_retries); end

  # source://stripe//lib/stripe/stripe_client.rb#920
  def log_response(context, request_start, status, body, resp); end

  # source://stripe//lib/stripe/stripe_client.rb#951
  def log_response_error(context, request_start, error); end

  # Works around an edge case where we end up with both query parameters from
  # parameteers and query parameters that were appended onto the end of the
  # given path.
  #
  # Decode any parameters that were added onto the end of a path and add them
  # to a unified query parameter hash so that all parameters end up in one
  # place and all of them are correctly included in the final request.
  #
  # source://stripe//lib/stripe/stripe_client.rb#732
  def merge_query_params(query_params, path); end

  # source://stripe//lib/stripe/stripe_client.rb#645
  def notify_request_begin(context); end

  # source://stripe//lib/stripe/stripe_client.rb#660
  def notify_request_end(context, duration, http_status, num_retries, user_data, resp, headers); end

  # source://stripe//lib/stripe/stripe_client.rb#859
  def request_headers(api_key, method); end

  # source://stripe//lib/stripe/stripe_client.rb#564
  def should_handle_as_error(http_status); end

  # source://stripe//lib/stripe/stripe_client.rb#747
  def specific_api_error(resp, error_data, context); end

  # Attempts to look at a response's error code and return an OAuth error if
  # one matches. Will return `nil` if the code isn't recognized.
  #
  # source://stripe//lib/stripe/stripe_client.rb#797
  def specific_oauth_error(resp, error_code, context); end

  class << self
    # Gets a currently active `StripeClient`. Set for the current thread when
    # `StripeClient#request` is being run so that API operations being executed
    # inside of that block can find the currently active client. It's reset to
    # the original value (hopefully `nil`) after the block ends.
    #
    # For internal use only. Does not provide a stable API and may be broken
    # with future non-major changes.
    #
    # source://stripe//lib/stripe/stripe_client.rb#49
    def active_client; end

    # Finishes any active connections by closing their TCP connection and
    # clears them from internal tracking in all connection managers across all
    # threads.
    #
    # If passed a `config` object, only clear connection managers for that
    # particular configuration.
    #
    # For internal use only. Does not provide a stable API and may be broken
    # with future non-major changes.
    #
    # source://stripe//lib/stripe/stripe_client.rb#62
    def clear_all_connection_managers(config: T.unsafe(nil)); end

    # Access data stored for `StripeClient` within the thread's current
    # context. Returns `ThreadContext`.
    #
    # For internal use only. Does not provide a stable API and may be broken
    # with future non-major changes.
    #
    # source://stripe//lib/stripe/stripe_client.rb#381
    def current_thread_context; end

    # A default client for the current thread.
    #
    # source://stripe//lib/stripe/stripe_client.rb#93
    def default_client; end

    # A default connection manager for the current thread scoped to the
    # configuration object that may be provided.
    #
    # source://stripe//lib/stripe/stripe_client.rb#99
    def default_connection_manager(config = T.unsafe(nil)); end

    # Garbage collects connection managers that haven't been used in some time,
    # with the idea being that we want to remove old connection managers that
    # belong to dead threads and the like.
    #
    # Prefixed with `maybe_` because garbage collection will only run
    # periodically so that we're not constantly engaged in busy work. If
    # connection managers live a little passed their useful age it's not
    # harmful, so it's not necessary to get them right away.
    #
    # For testability, returns `nil` if it didn't run and the number of
    # connection managers that were garbage collected otherwise.
    #
    # IMPORTANT: This method is not thread-safe and expects to be called inside
    # a lock on `@thread_contexts_with_connection_managers_mutex`.
    #
    # For internal use only. Does not provide a stable API and may be broken
    # with future non-major changes.
    #
    # source://stripe//lib/stripe/stripe_client.rb#402
    def maybe_gc_connection_managers; end

    # Checks if an error is a problem that we should retry on. This includes
    # both socket errors that may represent an intermittent problem and some
    # special HTTP statuses.
    #
    # @return [Boolean]
    #
    # source://stripe//lib/stripe/stripe_client.rb#115
    def should_retry?(error, method:, num_retries:, config: T.unsafe(nil)); end

    # source://stripe//lib/stripe/stripe_client.rb#163
    def sleep_time(num_retries, config: T.unsafe(nil)); end
  end
end

# Time (in seconds) that a connection manager has not been used before it's
# eligible for garbage collection.
#
# source://stripe//lib/stripe/stripe_client.rb#282
Stripe::StripeClient::CONNECTION_MANAGER_GC_LAST_USED_EXPIRY = T.let(T.unsafe(nil), Integer)

# How often to check (in seconds) for connection managers that haven't been
# used in a long time and which should be garbage collected.
#
# source://stripe//lib/stripe/stripe_client.rb#286
Stripe::StripeClient::CONNECTION_MANAGER_GC_PERIOD = T.let(T.unsafe(nil), Integer)

# source://stripe//lib/stripe/stripe_client.rb#288
Stripe::StripeClient::ERROR_MESSAGE_CONNECTION = T.let(T.unsafe(nil), String)

# source://stripe//lib/stripe/stripe_client.rb#293
Stripe::StripeClient::ERROR_MESSAGE_SSL = T.let(T.unsafe(nil), String)

# source://stripe//lib/stripe/stripe_client.rb#306
Stripe::StripeClient::ERROR_MESSAGE_TIMEOUT_CONNECT = T.let(T.unsafe(nil), String)

# source://stripe//lib/stripe/stripe_client.rb#311
Stripe::StripeClient::ERROR_MESSAGE_TIMEOUT_READ = T.let(T.unsafe(nil), String)

# Common error suffix sared by both connect and read timeout messages.
#
# source://stripe//lib/stripe/stripe_client.rb#300
Stripe::StripeClient::ERROR_MESSAGE_TIMEOUT_SUFFIX = T.let(T.unsafe(nil), String)

# Maps types of exceptions that we're likely to see during a network
# request to more user-friendly messages that we put in front of people.
# The original error message is also appended onto the final exception for
# full transparency.
#
# source://stripe//lib/stripe/stripe_client.rb#320
Stripe::StripeClient::NETWORK_ERROR_MESSAGES_MAP = T.let(T.unsafe(nil), Hash)

# RequestLogContext stores information about a request that's begin made so
# that we can log certain information. It's useful because it means that we
# don't have to pass around as many parameters.
#
# source://stripe//lib/stripe/stripe_client.rb#965
class Stripe::StripeClient::RequestLogContext
  # Returns the value of attribute account.
  #
  # source://stripe//lib/stripe/stripe_client.rb#967
  def account; end

  # Sets the attribute account
  #
  # @param value the value to set the attribute account to.
  #
  # source://stripe//lib/stripe/stripe_client.rb#967
  def account=(_arg0); end

  # Returns the value of attribute api_key.
  #
  # source://stripe//lib/stripe/stripe_client.rb#968
  def api_key; end

  # Sets the attribute api_key
  #
  # @param value the value to set the attribute api_key to.
  #
  # source://stripe//lib/stripe/stripe_client.rb#968
  def api_key=(_arg0); end

  # Returns the value of attribute api_version.
  #
  # source://stripe//lib/stripe/stripe_client.rb#969
  def api_version; end

  # Sets the attribute api_version
  #
  # @param value the value to set the attribute api_version to.
  #
  # source://stripe//lib/stripe/stripe_client.rb#969
  def api_version=(_arg0); end

  # Returns the value of attribute body.
  #
  # source://stripe//lib/stripe/stripe_client.rb#966
  def body; end

  # Sets the attribute body
  #
  # @param value the value to set the attribute body to.
  #
  # source://stripe//lib/stripe/stripe_client.rb#966
  def body=(_arg0); end

  # The idea with this method is that we might want to update some of
  # context information because a response that we've received from the API
  # contains information that's more authoritative than what we started
  # with for a request. For example, we should trust whatever came back in
  # a `Stripe-Version` header beyond what configuration information that we
  # might have had available.
  #
  # source://stripe//lib/stripe/stripe_client.rb#982
  def dup_from_response_headers(headers); end

  # Returns the value of attribute idempotency_key.
  #
  # source://stripe//lib/stripe/stripe_client.rb#970
  def idempotency_key; end

  # Sets the attribute idempotency_key
  #
  # @param value the value to set the attribute idempotency_key to.
  #
  # source://stripe//lib/stripe/stripe_client.rb#970
  def idempotency_key=(_arg0); end

  # Returns the value of attribute method.
  #
  # source://stripe//lib/stripe/stripe_client.rb#971
  def method; end

  # Sets the attribute method
  #
  # @param value the value to set the attribute method to.
  #
  # source://stripe//lib/stripe/stripe_client.rb#971
  def method=(_arg0); end

  # Returns the value of attribute path.
  #
  # source://stripe//lib/stripe/stripe_client.rb#972
  def path; end

  # Sets the attribute path
  #
  # @param value the value to set the attribute path to.
  #
  # source://stripe//lib/stripe/stripe_client.rb#972
  def path=(_arg0); end

  # Returns the value of attribute query.
  #
  # source://stripe//lib/stripe/stripe_client.rb#973
  def query; end

  # Sets the attribute query
  #
  # @param value the value to set the attribute query to.
  #
  # source://stripe//lib/stripe/stripe_client.rb#973
  def query=(_arg0); end

  # Returns the value of attribute request_id.
  #
  # source://stripe//lib/stripe/stripe_client.rb#974
  def request_id; end

  # Sets the attribute request_id
  #
  # @param value the value to set the attribute request_id to.
  #
  # source://stripe//lib/stripe/stripe_client.rb#974
  def request_id=(_arg0); end
end

# StripeRequestMetrics tracks metadata to be reported to stripe for metrics
# collection
#
# source://stripe//lib/stripe/stripe_client.rb#1051
class Stripe::StripeClient::StripeRequestMetrics
  # @return [StripeRequestMetrics] a new instance of StripeRequestMetrics
  #
  # source://stripe//lib/stripe/stripe_client.rb#1058
  def initialize(request_id, request_duration_ms); end

  # source://stripe//lib/stripe/stripe_client.rb#1063
  def payload; end

  # Request duration in milliseconds
  #
  # source://stripe//lib/stripe/stripe_client.rb#1056
  def request_duration_ms; end

  # Request duration in milliseconds
  #
  # source://stripe//lib/stripe/stripe_client.rb#1056
  def request_duration_ms=(_arg0); end

  # The Stripe request ID of the response.
  #
  # source://stripe//lib/stripe/stripe_client.rb#1053
  def request_id; end

  # The Stripe request ID of the response.
  #
  # source://stripe//lib/stripe/stripe_client.rb#1053
  def request_id=(_arg0); end
end

# SystemProfiler extracts information about the system that we're running
# in so that we can generate a rich user agent header to help debug
# integrations.
#
# source://stripe//lib/stripe/stripe_client.rb#995
class Stripe::StripeClient::SystemProfiler
  # @return [SystemProfiler] a new instance of SystemProfiler
  #
  # source://stripe//lib/stripe/stripe_client.rb#1027
  def initialize; end

  # source://stripe//lib/stripe/stripe_client.rb#1031
  def user_agent; end

  class << self
    # source://stripe//lib/stripe/stripe_client.rb#996
    def uname; end

    # source://stripe//lib/stripe/stripe_client.rb#1011
    def uname_from_system; end

    # source://stripe//lib/stripe/stripe_client.rb#1019
    def uname_from_system_ver; end
  end
end

# A record representing any data that `StripeClient` puts into
# `Thread.current`. Making it a class likes this gives us a little extra
# type safety and lets us document what each field does.
#
# For internal use only. Does not provide a stable API and may be broken
# with future non-major changes.
#
# source://stripe//lib/stripe/stripe_client.rb#341
class Stripe::StripeClient::ThreadContext
  # A `StripeClient` that's been flagged as currently active within a
  # thread by `StripeClient#request`. A client stays active until the
  # completion of the request block.
  #
  # source://stripe//lib/stripe/stripe_client.rb#345
  def active_client; end

  # A `StripeClient` that's been flagged as currently active within a
  # thread by `StripeClient#request`. A client stays active until the
  # completion of the request block.
  #
  # source://stripe//lib/stripe/stripe_client.rb#345
  def active_client=(_arg0); end

  # A default `StripeClient` object for the thread. Used in all cases where
  # the user hasn't specified their own.
  #
  # source://stripe//lib/stripe/stripe_client.rb#349
  def default_client; end

  # A default `StripeClient` object for the thread. Used in all cases where
  # the user hasn't specified their own.
  #
  # source://stripe//lib/stripe/stripe_client.rb#349
  def default_client=(_arg0); end

  # A map of connection mangers for the thread. Normally shared between
  # all `StripeClient` objects on a particular thread, and created so as to
  # minimize the number of open connections that an application needs.
  #
  # source://stripe//lib/stripe/stripe_client.rb#367
  def default_connection_managers; end

  # A temporary map of object IDs to responses from last executed API
  # calls. Used to return a responses from calls to `StripeClient#request`.
  #
  # Stored in the thread data to make the use of a single `StripeClient`
  # object safe across multiple threads. Stored as a map so that multiple
  # `StripeClient` objects can run concurrently on the same thread.
  #
  # Responses are only left in as long as they're needed, which means
  # they're removed as soon as a call leaves `StripeClient#request`, and
  # because that's wrapped in an `ensure` block, they should never leave
  # garbage in `Thread.current`.
  #
  # source://stripe//lib/stripe/stripe_client.rb#362
  def last_responses; end

  # A temporary map of object IDs to responses from last executed API
  # calls. Used to return a responses from calls to `StripeClient#request`.
  #
  # Stored in the thread data to make the use of a single `StripeClient`
  # object safe across multiple threads. Stored as a map so that multiple
  # `StripeClient` objects can run concurrently on the same thread.
  #
  # Responses are only left in as long as they're needed, which means
  # they're removed as soon as a call leaves `StripeClient#request`, and
  # because that's wrapped in an `ensure` block, they should never leave
  # garbage in `Thread.current`.
  #
  # source://stripe//lib/stripe/stripe_client.rb#362
  def last_responses=(_arg0); end

  # source://stripe//lib/stripe/stripe_client.rb#371
  def reset_connection_managers; end
end

# Configurable options:
#
# =ca_bundle_path=
# The location of a file containing a bundle of CA certificates. By default
# the library will use an included bundle that can successfully validate
# Stripe certificates.
#
# =log_level=
# When set prompts the library to log some extra information to $stdout and
# $stderr about what it's doing. For example, it'll produce information about
# requests, responses, and errors that are received. Valid log levels are
# `debug` and `info`, with `debug` being a little more verbose in places.
#
# Use of this configuration is only useful when `.logger` is _not_ set. When
# it is, the decision what levels to print is entirely deferred to the logger.
#
# =logger=
# The logger should support the same interface as the `Logger` class that's
# part of Ruby's standard library (hint, anything in `Rails.logger` will
# likely be suitable).
#
# If `.logger` is set, the value of `.log_level` is ignored. The decision on
# what levels to print is entirely deferred to the logger.
#
# source://stripe//lib/stripe/stripe_configuration.rb#27
class Stripe::StripeConfiguration
  # @return [StripeConfiguration] a new instance of StripeConfiguration
  #
  # source://stripe//lib/stripe/stripe_configuration.rb#65
  def initialize; end

  # Returns the value of attribute api_base.
  #
  # source://stripe//lib/stripe/stripe_configuration.rb#35
  def api_base; end

  # source://stripe//lib/stripe/stripe_configuration.rb#151
  def api_base=(api_base); end

  # Returns the value of attribute api_key.
  #
  # source://stripe//lib/stripe/stripe_configuration.rb#28
  def api_key; end

  # Sets the attribute api_key
  #
  # @param value the value to set the attribute api_key to.
  #
  # source://stripe//lib/stripe/stripe_configuration.rb#28
  def api_key=(_arg0); end

  # Returns the value of attribute api_version.
  #
  # source://stripe//lib/stripe/stripe_configuration.rb#29
  def api_version; end

  # Sets the attribute api_version
  #
  # @param value the value to set the attribute api_version to.
  #
  # source://stripe//lib/stripe/stripe_configuration.rb#29
  def api_version=(_arg0); end

  # Returns the value of attribute ca_bundle_path.
  #
  # source://stripe//lib/stripe/stripe_configuration.rb#38
  def ca_bundle_path; end

  # source://stripe//lib/stripe/stripe_configuration.rb#156
  def ca_bundle_path=(path); end

  # A certificate store initialized from the the bundle in #ca_bundle_path and
  # which is used to validate TLS on every request.
  #
  # This was added to the give the gem "pseudo thread safety" in that it seems
  # when initiating many parallel requests marshaling the certificate store is
  # the most likely point of failure (see issue #382). Any program attempting
  # to leverage this pseudo safety should make a call to this method (i.e.
  # `Stripe.ca_store`) in their initialization code because it marshals lazily
  # and is itself not thread safe.
  #
  # source://stripe//lib/stripe/stripe_configuration.rb#174
  def ca_store; end

  # Returns the value of attribute client_id.
  #
  # source://stripe//lib/stripe/stripe_configuration.rb#30
  def client_id; end

  # Sets the attribute client_id
  #
  # @param value the value to set the attribute client_id to.
  #
  # source://stripe//lib/stripe/stripe_configuration.rb#30
  def client_id=(_arg0); end

  # Returns the value of attribute connect_base.
  #
  # source://stripe//lib/stripe/stripe_configuration.rb#37
  def connect_base; end

  # source://stripe//lib/stripe/stripe_configuration.rb#146
  def connect_base=(connect_base); end

  # Returns the value of attribute enable_telemetry.
  #
  # source://stripe//lib/stripe/stripe_configuration.rb#31
  def enable_telemetry; end

  # Sets the attribute enable_telemetry
  #
  # @param value the value to set the attribute enable_telemetry to.
  #
  # source://stripe//lib/stripe/stripe_configuration.rb#31
  def enable_telemetry=(_arg0); end

  # @return [Boolean]
  #
  # source://stripe//lib/stripe/stripe_configuration.rb#182
  def enable_telemetry?; end

  # Returns the value of attribute initial_network_retry_delay.
  #
  # source://stripe//lib/stripe/stripe_configuration.rb#40
  def initial_network_retry_delay; end

  # source://stripe//lib/stripe/stripe_configuration.rb#108
  def initial_network_retry_delay=(val); end

  # Generates a deterministic key to identify configuration objects with
  # identical configuration values.
  #
  # source://stripe//lib/stripe/stripe_configuration.rb#188
  def key; end

  # Returns the value of attribute log_level.
  #
  # source://stripe//lib/stripe/stripe_configuration.rb#39
  def log_level; end

  # source://stripe//lib/stripe/stripe_configuration.rb#83
  def log_level=(val); end

  # Returns the value of attribute logger.
  #
  # source://stripe//lib/stripe/stripe_configuration.rb#32
  def logger; end

  # Sets the attribute logger
  #
  # @param value the value to set the attribute logger to.
  #
  # source://stripe//lib/stripe/stripe_configuration.rb#32
  def logger=(_arg0); end

  # Returns the value of attribute max_network_retries.
  #
  # source://stripe//lib/stripe/stripe_configuration.rb#41
  def max_network_retries; end

  # source://stripe//lib/stripe/stripe_configuration.rb#100
  def max_network_retries=(val); end

  # Returns the value of attribute max_network_retry_delay.
  #
  # source://stripe//lib/stripe/stripe_configuration.rb#42
  def max_network_retry_delay; end

  # source://stripe//lib/stripe/stripe_configuration.rb#104
  def max_network_retry_delay=(val); end

  # Returns the value of attribute open_timeout.
  #
  # source://stripe//lib/stripe/stripe_configuration.rb#43
  def open_timeout; end

  # source://stripe//lib/stripe/stripe_configuration.rb#112
  def open_timeout=(open_timeout); end

  # Returns the value of attribute proxy.
  #
  # source://stripe//lib/stripe/stripe_configuration.rb#46
  def proxy; end

  # source://stripe//lib/stripe/stripe_configuration.rb#131
  def proxy=(proxy); end

  # Returns the value of attribute read_timeout.
  #
  # source://stripe//lib/stripe/stripe_configuration.rb#44
  def read_timeout; end

  # source://stripe//lib/stripe/stripe_configuration.rb#117
  def read_timeout=(read_timeout); end

  # Create a new config based off an existing one. This is useful when the
  # caller wants to override the global configuration
  #
  # source://stripe//lib/stripe/stripe_configuration.rb#57
  def reverse_duplicate_merge(hash); end

  # Returns the value of attribute stripe_account.
  #
  # source://stripe//lib/stripe/stripe_configuration.rb#33
  def stripe_account; end

  # Sets the attribute stripe_account
  #
  # @param value the value to set the attribute stripe_account to.
  #
  # source://stripe//lib/stripe/stripe_configuration.rb#33
  def stripe_account=(_arg0); end

  # Returns the value of attribute uploads_base.
  #
  # source://stripe//lib/stripe/stripe_configuration.rb#36
  def uploads_base; end

  # source://stripe//lib/stripe/stripe_configuration.rb#141
  def uploads_base=(uploads_base); end

  # Returns the value of attribute verify_ssl_certs.
  #
  # source://stripe//lib/stripe/stripe_configuration.rb#47
  def verify_ssl_certs; end

  # source://stripe//lib/stripe/stripe_configuration.rb#136
  def verify_ssl_certs=(verify_ssl_certs); end

  # Returns the value of attribute write_timeout.
  #
  # source://stripe//lib/stripe/stripe_configuration.rb#45
  def write_timeout; end

  # source://stripe//lib/stripe/stripe_configuration.rb#122
  def write_timeout=(write_timeout); end

  class << self
    # source://stripe//lib/stripe/stripe_configuration.rb#49
    def setup; end
  end
end

# StripeError is the base error from which all other more specific Stripe
# errors derive.
#
# source://stripe//lib/stripe/errors.rb#6
class Stripe::StripeError < ::StandardError
  # Initializes a StripeError.
  #
  # @return [StripeError] a new instance of StripeError
  #
  # source://stripe//lib/stripe/errors.rb#22
  def initialize(message = T.unsafe(nil), http_status: T.unsafe(nil), http_body: T.unsafe(nil), json_body: T.unsafe(nil), http_headers: T.unsafe(nil), code: T.unsafe(nil)); end

  # Returns the value of attribute code.
  #
  # source://stripe//lib/stripe/errors.rb#13
  def code; end

  # source://stripe//lib/stripe/errors.rb#35
  def construct_error_object; end

  # Returns the value of attribute error.
  #
  # source://stripe//lib/stripe/errors.rb#14
  def error; end

  # Returns the value of attribute http_body.
  #
  # source://stripe//lib/stripe/errors.rb#15
  def http_body; end

  # Returns the value of attribute http_headers.
  #
  # source://stripe//lib/stripe/errors.rb#16
  def http_headers; end

  # Returns the value of attribute http_status.
  #
  # source://stripe//lib/stripe/errors.rb#17
  def http_status; end

  # Whether the error was the result of an idempotent replay, meaning that it
  # originally occurred on a previous request and is being replayed back
  # because the user sent the same idempotency key for this one.
  #
  # @return [Boolean]
  #
  # source://stripe//lib/stripe/errors.rb#44
  def idempotent_replayed?; end

  # equivalent to #data
  #
  # source://stripe//lib/stripe/errors.rb#18
  def json_body; end

  # Returns the value of attribute message.
  #
  # source://stripe//lib/stripe/errors.rb#7
  def message; end

  # Returns the value of attribute request_id.
  #
  # source://stripe//lib/stripe/errors.rb#19
  def request_id; end

  # Response contains a StripeResponse object that has some basic information
  # about the response that conveyed the error.
  #
  # source://stripe//lib/stripe/errors.rb#11
  def response; end

  # Response contains a StripeResponse object that has some basic information
  # about the response that conveyed the error.
  #
  # source://stripe//lib/stripe/errors.rb#11
  def response=(_arg0); end

  # source://stripe//lib/stripe/errors.rb#48
  def to_s; end
end

# StripeHeadersOnlyResponse includes only header-related vitals of the
# response. This is used for streaming requests where the response was read
# directly in a block and we explicitly don't want to store the body of the
# response in memory.
#
# source://stripe//lib/stripe/stripe_response.rb#99
class Stripe::StripeHeadersOnlyResponse
  include ::Stripe::StripeResponseBase

  class << self
    # Initializes a StripeHeadersOnlyResponse object from a
    # Net::HTTP::HTTPResponse object.
    #
    # source://stripe//lib/stripe/stripe_response.rb#104
    def from_net_http(http_resp); end
  end
end

# source://stripe//lib/stripe/stripe_object.rb#4
class Stripe::StripeObject
  include ::Enumerable

  # @return [StripeObject] a new instance of StripeObject
  #
  # source://stripe//lib/stripe/stripe_object.rb#73
  def initialize(id = T.unsafe(nil), opts = T.unsafe(nil)); end

  # Determines the equality of two Stripe objects. Stripe objects are
  # considered to be equal if they have the same set of values and each one
  # of those values is the same.
  #
  # source://stripe//lib/stripe/stripe_object.rb#95
  def ==(other); end

  # source://stripe//lib/stripe/stripe_object.rb#157
  def [](key); end

  # source://stripe//lib/stripe/stripe_object.rb#161
  def []=(key, value); end

  # source://stripe//lib/stripe/stripe_object.rb#178
  def as_json(*opts); end

  # Indicates whether or not the resource has been deleted on the server.
  # Note that some, but not all, resources can indicate whether they have
  # been deleted.
  #
  # @return [Boolean]
  #
  # source://stripe//lib/stripe/stripe_object.rb#116
  def deleted?; end

  # Sets all keys within the StripeObject as unsaved so that they will be
  # included with an update when #serialize_params is called. This method is
  # also recursive, so any StripeObjects contained as values or which are
  # values in a tenant array are also marked as dirty.
  #
  # source://stripe//lib/stripe/stripe_object.rb#207
  def dirty!; end

  # source://stripe//lib/stripe/stripe_object.rb#199
  def each(&blk); end

  # Hash equality. As with `#==`, we consider two equivalent Stripe objects
  # equal.
  #
  # @return [Boolean]
  #
  # source://stripe//lib/stripe/stripe_object.rb#102
  def eql?(other); end

  # As with equality in `#==` and `#eql?`, we hash two Stripe objects to the
  # same value if they're equivalent objects.
  #
  # source://stripe//lib/stripe/stripe_object.rb#109
  def hash; end

  # source://stripe//lib/stripe/stripe_object.rb#124
  def inspect; end

  # source://stripe//lib/stripe/stripe_object.rb#165
  def keys; end

  # Implements custom encoding for Ruby's Marshal. The data produced by this
  # method should be comprehendable by #marshal_load.
  #
  # This allows us to remove certain features that cannot or should not be
  # serialized.
  #
  # source://stripe//lib/stripe/stripe_object.rb#219
  def marshal_dump; end

  # Implements custom decoding for Ruby's Marshal. Consumes data that's
  # produced by #marshal_dump.
  #
  # source://stripe//lib/stripe/stripe_object.rb#230
  def marshal_load(data); end

  # source://stripe//lib/stripe/stripe_object.rb#236
  def serialize_params(options = T.unsafe(nil)); end

  # source://stripe//lib/stripe/stripe_object.rb#182
  def to_hash; end

  # source://stripe//lib/stripe/stripe_object.rb#173
  def to_json(*_opts); end

  # source://stripe//lib/stripe/stripe_object.rb#120
  def to_s(*_args); end

  # Mass assigns attributes on the model.
  #
  # This is a version of +update_attributes+ that takes some extra options
  # for internal use.
  #
  # ==== Attributes
  #
  # * +values+ - Hash of values to use to update the current attributes of
  #   the object. If you are on ruby 2.7 or higher make sure to wrap in curly
  #   braces to be ruby 3 compatible.
  # * +opts+ - Options for +StripeObject+ like an API key that will be reused
  #   on subsequent API calls.
  #
  # ==== Options
  #
  # * +:dirty+ - Whether values should be initiated as "dirty" (unsaved) and
  #   which applies only to new StripeObjects being initiated under this
  #   StripeObject. Defaults to true.
  #
  # source://stripe//lib/stripe/stripe_object.rb#148
  def update_attributes(values, opts = T.unsafe(nil), dirty: T.unsafe(nil)); end

  # source://stripe//lib/stripe/stripe_object.rb#169
  def values; end

  protected

  # source://stripe//lib/stripe/stripe_object.rb#331
  def add_accessors(keys, values); end

  # Re-initializes the object based on a hash of values (usually one that's
  # come back from an API call). Adds or removes value accessors as necessary
  # and updates the state of internal data.
  #
  # Protected on purpose! Please do not expose.
  #
  # ==== Options
  #
  # * +:values:+ Hash used to update accessors and values.
  # * +:opts:+ Options for StripeObject like an API key.
  # * +:partial:+ Indicates that the re-initialization should not attempt to
  #   remove accessors.
  #
  # source://stripe//lib/stripe/stripe_object.rb#432
  def initialize_from(values, opts); end

  # source://stripe//lib/stripe/stripe_object.rb#291
  def metaclass; end

  # Disabling the cop because it's confused by the fact that the methods are
  # protected, but we do define `#respond_to_missing?` just below. Hopefully
  # this is fixed in more recent Rubocop versions.
  #
  # source://stripe//lib/stripe/stripe_object.rb#373
  def method_missing(name, *args); end

  # source://stripe//lib/stripe/stripe_object.rb#295
  def remove_accessors(keys); end

  # @return [Boolean]
  #
  # source://stripe//lib/stripe/stripe_object.rb#416
  def respond_to_missing?(symbol, include_private = T.unsafe(nil)); end

  # source://stripe//lib/stripe/stripe_object.rb#463
  def serialize_params_value(value, original, unsaved, force, key: T.unsafe(nil)); end

  private

  # source://stripe//lib/stripe/stripe_object.rb#562
  def dirty_value!(value); end

  # Returns a hash of empty values for all the values that are in the given
  # StripeObject.
  #
  # source://stripe//lib/stripe/stripe_object.rb#573
  def empty_values(obj); end

  class << self
    # Sets the given parameter name to one which is known to be an additive
    # object.
    #
    # Additive objects are subobjects in the API that don't have the same
    # semantics as most subobjects, which are fully replaced when they're set.
    # This is best illustrated by example. The `source` parameter sent when
    # updating a subscription is *not* additive; if we set it:
    #
    #     source[object]=card&source[number]=123
    #
    # We expect the old `source` object to have been overwritten completely. If
    # the previous source had an `address_state` key associated with it and we
    # didn't send one this time, that value of `address_state` is gone.
    #
    # By contrast, additive objects are those that will have new data added to
    # them while keeping any existing data in place. The only known case of its
    # use is for `metadata`, but it could in theory be more general. As an
    # example, say we have a `metadata` object that looks like this on the
    # server side:
    #
    #     metadata = { old: "old_value" }
    #
    # If we update the object with `metadata[new]=new_value`, the server side
    # object now has *both* fields:
    #
    #     metadata = { old: "old_value", new: "new_value" }
    #
    # This is okay in itself because usually users will want to treat it as
    # additive:
    #
    #     obj.metadata[:new] = "new_value"
    #     obj.save
    #
    # However, in other cases, they may want to replace the entire existing
    # contents:
    #
    #     obj.metadata = { new: "new_value" }
    #     obj.save
    #
    # This is where things get a little bit tricky because in order to clear
    # any old keys that may have existed, we actually have to send an explicit
    # empty string to the server. So the operation above would have to send
    # this form to get the intended behavior:
    #
    #     metadata[old]=&metadata[new]=new_value
    #
    # This method allows us to track which parameters are considered additive,
    # and lets us behave correctly where appropriate when serializing
    # parameters to be sent.
    #
    # source://stripe//lib/stripe/stripe_object.rb#61
    def additive_object_param(name); end

    # Returns whether the given name is an additive object parameter. See
    # `.additive_object_param` for details.
    #
    # @return [Boolean]
    #
    # source://stripe//lib/stripe/stripe_object.rb#68
    def additive_object_param?(name); end

    # source://stripe//lib/stripe/stripe_object.rb#85
    def construct_from(values, opts = T.unsafe(nil)); end

    # A protected field is one that doesn't get an accessor assigned to it
    # (i.e. `obj.public = ...`) and one which is not allowed to be updated via
    # the class level `Model.update(id, { ... })`.
    #
    # source://stripe//lib/stripe/stripe_object.rb#266
    def protected_fields; end

    private

    # Produces a deep copy of the given object including support for arrays,
    # hashes, and StripeObjects.
    #
    # source://stripe//lib/stripe/stripe_object.rb#541
    def deep_copy(obj); end
  end
end

# When designing APIs, we now make a conscious effort server-side to avoid
# naming fields after important built-ins in various languages (e.g. class,
# method, etc.).
#
# However, a long time ago we made the mistake (either consciously or by
# accident) of initializing our `metadata` fields as instances of
# `StripeObject`, and metadata can have a wide range of different keys
# defined in it. This is somewhat a convenient in that it allows users to
# access data like `obj.metadata.my_field`, but is almost certainly not
# worth the cost.
#
# Naming metadata fields bad things like `class` causes `initialize_from`
# to produce strange results, so we ban known offenders here.
#
# In a future major version we should consider leaving `metadata` as a hash
# and forcing people to access it with `obj.metadata[:my_field]` because
# the potential for trouble is just too high. For now, reserve names.
#
# source://stripe//lib/stripe/stripe_object.rb#287
Stripe::StripeObject::RESERVED_FIELD_NAMES = T.let(T.unsafe(nil), Array)

# StripeResponse encapsulates some vitals of a response that came back from
# the Stripe API.
#
# source://stripe//lib/stripe/stripe_response.rb#70
class Stripe::StripeResponse
  include ::Stripe::StripeResponseBase

  # The data contained by the HTTP body of the response deserialized from
  # JSON.
  #
  # source://stripe//lib/stripe/stripe_response.rb#74
  def data; end

  # The data contained by the HTTP body of the response deserialized from
  # JSON.
  #
  # source://stripe//lib/stripe/stripe_response.rb#74
  def data=(_arg0); end

  # The raw HTTP body of the response.
  #
  # source://stripe//lib/stripe/stripe_response.rb#77
  def http_body; end

  # The raw HTTP body of the response.
  #
  # source://stripe//lib/stripe/stripe_response.rb#77
  def http_body=(_arg0); end

  class << self
    # Initializes a StripeResponse object from a Net::HTTP::HTTPResponse
    # object.
    #
    # source://stripe//lib/stripe/stripe_response.rb#81
    def from_net_http(http_resp); end
  end
end

# We have to alias StripeResponseHeaders to StripeResponse::Headers, as this
# class used to be embedded within StripeResponse and we want to be backwards
# compatible.
#
# source://stripe//lib/stripe/stripe_response.rb#93
Stripe::StripeResponse::Headers = Stripe::StripeResponseHeaders

# source://stripe//lib/stripe/stripe_response.rb#51
module Stripe::StripeResponseBase
  # A Hash of the HTTP headers of the response.
  #
  # source://stripe//lib/stripe/stripe_response.rb#53
  def http_headers; end

  # A Hash of the HTTP headers of the response.
  #
  # source://stripe//lib/stripe/stripe_response.rb#53
  def http_headers=(_arg0); end

  # The integer HTTP status code of the response.
  #
  # source://stripe//lib/stripe/stripe_response.rb#56
  def http_status; end

  # The integer HTTP status code of the response.
  #
  # source://stripe//lib/stripe/stripe_response.rb#56
  def http_status=(_arg0); end

  # The Stripe request ID of the response.
  #
  # source://stripe//lib/stripe/stripe_response.rb#59
  def request_id; end

  # The Stripe request ID of the response.
  #
  # source://stripe//lib/stripe/stripe_response.rb#59
  def request_id=(_arg0); end

  class << self
    # source://stripe//lib/stripe/stripe_response.rb#61
    def populate_for_net_http(resp, http_resp); end
  end
end

# Headers provides an access wrapper to an API response's header data. It
# mainly exists so that we don't need to expose the entire
# `Net::HTTPResponse` object while still getting some of its benefits like
# case-insensitive access to header names and flattening of header values.
#
# source://stripe//lib/stripe/stripe_response.rb#8
class Stripe::StripeResponseHeaders
  # `hash` is expected to be a hash mapping header names to arrays of
  # header values. This is the default format generated by calling
  # `#to_hash` on a `Net::HTTPResponse` object because headers can be
  # repeated multiple times. Using `#[]` will collapse values down to just
  # the first.
  #
  # @return [StripeResponseHeaders] a new instance of StripeResponseHeaders
  #
  # source://stripe//lib/stripe/stripe_response.rb#19
  def initialize(hash); end

  # source://stripe//lib/stripe/stripe_response.rb#42
  def [](name); end

  class << self
    # Initializes a Headers object from a Net::HTTP::HTTPResponse object.
    #
    # source://stripe//lib/stripe/stripe_response.rb#10
    def from_net_http(resp); end
  end
end

# Subscriptions allow you to charge a customer on a recurring basis.
#
# Related guide: [Creating Subscriptions](https://stripe.com/docs/billing/subscriptions/creating).
#
# source://stripe//lib/stripe/resources/subscription.rb#8
class Stripe::Subscription < ::Stripe::APIResource
  include ::Stripe::APIOperations::Save
  extend ::Stripe::APIOperations::Create
  extend ::Stripe::APIOperations::List
  extend ::Stripe::APIOperations::Search
  extend ::Stripe::APIOperations::Save::ClassMethods

  # source://stripe//lib/stripe/resources/subscription.rb#16
  def cancel(params = T.unsafe(nil), opts = T.unsafe(nil)); end

  # source://stripe//lib/stripe/resources/subscription.rb#25
  def delete_discount(params = T.unsafe(nil), opts = T.unsafe(nil)); end

  # source://stripe//lib/stripe/resources/subscription.rb#34
  def resume(params = T.unsafe(nil), opts = T.unsafe(nil)); end

  # source://stripe//lib/stripe/api_resource.rb#36
  def source=(value); end

  class << self
    # source://stripe//lib/stripe/resources/subscription.rb#43
    def cancel(subscription_exposed_id, params = T.unsafe(nil), opts = T.unsafe(nil)); end

    # source://stripe//lib/stripe/resources/subscription.rb#52
    def delete_discount(subscription_exposed_id, params = T.unsafe(nil), opts = T.unsafe(nil)); end

    # source://stripe//lib/stripe/resources/subscription.rb#61
    def resume(subscription, params = T.unsafe(nil), opts = T.unsafe(nil)); end

    # source://stripe//lib/stripe/resources/subscription.rb#72
    def search(params = T.unsafe(nil), opts = T.unsafe(nil)); end

    # source://stripe//lib/stripe/resources/subscription.rb#76
    def search_auto_paging_each(params = T.unsafe(nil), opts = T.unsafe(nil), &blk); end
  end
end

# source://stripe//lib/stripe/resources/subscription.rb#14
Stripe::Subscription::OBJECT_NAME = T.let(T.unsafe(nil), String)

# Subscription items allow you to create customer subscriptions with more than
# one plan, making it easy to represent complex billing relationships.
#
# source://stripe//lib/stripe/resources/subscription_item.rb#7
class Stripe::SubscriptionItem < ::Stripe::APIResource
  include ::Stripe::APIOperations::Delete
  include ::Stripe::APIOperations::Save
  extend ::Stripe::APIOperations::Create
  extend ::Stripe::APIOperations::Delete::ClassMethods
  extend ::Stripe::APIOperations::List
  extend ::Stripe::APIOperations::Save::ClassMethods
  extend ::Stripe::APIOperations::NestedResource

  class << self
    # source://stripe//lib/stripe/api_operations/nested_resource.rb#47
    def create_usage_record(id, params = T.unsafe(nil), opts = T.unsafe(nil)); end

    # source://stripe//lib/stripe/api_operations/nested_resource.rb#87
    def list_usage_record_summaries(id, params = T.unsafe(nil), opts = T.unsafe(nil)); end

    # source://stripe//lib/stripe/api_operations/nested_resource.rb#22
    def usage_record_summarys_url(id, nested_id = T.unsafe(nil)); end

    # source://stripe//lib/stripe/api_operations/nested_resource.rb#22
    def usage_records_url(id, nested_id = T.unsafe(nil)); end
  end
end

# source://stripe//lib/stripe/resources/subscription_item.rb#14
Stripe::SubscriptionItem::OBJECT_NAME = T.let(T.unsafe(nil), String)

# A subscription schedule allows you to create and manage the lifecycle of a subscription by predefining expected changes.
#
# Related guide: [Subscription Schedules](https://stripe.com/docs/billing/subscriptions/subscription-schedules).
#
# source://stripe//lib/stripe/resources/subscription_schedule.rb#8
class Stripe::SubscriptionSchedule < ::Stripe::APIResource
  include ::Stripe::APIOperations::Save
  extend ::Stripe::APIOperations::Create
  extend ::Stripe::APIOperations::List
  extend ::Stripe::APIOperations::Save::ClassMethods

  # source://stripe//lib/stripe/resources/subscription_schedule.rb#15
  def cancel(params = T.unsafe(nil), opts = T.unsafe(nil)); end

  # source://stripe//lib/stripe/resources/subscription_schedule.rb#24
  def release(params = T.unsafe(nil), opts = T.unsafe(nil)); end

  class << self
    # source://stripe//lib/stripe/resources/subscription_schedule.rb#33
    def cancel(schedule, params = T.unsafe(nil), opts = T.unsafe(nil)); end

    # source://stripe//lib/stripe/resources/subscription_schedule.rb#42
    def release(schedule, params = T.unsafe(nil), opts = T.unsafe(nil)); end
  end
end

# source://stripe//lib/stripe/resources/subscription_schedule.rb#13
Stripe::SubscriptionSchedule::OBJECT_NAME = T.let(T.unsafe(nil), String)

# source://stripe//lib/stripe/resources/tax/calculation.rb#5
module Stripe::Tax; end

# A Tax `Calculation` allows you to calculate the tax to collect from your customer.
#
# source://stripe//lib/stripe/resources/tax/calculation.rb#7
class Stripe::Tax::Calculation < ::Stripe::APIResource
  extend ::Stripe::APIOperations::Create

  # source://stripe//lib/stripe/resources/tax/calculation.rb#12
  def list_line_items(params = T.unsafe(nil), opts = T.unsafe(nil)); end

  class << self
    # source://stripe//lib/stripe/resources/tax/calculation.rb#21
    def list_line_items(calculation, params = T.unsafe(nil), opts = T.unsafe(nil)); end
  end
end

# source://stripe//lib/stripe/resources/tax/calculation.rb#10
Stripe::Tax::Calculation::OBJECT_NAME = T.let(T.unsafe(nil), String)

# A Tax transaction records the tax collected from or refunded to your customer.
#
# source://stripe//lib/stripe/resources/tax/transaction.rb#7
class Stripe::Tax::Transaction < ::Stripe::APIResource
  # source://stripe//lib/stripe/resources/tax/transaction.rb#10
  def list_line_items(params = T.unsafe(nil), opts = T.unsafe(nil)); end

  class << self
    # source://stripe//lib/stripe/resources/tax/transaction.rb#19
    def create_from_calculation(params = T.unsafe(nil), opts = T.unsafe(nil)); end

    # source://stripe//lib/stripe/resources/tax/transaction.rb#28
    def create_reversal(params = T.unsafe(nil), opts = T.unsafe(nil)); end

    # source://stripe//lib/stripe/resources/tax/transaction.rb#37
    def list_line_items(transaction, params = T.unsafe(nil), opts = T.unsafe(nil)); end
  end
end

# source://stripe//lib/stripe/resources/tax/transaction.rb#8
Stripe::Tax::Transaction::OBJECT_NAME = T.let(T.unsafe(nil), String)

# [Tax codes](https://stripe.com/docs/tax/tax-categories) classify goods and services for tax purposes.
#
# source://stripe//lib/stripe/resources/tax_code.rb#6
class Stripe::TaxCode < ::Stripe::APIResource
  extend ::Stripe::APIOperations::List
end

# source://stripe//lib/stripe/resources/tax_code.rb#9
Stripe::TaxCode::OBJECT_NAME = T.let(T.unsafe(nil), String)

# You can add one or multiple tax IDs to a [customer](https://stripe.com/docs/api/customers).
# A customer's tax IDs are displayed on invoices and credit notes issued for the customer.
#
# Related guide: [Customer Tax Identification Numbers](https://stripe.com/docs/billing/taxes/tax-ids).
#
# source://stripe//lib/stripe/resources/tax_id.rb#9
class Stripe::TaxId < ::Stripe::APIResource
  include ::Stripe::APIOperations::Delete
  extend ::Stripe::APIOperations::Delete::ClassMethods
  extend ::Stripe::APIOperations::List

  # source://stripe//lib/stripe/resources/tax_id.rb#15
  def resource_url; end

  class << self
    # @raise [NotImplementedError]
    #
    # source://stripe//lib/stripe/resources/tax_id.rb#24
    def retrieve(_id, _opts = T.unsafe(nil)); end
  end
end

# source://stripe//lib/stripe/resources/tax_id.rb#13
Stripe::TaxId::OBJECT_NAME = T.let(T.unsafe(nil), String)

# Tax rates can be applied to [invoices](https://stripe.com/docs/billing/invoices/tax-rates), [subscriptions](https://stripe.com/docs/billing/subscriptions/taxes) and [Checkout Sessions](https://stripe.com/docs/payments/checkout/set-up-a-subscription#tax-rates) to collect tax.
#
# Related guide: [Tax Rates](https://stripe.com/docs/billing/taxes/tax-rates).
#
# source://stripe//lib/stripe/resources/tax_rate.rb#8
class Stripe::TaxRate < ::Stripe::APIResource
  include ::Stripe::APIOperations::Save
  extend ::Stripe::APIOperations::Create
  extend ::Stripe::APIOperations::List
  extend ::Stripe::APIOperations::Save::ClassMethods
end

# source://stripe//lib/stripe/resources/tax_rate.rb#13
Stripe::TaxRate::OBJECT_NAME = T.let(T.unsafe(nil), String)

# source://stripe//lib/stripe/resources/terminal/configuration.rb#5
module Stripe::Terminal; end

# A Configurations object represents how features should be configured for terminal readers.
#
# source://stripe//lib/stripe/resources/terminal/configuration.rb#7
class Stripe::Terminal::Configuration < ::Stripe::APIResource
  include ::Stripe::APIOperations::Delete
  include ::Stripe::APIOperations::Save
  extend ::Stripe::APIOperations::Create
  extend ::Stripe::APIOperations::Delete::ClassMethods
  extend ::Stripe::APIOperations::List
  extend ::Stripe::APIOperations::Save::ClassMethods
end

# source://stripe//lib/stripe/resources/terminal/configuration.rb#13
Stripe::Terminal::Configuration::OBJECT_NAME = T.let(T.unsafe(nil), String)

# A Connection Token is used by the Stripe Terminal SDK to connect to a reader.
#
# Related guide: [Fleet Management](https://stripe.com/docs/terminal/fleet/locations).
#
# source://stripe//lib/stripe/resources/terminal/connection_token.rb#9
class Stripe::Terminal::ConnectionToken < ::Stripe::APIResource
  extend ::Stripe::APIOperations::Create
end

# source://stripe//lib/stripe/resources/terminal/connection_token.rb#12
Stripe::Terminal::ConnectionToken::OBJECT_NAME = T.let(T.unsafe(nil), String)

# A Location represents a grouping of readers.
#
# Related guide: [Fleet Management](https://stripe.com/docs/terminal/fleet/locations).
#
# source://stripe//lib/stripe/resources/terminal/location.rb#9
class Stripe::Terminal::Location < ::Stripe::APIResource
  include ::Stripe::APIOperations::Delete
  include ::Stripe::APIOperations::Save
  extend ::Stripe::APIOperations::Create
  extend ::Stripe::APIOperations::Delete::ClassMethods
  extend ::Stripe::APIOperations::List
  extend ::Stripe::APIOperations::Save::ClassMethods
end

# source://stripe//lib/stripe/resources/terminal/location.rb#15
Stripe::Terminal::Location::OBJECT_NAME = T.let(T.unsafe(nil), String)

# A Reader represents a physical device for accepting payment details.
#
# Related guide: [Connecting to a Reader](https://stripe.com/docs/terminal/payments/connect-reader).
#
# source://stripe//lib/stripe/resources/terminal/reader.rb#9
class Stripe::Terminal::Reader < ::Stripe::APIResource
  include ::Stripe::APIOperations::Delete
  include ::Stripe::APIOperations::Save
  extend ::Stripe::APIOperations::Create
  extend ::Stripe::APIOperations::Delete::ClassMethods
  extend ::Stripe::APIOperations::List
  extend ::Stripe::APIOperations::Save::ClassMethods

  # source://stripe//lib/stripe/resources/terminal/reader.rb#17
  def cancel_action(params = T.unsafe(nil), opts = T.unsafe(nil)); end

  # source://stripe//lib/stripe/resources/terminal/reader.rb#26
  def process_payment_intent(params = T.unsafe(nil), opts = T.unsafe(nil)); end

  # source://stripe//lib/stripe/resources/terminal/reader.rb#35
  def process_setup_intent(params = T.unsafe(nil), opts = T.unsafe(nil)); end

  # source://stripe//lib/stripe/resources/terminal/reader.rb#44
  def refund_payment(params = T.unsafe(nil), opts = T.unsafe(nil)); end

  # source://stripe//lib/stripe/resources/terminal/reader.rb#53
  def set_reader_display(params = T.unsafe(nil), opts = T.unsafe(nil)); end

  # source://stripe//lib/stripe/resources/terminal/reader.rb#107
  def test_helpers; end

  class << self
    # source://stripe//lib/stripe/resources/terminal/reader.rb#62
    def cancel_action(reader, params = T.unsafe(nil), opts = T.unsafe(nil)); end

    # source://stripe//lib/stripe/resources/terminal/reader.rb#71
    def process_payment_intent(reader, params = T.unsafe(nil), opts = T.unsafe(nil)); end

    # source://stripe//lib/stripe/resources/terminal/reader.rb#80
    def process_setup_intent(reader, params = T.unsafe(nil), opts = T.unsafe(nil)); end

    # source://stripe//lib/stripe/resources/terminal/reader.rb#89
    def refund_payment(reader, params = T.unsafe(nil), opts = T.unsafe(nil)); end

    # source://stripe//lib/stripe/resources/terminal/reader.rb#98
    def set_reader_display(reader, params = T.unsafe(nil), opts = T.unsafe(nil)); end
  end
end

# source://stripe//lib/stripe/resources/terminal/reader.rb#15
Stripe::Terminal::Reader::OBJECT_NAME = T.let(T.unsafe(nil), String)

# source://stripe//lib/stripe/resources/terminal/reader.rb#111
class Stripe::Terminal::Reader::TestHelpers < ::Stripe::APIResourceTestHelpers
  # source://stripe//lib/stripe/resources/terminal/reader.rb#123
  def present_payment_method(params = T.unsafe(nil), opts = T.unsafe(nil)); end

  class << self
    # source://stripe//lib/stripe/resources/terminal/reader.rb#114
    def present_payment_method(reader, params = T.unsafe(nil), opts = T.unsafe(nil)); end
  end
end

# source://stripe//lib/stripe/resources/terminal/reader.rb#112
Stripe::Terminal::Reader::TestHelpers::RESOURCE_CLASS = Stripe::Terminal::Reader

# source://stripe//lib/stripe/resources/test_helpers/test_clock.rb#5
module Stripe::TestHelpers; end

# A test clock enables deterministic control over objects in testmode. With a test clock, you can create
# objects at a frozen time in the past or future, and advance to a specific future time to observe webhooks and state changes. After the clock advances,
# you can either validate the current state of your scenario (and test your assumptions), change the current state of your scenario (and test more complex scenarios), or keep advancing forward in time.
#
# source://stripe//lib/stripe/resources/test_helpers/test_clock.rb#9
class Stripe::TestHelpers::TestClock < ::Stripe::APIResource
  include ::Stripe::APIOperations::Delete
  extend ::Stripe::APIOperations::Create
  extend ::Stripe::APIOperations::Delete::ClassMethods
  extend ::Stripe::APIOperations::List

  # source://stripe//lib/stripe/resources/test_helpers/test_clock.rb#16
  def advance(params = T.unsafe(nil), opts = T.unsafe(nil)); end

  class << self
    # source://stripe//lib/stripe/resources/test_helpers/test_clock.rb#25
    def advance(test_clock, params = T.unsafe(nil), opts = T.unsafe(nil)); end
  end
end

# source://stripe//lib/stripe/resources/test_helpers/test_clock.rb#14
Stripe::TestHelpers::TestClock::OBJECT_NAME = T.let(T.unsafe(nil), String)

# Tokenization is the process Stripe uses to collect sensitive card or bank
# account details, or personally identifiable information (PII), directly from
# your customers in a secure manner. A token representing this information is
# returned to your server to use. You should use our
# [recommended payments integrations](https://stripe.com/docs/payments) to perform this process
# client-side. This ensures that no sensitive card data touches your server,
# and allows your integration to operate in a PCI-compliant way.
#
# If you cannot use client-side tokenization, you can also create tokens using
# the API with either your publishable or secret API key. Keep in mind that if
# your integration uses this method, you are responsible for any PCI compliance
# that may be required, and you must keep your secret API key safe. Unlike with
# client-side tokenization, your customer's information is not sent directly to
# Stripe, so we cannot determine how it is handled or stored.
#
# Tokens cannot be stored or used more than once. To store card or bank account
# information for later use, you can create [Customer](https://stripe.com/docs/api#customers)
# objects or [Custom accounts](https://stripe.com/docs/api#external_accounts). Note that
# [Radar](https://stripe.com/docs/radar), our integrated solution for automatic fraud protection,
# performs best with integrations that use client-side tokenization.
#
# Related guide: [Accept a payment](https://stripe.com/docs/payments/accept-a-payment-charges#web-create-token)
#
# source://stripe//lib/stripe/resources/token.rb#27
class Stripe::Token < ::Stripe::APIResource
  extend ::Stripe::APIOperations::Create
end

# source://stripe//lib/stripe/resources/token.rb#30
Stripe::Token::OBJECT_NAME = T.let(T.unsafe(nil), String)

# To top up your Stripe balance, you create a top-up object. You can retrieve
# individual top-ups, as well as list all top-ups. Top-ups are identified by a
# unique, random ID.
#
# Related guide: [Topping Up your Platform Account](https://stripe.com/docs/connect/top-ups).
#
# source://stripe//lib/stripe/resources/topup.rb#10
class Stripe::Topup < ::Stripe::APIResource
  include ::Stripe::APIOperations::Save
  extend ::Stripe::APIOperations::Create
  extend ::Stripe::APIOperations::List
  extend ::Stripe::APIOperations::Save::ClassMethods

  # source://stripe//lib/stripe/resources/topup.rb#17
  def cancel(params = T.unsafe(nil), opts = T.unsafe(nil)); end

  class << self
    # source://stripe//lib/stripe/resources/topup.rb#26
    def cancel(topup, params = T.unsafe(nil), opts = T.unsafe(nil)); end
  end
end

# source://stripe//lib/stripe/resources/topup.rb#15
Stripe::Topup::OBJECT_NAME = T.let(T.unsafe(nil), String)

# A `Transfer` object is created when you move funds between Stripe accounts as
# part of Connect.
#
# Before April 6, 2017, transfers also represented movement of funds from a
# Stripe account to a card or bank account. This behavior has since been split
# out into a [Payout](https://stripe.com/docs/api#payout_object) object, with corresponding payout endpoints. For more
# information, read about the
# [transfer/payout split](https://stripe.com/docs/transfer-payout-split).
#
# Related guide: [Creating Separate Charges and Transfers](https://stripe.com/docs/connect/charges-transfers).
#
# source://stripe//lib/stripe/resources/transfer.rb#15
class Stripe::Transfer < ::Stripe::APIResource
  include ::Stripe::APIOperations::Save
  extend ::Stripe::APIOperations::Create
  extend ::Stripe::APIOperations::List
  extend ::Stripe::APIOperations::Save::ClassMethods
  extend ::Stripe::APIOperations::NestedResource

  class << self
    # source://stripe//lib/stripe/api_operations/nested_resource.rb#47
    def create_reversal(id, params = T.unsafe(nil), opts = T.unsafe(nil)); end

    # source://stripe//lib/stripe/api_operations/nested_resource.rb#87
    def list_reversals(id, params = T.unsafe(nil), opts = T.unsafe(nil)); end

    # source://stripe//lib/stripe/api_operations/nested_resource.rb#57
    def retrieve_reversal(id, nested_id, opts = T.unsafe(nil)); end

    # source://stripe//lib/stripe/api_operations/nested_resource.rb#22
    def reversals_url(id, nested_id = T.unsafe(nil)); end

    # source://stripe//lib/stripe/api_operations/nested_resource.rb#67
    def update_reversal(id, nested_id, params = T.unsafe(nil), opts = T.unsafe(nil)); end
  end
end

# source://stripe//lib/stripe/resources/transfer.rb#21
Stripe::Transfer::OBJECT_NAME = T.let(T.unsafe(nil), String)

# source://stripe//lib/stripe/resources/treasury/credit_reversal.rb#5
module Stripe::Treasury; end

# You can reverse some [ReceivedCredits](https://stripe.com/docs/api#received_credits) depending on their network and source flow. Reversing a ReceivedCredit leads to the creation of a new object known as a CreditReversal.
#
# source://stripe//lib/stripe/resources/treasury/credit_reversal.rb#7
class Stripe::Treasury::CreditReversal < ::Stripe::APIResource
  extend ::Stripe::APIOperations::Create
  extend ::Stripe::APIOperations::List
end

# source://stripe//lib/stripe/resources/treasury/credit_reversal.rb#11
Stripe::Treasury::CreditReversal::OBJECT_NAME = T.let(T.unsafe(nil), String)

# You can reverse some [ReceivedDebits](https://stripe.com/docs/api#received_debits) depending on their network and source flow. Reversing a ReceivedDebit leads to the creation of a new object known as a DebitReversal.
#
# source://stripe//lib/stripe/resources/treasury/debit_reversal.rb#7
class Stripe::Treasury::DebitReversal < ::Stripe::APIResource
  extend ::Stripe::APIOperations::Create
  extend ::Stripe::APIOperations::List
end

# source://stripe//lib/stripe/resources/treasury/debit_reversal.rb#11
Stripe::Treasury::DebitReversal::OBJECT_NAME = T.let(T.unsafe(nil), String)

# Stripe Treasury provides users with a container for money called a FinancialAccount that is separate from their Payments balance.
# FinancialAccounts serve as the source and destination of Treasury's money movement APIs.
#
# source://stripe//lib/stripe/resources/treasury/financial_account.rb#8
class Stripe::Treasury::FinancialAccount < ::Stripe::APIResource
  include ::Stripe::APIOperations::Save
  extend ::Stripe::APIOperations::Create
  extend ::Stripe::APIOperations::List
  extend ::Stripe::APIOperations::Save::ClassMethods

  # source://stripe//lib/stripe/resources/treasury/financial_account.rb#15
  def retrieve_features(params = T.unsafe(nil), opts = T.unsafe(nil)); end

  # source://stripe//lib/stripe/resources/treasury/financial_account.rb#24
  def update_features(params = T.unsafe(nil), opts = T.unsafe(nil)); end

  class << self
    # source://stripe//lib/stripe/resources/treasury/financial_account.rb#33
    def retrieve_features(financial_account, params = T.unsafe(nil), opts = T.unsafe(nil)); end

    # source://stripe//lib/stripe/resources/treasury/financial_account.rb#42
    def update_features(financial_account, params = T.unsafe(nil), opts = T.unsafe(nil)); end
  end
end

# source://stripe//lib/stripe/resources/treasury/financial_account.rb#13
Stripe::Treasury::FinancialAccount::OBJECT_NAME = T.let(T.unsafe(nil), String)

# Use [InboundTransfers](https://stripe.com/docs/treasury/moving-money/financial-accounts/into/inbound-transfers) to add funds to your [FinancialAccount](https://stripe.com/docs/api#financial_accounts) via a PaymentMethod that is owned by you. The funds will be transferred via an ACH debit.
#
# source://stripe//lib/stripe/resources/treasury/inbound_transfer.rb#7
class Stripe::Treasury::InboundTransfer < ::Stripe::APIResource
  extend ::Stripe::APIOperations::Create
  extend ::Stripe::APIOperations::List

  # source://stripe//lib/stripe/resources/treasury/inbound_transfer.rb#13
  def cancel(params = T.unsafe(nil), opts = T.unsafe(nil)); end

  # source://stripe//lib/stripe/resources/treasury/inbound_transfer.rb#31
  def test_helpers; end

  class << self
    # source://stripe//lib/stripe/resources/treasury/inbound_transfer.rb#22
    def cancel(inbound_transfer, params = T.unsafe(nil), opts = T.unsafe(nil)); end
  end
end

# source://stripe//lib/stripe/resources/treasury/inbound_transfer.rb#11
Stripe::Treasury::InboundTransfer::OBJECT_NAME = T.let(T.unsafe(nil), String)

# source://stripe//lib/stripe/resources/treasury/inbound_transfer.rb#35
class Stripe::Treasury::InboundTransfer::TestHelpers < ::Stripe::APIResourceTestHelpers
  # source://stripe//lib/stripe/resources/treasury/inbound_transfer.rb#65
  def fail(params = T.unsafe(nil), opts = T.unsafe(nil)); end

  # source://stripe//lib/stripe/resources/treasury/inbound_transfer.rb#74
  def return_inbound_transfer(params = T.unsafe(nil), opts = T.unsafe(nil)); end

  # source://stripe//lib/stripe/resources/treasury/inbound_transfer.rb#83
  def succeed(params = T.unsafe(nil), opts = T.unsafe(nil)); end

  class << self
    # source://stripe//lib/stripe/resources/treasury/inbound_transfer.rb#38
    def fail(id, params = T.unsafe(nil), opts = T.unsafe(nil)); end

    # source://stripe//lib/stripe/resources/treasury/inbound_transfer.rb#47
    def return_inbound_transfer(id, params = T.unsafe(nil), opts = T.unsafe(nil)); end

    # source://stripe//lib/stripe/resources/treasury/inbound_transfer.rb#56
    def succeed(id, params = T.unsafe(nil), opts = T.unsafe(nil)); end
  end
end

# source://stripe//lib/stripe/resources/treasury/inbound_transfer.rb#36
Stripe::Treasury::InboundTransfer::TestHelpers::RESOURCE_CLASS = Stripe::Treasury::InboundTransfer

# Use OutboundPayments to send funds to another party's external bank account or [FinancialAccount](https://stripe.com/docs/api#financial_accounts). To send money to an account belonging to the same user, use an [OutboundTransfer](https://stripe.com/docs/api#outbound_transfers).
#
# Simulate OutboundPayment state changes with the `/v1/test_helpers/treasury/outbound_payments` endpoints. These methods can only be called on test mode objects.
#
# source://stripe//lib/stripe/resources/treasury/outbound_payment.rb#9
class Stripe::Treasury::OutboundPayment < ::Stripe::APIResource
  extend ::Stripe::APIOperations::Create
  extend ::Stripe::APIOperations::List

  # source://stripe//lib/stripe/resources/treasury/outbound_payment.rb#15
  def cancel(params = T.unsafe(nil), opts = T.unsafe(nil)); end

  # source://stripe//lib/stripe/resources/treasury/outbound_payment.rb#33
  def test_helpers; end

  class << self
    # source://stripe//lib/stripe/resources/treasury/outbound_payment.rb#24
    def cancel(id, params = T.unsafe(nil), opts = T.unsafe(nil)); end
  end
end

# source://stripe//lib/stripe/resources/treasury/outbound_payment.rb#13
Stripe::Treasury::OutboundPayment::OBJECT_NAME = T.let(T.unsafe(nil), String)

# source://stripe//lib/stripe/resources/treasury/outbound_payment.rb#37
class Stripe::Treasury::OutboundPayment::TestHelpers < ::Stripe::APIResourceTestHelpers
  # source://stripe//lib/stripe/resources/treasury/outbound_payment.rb#67
  def fail(params = T.unsafe(nil), opts = T.unsafe(nil)); end

  # source://stripe//lib/stripe/resources/treasury/outbound_payment.rb#76
  def post(params = T.unsafe(nil), opts = T.unsafe(nil)); end

  # source://stripe//lib/stripe/resources/treasury/outbound_payment.rb#85
  def return_outbound_payment(params = T.unsafe(nil), opts = T.unsafe(nil)); end

  class << self
    # source://stripe//lib/stripe/resources/treasury/outbound_payment.rb#40
    def fail(id, params = T.unsafe(nil), opts = T.unsafe(nil)); end

    # source://stripe//lib/stripe/resources/treasury/outbound_payment.rb#49
    def post(id, params = T.unsafe(nil), opts = T.unsafe(nil)); end

    # source://stripe//lib/stripe/resources/treasury/outbound_payment.rb#58
    def return_outbound_payment(id, params = T.unsafe(nil), opts = T.unsafe(nil)); end
  end
end

# source://stripe//lib/stripe/resources/treasury/outbound_payment.rb#38
Stripe::Treasury::OutboundPayment::TestHelpers::RESOURCE_CLASS = Stripe::Treasury::OutboundPayment

# Use OutboundTransfers to transfer funds from a [FinancialAccount](https://stripe.com/docs/api#financial_accounts) to a PaymentMethod belonging to the same entity. To send funds to a different party, use [OutboundPayments](https://stripe.com/docs/api#outbound_payments) instead. You can send funds over ACH rails or through a domestic wire transfer to a user's own external bank account.
#
# Simulate OutboundTransfer state changes with the `/v1/test_helpers/treasury/outbound_transfers` endpoints. These methods can only be called on test mode objects.
#
# source://stripe//lib/stripe/resources/treasury/outbound_transfer.rb#9
class Stripe::Treasury::OutboundTransfer < ::Stripe::APIResource
  extend ::Stripe::APIOperations::Create
  extend ::Stripe::APIOperations::List

  # source://stripe//lib/stripe/resources/treasury/outbound_transfer.rb#15
  def cancel(params = T.unsafe(nil), opts = T.unsafe(nil)); end

  # source://stripe//lib/stripe/resources/treasury/outbound_transfer.rb#33
  def test_helpers; end

  class << self
    # source://stripe//lib/stripe/resources/treasury/outbound_transfer.rb#24
    def cancel(outbound_transfer, params = T.unsafe(nil), opts = T.unsafe(nil)); end
  end
end

# source://stripe//lib/stripe/resources/treasury/outbound_transfer.rb#13
Stripe::Treasury::OutboundTransfer::OBJECT_NAME = T.let(T.unsafe(nil), String)

# source://stripe//lib/stripe/resources/treasury/outbound_transfer.rb#37
class Stripe::Treasury::OutboundTransfer::TestHelpers < ::Stripe::APIResourceTestHelpers
  # source://stripe//lib/stripe/resources/treasury/outbound_transfer.rb#71
  def fail(params = T.unsafe(nil), opts = T.unsafe(nil)); end

  # source://stripe//lib/stripe/resources/treasury/outbound_transfer.rb#80
  def post(params = T.unsafe(nil), opts = T.unsafe(nil)); end

  # source://stripe//lib/stripe/resources/treasury/outbound_transfer.rb#89
  def return_outbound_transfer(params = T.unsafe(nil), opts = T.unsafe(nil)); end

  class << self
    # source://stripe//lib/stripe/resources/treasury/outbound_transfer.rb#40
    def fail(outbound_transfer, params = T.unsafe(nil), opts = T.unsafe(nil)); end

    # source://stripe//lib/stripe/resources/treasury/outbound_transfer.rb#49
    def post(outbound_transfer, params = T.unsafe(nil), opts = T.unsafe(nil)); end

    # source://stripe//lib/stripe/resources/treasury/outbound_transfer.rb#58
    def return_outbound_transfer(outbound_transfer, params = T.unsafe(nil), opts = T.unsafe(nil)); end
  end
end

# source://stripe//lib/stripe/resources/treasury/outbound_transfer.rb#38
Stripe::Treasury::OutboundTransfer::TestHelpers::RESOURCE_CLASS = Stripe::Treasury::OutboundTransfer

# ReceivedCredits represent funds sent to a [FinancialAccount](https://stripe.com/docs/api#financial_accounts) (for example, via ACH or wire). These money movements are not initiated from the FinancialAccount.
#
# source://stripe//lib/stripe/resources/treasury/received_credit.rb#7
class Stripe::Treasury::ReceivedCredit < ::Stripe::APIResource
  extend ::Stripe::APIOperations::List

  # source://stripe//lib/stripe/resources/treasury/received_credit.rb#12
  def test_helpers; end
end

# source://stripe//lib/stripe/resources/treasury/received_credit.rb#10
Stripe::Treasury::ReceivedCredit::OBJECT_NAME = T.let(T.unsafe(nil), String)

# source://stripe//lib/stripe/resources/treasury/received_credit.rb#16
class Stripe::Treasury::ReceivedCredit::TestHelpers < ::Stripe::APIResourceTestHelpers
  class << self
    # source://stripe//lib/stripe/resources/treasury/received_credit.rb#19
    def create(params = T.unsafe(nil), opts = T.unsafe(nil)); end
  end
end

# source://stripe//lib/stripe/resources/treasury/received_credit.rb#17
Stripe::Treasury::ReceivedCredit::TestHelpers::RESOURCE_CLASS = Stripe::Treasury::ReceivedCredit

# ReceivedDebits represent funds pulled from a [FinancialAccount](https://stripe.com/docs/api#financial_accounts). These are not initiated from the FinancialAccount.
#
# source://stripe//lib/stripe/resources/treasury/received_debit.rb#7
class Stripe::Treasury::ReceivedDebit < ::Stripe::APIResource
  extend ::Stripe::APIOperations::List

  # source://stripe//lib/stripe/resources/treasury/received_debit.rb#12
  def test_helpers; end
end

# source://stripe//lib/stripe/resources/treasury/received_debit.rb#10
Stripe::Treasury::ReceivedDebit::OBJECT_NAME = T.let(T.unsafe(nil), String)

# source://stripe//lib/stripe/resources/treasury/received_debit.rb#16
class Stripe::Treasury::ReceivedDebit::TestHelpers < ::Stripe::APIResourceTestHelpers
  class << self
    # source://stripe//lib/stripe/resources/treasury/received_debit.rb#19
    def create(params = T.unsafe(nil), opts = T.unsafe(nil)); end
  end
end

# source://stripe//lib/stripe/resources/treasury/received_debit.rb#17
Stripe::Treasury::ReceivedDebit::TestHelpers::RESOURCE_CLASS = Stripe::Treasury::ReceivedDebit

# Transactions represent changes to a [FinancialAccount's](https://stripe.com/docs/api#financial_accounts) balance.
#
# source://stripe//lib/stripe/resources/treasury/transaction.rb#7
class Stripe::Treasury::Transaction < ::Stripe::APIResource
  extend ::Stripe::APIOperations::List
end

# source://stripe//lib/stripe/resources/treasury/transaction.rb#10
Stripe::Treasury::Transaction::OBJECT_NAME = T.let(T.unsafe(nil), String)

# TransactionEntries represent individual units of money movements within a single [Transaction](https://stripe.com/docs/api#transactions).
#
# source://stripe//lib/stripe/resources/treasury/transaction_entry.rb#7
class Stripe::Treasury::TransactionEntry < ::Stripe::APIResource
  extend ::Stripe::APIOperations::List

  class << self
    # source://stripe//lib/stripe/resources/treasury/transaction_entry.rb#12
    def resource_url; end
  end
end

# source://stripe//lib/stripe/resources/treasury/transaction_entry.rb#10
Stripe::Treasury::TransactionEntry::OBJECT_NAME = T.let(T.unsafe(nil), String)

# Usage records allow you to report customer usage and metrics to Stripe for
# metered billing of subscription prices.
#
# Related guide: [Metered Billing](https://stripe.com/docs/billing/subscriptions/metered-billing).
#
# source://stripe//lib/stripe/resources/usage_record.rb#9
class Stripe::UsageRecord < ::Stripe::APIResource; end

# source://stripe//lib/stripe/resources/usage_record.rb#10
Stripe::UsageRecord::OBJECT_NAME = T.let(T.unsafe(nil), String)

# source://stripe//lib/stripe/resources/usage_record_summary.rb#5
class Stripe::UsageRecordSummary < ::Stripe::StripeObject; end

# source://stripe//lib/stripe/resources/usage_record_summary.rb#6
Stripe::UsageRecordSummary::OBJECT_NAME = T.let(T.unsafe(nil), String)

# source://stripe//lib/stripe/util.rb#6
module Stripe::Util
  class << self
    # @raise [TypeError]
    #
    # source://stripe//lib/stripe/util.rb#299
    def check_api_key!(key); end

    # @raise [TypeError]
    #
    # source://stripe//lib/stripe/util.rb#293
    def check_string_argument!(key); end

    # Converts a hash of fields or an array of hashes into a +StripeObject+ or
    # array of +StripeObject+s. These new objects will be created as a concrete
    # type as dictated by their `object` field (e.g. an `object` value of
    # `charge` would create an instance of +Charge+), but if `object` is not
    # present or of an unknown type, the newly created instance will fall back
    # to being a +StripeObject+.
    #
    # ==== Attributes
    #
    # * +data+ - Hash of fields and values to be converted into a StripeObject.
    # * +params+ - Params for +StripeObject+ like filters used in search that
    #   will be reused on subsequent API calls.
    # * +opts+ - Options for +StripeObject+ like an API key that will be reused
    #   on subsequent API calls.
    #
    # source://stripe//lib/stripe/util.rb#111
    def convert_to_stripe_object(data, opts = T.unsafe(nil)); end

    # Converts a hash of fields or an array of hashes into a +StripeObject+ or
    # array of +StripeObject+s. These new objects will be created as a concrete
    # type as dictated by their `object` field (e.g. an `object` value of
    # `charge` would create an instance of +Charge+), but if `object` is not
    # present or of an unknown type, the newly created instance will fall back
    # to being a +StripeObject+.
    #
    # ==== Attributes
    #
    # * +data+ - Hash of fields and values to be converted into a StripeObject.
    # * +opts+ - Options for +StripeObject+ like an API key that will be reused
    #   on subsequent API calls.
    #
    # source://stripe//lib/stripe/util.rb#127
    def convert_to_stripe_object_with_params(data, params, opts = T.unsafe(nil)); end

    # Adds a custom method to a resource class. This is used to add support for
    # non-CRUDL API requests, e.g. capturing charges. custom_method takes the
    # following parameters:
    # - name: the name of the custom method to create (as a symbol)
    # - http_verb: the HTTP verb for the API request (:get, :post, or :delete)
    # - http_path: the path to append to the resource's URL. If not provided,
    #              the name is used as the path
    # - resource: the resource implementation class
    # - target: the class that custom static method will be added to
    #
    # For example, this call:
    #     custom_method :capture, http_verb: post
    # adds a `capture` class method to the resource class that, when called,
    # will send a POST request to `/v1/<object_name>/capture`.
    #
    # source://stripe//lib/stripe/util.rb#64
    def custom_method(resource, target, name, http_verb, http_path); end

    # Encodes a hash of parameters in a way that's suitable for use as query
    # parameters in a URI or as form parameters in a request body. This mainly
    # involves escaping special characters from parameter keys and values (e.g.
    # `&`).
    #
    # source://stripe//lib/stripe/util.rb#206
    def encode_parameters(params); end

    # source://stripe//lib/stripe/util.rb#222
    def flatten_params(params, parent_key = T.unsafe(nil)); end

    # source://stripe//lib/stripe/util.rb#241
    def flatten_params_array(value, calculated_key); end

    # source://stripe//lib/stripe/util.rb#172
    def log_debug(message, data = T.unsafe(nil)); end

    # source://stripe//lib/stripe/util.rb#152
    def log_error(message, data = T.unsafe(nil)); end

    # source://stripe//lib/stripe/util.rb#162
    def log_info(message, data = T.unsafe(nil)); end

    # `Time.now` can be unstable in cases like an administrator manually
    # updating its value or a reconcilation via NTP. For this reason, prefer
    # the use of the system's monotonic clock especially where comparing times
    # to calculate an elapsed duration.
    #
    # Shortcut for getting monotonic time, mostly for purposes of line length
    # and test stubbing. Returns time in seconds since the event used for
    # monotonic reference purposes by the platform (e.g. system boot time).
    #
    # source://stripe//lib/stripe/util.rb#263
    def monotonic_time; end

    # Normalizes header keys so that they're all lower case and each
    # hyphen-delimited section starts with a single capitalized letter. For
    # example, `request-id` becomes `Request-Id`. This is useful for extracting
    # certain key values when the user could have set them with a variety of
    # diffent naming schemes.
    #
    # source://stripe//lib/stripe/util.rb#310
    def normalize_headers(headers); end

    # source://stripe//lib/stripe/util.rb#267
    def normalize_id(id); end

    # The secondary opts argument can either be a string or hash
    # Turn this value into an api_key and a set of headers
    #
    # source://stripe//lib/stripe/util.rb#279
    def normalize_opts(opts); end

    # source://stripe//lib/stripe/util.rb#42
    def object_classes; end

    # @return [Boolean]
    #
    # source://stripe//lib/stripe/util.rb#46
    def object_name_matches_class?(object_name, klass); end

    # source://stripe//lib/stripe/util.rb#27
    def objects_to_ids(obj); end

    # Generates a Dashboard link to inspect a request ID based off of a request
    # ID value and an API key, which is used to attempt to extract whether the
    # environment is livemode or testmode.
    #
    # source://stripe//lib/stripe/util.rb#322
    def request_id_dashboard_url(request_id, api_key); end

    # Constant time string comparison to prevent timing attacks
    # Code borrowed from ActiveSupport
    #
    # source://stripe//lib/stripe/util.rb#329
    def secure_compare(str_a, str_b); end

    # source://stripe//lib/stripe/util.rb#182
    def symbolize_names(object); end

    # Encodes a string in a way that makes it suitable for use in a set of
    # query parameters in a URI or in a set of form parameters in a request
    # body.
    #
    # source://stripe//lib/stripe/util.rb#214
    def url_encode(key); end

    private

    # Uses an ANSI escape code to colorize text if it's going to be sent to a
    # TTY.
    #
    # source://stripe//lib/stripe/util.rb#358
    def colorize(val, color, isatty); end

    # Turns an integer log level into a printable name.
    #
    # source://stripe//lib/stripe/util.rb#370
    def level_name(level); end

    # source://stripe//lib/stripe/util.rb#380
    def log_internal(message, data = T.unsafe(nil), color:, level:, logger:, out:); end

    # Wraps a value in double quotes if it looks sufficiently complex so that
    # it can be read by logfmt parsers.
    #
    # source://stripe//lib/stripe/util.rb#412
    def wrap_logfmt_value(val); end
  end
end

# private
#
# source://stripe//lib/stripe/util.rb#343
Stripe::Util::COLOR_CODES = T.let(T.unsafe(nil), Hash)

# Options that should be copyable from one StripeObject to another
# including options that may be internal.
#
# source://stripe//lib/stripe/util.rb#17
Stripe::Util::OPTS_COPYABLE = T.let(T.unsafe(nil), Set)

# Options that should be persisted between API requests. This includes
# client, which is an object containing an HTTP client to reuse.
#
# source://stripe//lib/stripe/util.rb#23
Stripe::Util::OPTS_PERSISTABLE = T.let(T.unsafe(nil), Set)

# Options that a user is allowed to specify.
#
# source://stripe//lib/stripe/util.rb#8
Stripe::Util::OPTS_USER_SPECIFIED = T.let(T.unsafe(nil), Set)

# source://stripe//lib/stripe/version.rb#4
Stripe::VERSION = T.let(T.unsafe(nil), String)

# source://stripe//lib/stripe/webhook.rb#4
module Stripe::Webhook
  class << self
    # Initializes an Event object from a JSON payload.
    #
    # This may raise JSON::ParserError if the payload is not valid JSON, or
    # SignatureVerificationError if the signature verification fails.
    #
    # source://stripe//lib/stripe/webhook.rb#11
    def construct_event(payload, sig_header, secret, tolerance: T.unsafe(nil)); end
  end
end

# source://stripe//lib/stripe/webhook.rb#5
Stripe::Webhook::DEFAULT_TOLERANCE = T.let(T.unsafe(nil), Integer)

# source://stripe//lib/stripe/webhook.rb#24
module Stripe::Webhook::Signature
  class << self
    # Computes a webhook signature given a time (probably the current time),
    # a payload, and a signing secret.
    #
    # @raise [ArgumentError]
    #
    # source://stripe//lib/stripe/webhook.rb#29
    def compute_signature(timestamp, payload, secret); end

    # Generates a value that would be added to a `Stripe-Signature` for a
    # given webhook payload.
    #
    # Note that this isn't needed to verify webhooks in any way, and is
    # mainly here for use in test cases (those that are both within this
    # project and without).
    #
    # @raise [ArgumentError]
    #
    # source://stripe//lib/stripe/webhook.rb#48
    def generate_header(timestamp, signature, scheme: T.unsafe(nil)); end

    # Verifies the signature header for a given payload.
    #
    # Raises a SignatureVerificationError in the following cases:
    # - the header does not match the expected format
    # - no signatures found with the expected scheme
    # - no signatures matching the expected signature
    # - a tolerance is provided and the timestamp is not within the
    #   tolerance
    #
    # Returns true otherwise
    #
    # source://stripe//lib/stripe/webhook.rb#79
    def verify_header(payload, header, secret, tolerance: T.unsafe(nil)); end

    private

    # Extracts the timestamp and the signature(s) with the desired scheme
    # from the header
    #
    # source://stripe//lib/stripe/webhook.rb#61
    def get_timestamp_and_signatures(header, scheme); end
  end
end

# source://stripe//lib/stripe/webhook.rb#25
Stripe::Webhook::Signature::EXPECTED_SCHEME = T.let(T.unsafe(nil), String)

# You can configure [webhook endpoints](https://stripe.com/docs/webhooks/) via the API to be
# notified about events that happen in your Stripe account or connected
# accounts.
#
# Most users configure webhooks from [the dashboard](https://dashboard.stripe.com/webhooks), which provides a user interface for registering and testing your webhook endpoints.
#
# Related guide: [Setting up Webhooks](https://stripe.com/docs/webhooks/configure).
#
# source://stripe//lib/stripe/resources/webhook_endpoint.rb#12
class Stripe::WebhookEndpoint < ::Stripe::APIResource
  include ::Stripe::APIOperations::Delete
  include ::Stripe::APIOperations::Save
  extend ::Stripe::APIOperations::Create
  extend ::Stripe::APIOperations::Delete::ClassMethods
  extend ::Stripe::APIOperations::List
  extend ::Stripe::APIOperations::Save::ClassMethods
end

# source://stripe//lib/stripe/resources/webhook_endpoint.rb#18
Stripe::WebhookEndpoint::OBJECT_NAME = T.let(T.unsafe(nil), String)