mirror of
https://github.com/stripe/stripe-ruby.git
synced 2025-10-04 00:00:47 -04:00
62 lines
2.1 KiB
Ruby
62 lines
2.1 KiB
Ruby
# File generated from our OpenAPI spec
|
|
# frozen_string_literal: true
|
|
|
|
module Stripe
|
|
module FinancialConnections
|
|
# A Financial Connections Account represents an account that exists outside of Stripe, to which you have been granted some degree of access.
|
|
class Account < APIResource
|
|
extend Stripe::APIOperations::List
|
|
|
|
OBJECT_NAME = 'financial_connections.account'
|
|
|
|
def disconnect(params = {}, opts = {})
|
|
request_stripe_object(
|
|
method: :post,
|
|
path: format('/v1/financial_connections/accounts/%<account>s/disconnect', {:account => CGI.escape(self["id"])}),
|
|
params: params,
|
|
opts: opts,
|
|
)
|
|
end
|
|
def list_owners(params = {}, opts = {})
|
|
request_stripe_object(
|
|
method: :get,
|
|
path: format('/v1/financial_connections/accounts/%<account>s/owners', {:account => CGI.escape(self["id"])}),
|
|
params: params,
|
|
opts: opts,
|
|
)
|
|
end
|
|
def refresh_account(params = {}, opts = {})
|
|
request_stripe_object(
|
|
method: :post,
|
|
path: format('/v1/financial_connections/accounts/%<account>s/refresh', {:account => CGI.escape(self["id"])}),
|
|
params: params,
|
|
opts: opts,
|
|
)
|
|
end
|
|
def self.disconnect(account, params = {}, opts = {})
|
|
request_stripe_object(
|
|
method: :post,
|
|
path: format('/v1/financial_connections/accounts/%<account>s/disconnect', {:account => CGI.escape(account)}),
|
|
params: params,
|
|
opts: opts,
|
|
)
|
|
end
|
|
def self.list_owners(account, params = {}, opts = {})
|
|
request_stripe_object(
|
|
method: :get,
|
|
path: format('/v1/financial_connections/accounts/%<account>s/owners', {:account => CGI.escape(account)}),
|
|
params: params,
|
|
opts: opts,
|
|
)
|
|
end
|
|
def self.refresh_account(account, params = {}, opts = {})
|
|
request_stripe_object(
|
|
method: :post,
|
|
path: format('/v1/financial_connections/accounts/%<account>s/refresh', {:account => CGI.escape(account)}),
|
|
params: params,
|
|
opts: opts,
|
|
)
|
|
end
|
|
end
|
|
end
|
|
end |