Class: Stripe::AccountCapabilityService

Inherits:
StripeService show all
Defined in:
lib/stripe/services/account_capability_service.rb

Instance Method Summary collapse

Methods inherited from StripeService

#initialize, #request, #request_stream

Constructor Details

This class inherits a constructor from Stripe::StripeService

Instance Method Details

#list(account, params = {}, opts = {}) ⇒ Object

Returns a list of capabilities associated with the account. The capabilities are returned sorted by creation date, with the most recent capability appearing first.



7
8
9
10
11
12
13
14
15
# File 'lib/stripe/services/account_capability_service.rb', line 7

def list(, params = {}, opts = {})
  request(
    method: :get,
    path: format("/v1/accounts/%<account>s/capabilities", { account: CGI.escape() }),
    params: params,
    opts: opts,
    base_address: :api
  )
end

#retrieve(account, capability, params = {}, opts = {}) ⇒ Object

Retrieves information about the specified Account Capability.



18
19
20
21
22
23
24
25
26
# File 'lib/stripe/services/account_capability_service.rb', line 18

def retrieve(, capability, params = {}, opts = {})
  request(
    method: :get,
    path: format("/v1/accounts/%<account>s/capabilities/%<capability>s", { account: CGI.escape(), capability: CGI.escape(capability) }),
    params: params,
    opts: opts,
    base_address: :api
  )
end

#update(account, capability, params = {}, opts = {}) ⇒ Object

Updates an existing Account Capability. Request or remove a capability by updating its requested parameter.



29
30
31
32
33
34
35
36
37
# File 'lib/stripe/services/account_capability_service.rb', line 29

def update(, capability, params = {}, opts = {})
  request(
    method: :post,
    path: format("/v1/accounts/%<account>s/capabilities/%<capability>s", { account: CGI.escape(), capability: CGI.escape(capability) }),
    params: params,
    opts: opts,
    base_address: :api
  )
end