Class: Stripe::AccountCapabilityService
- Inherits:
-
StripeService
- Object
- StripeService
- Stripe::AccountCapabilityService
- Defined in:
- lib/stripe/services/account_capability_service.rb
Instance Method Summary collapse
-
#list(account, params = {}, opts = {}) ⇒ Object
Returns a list of capabilities associated with the account.
-
#retrieve(account, capability, params = {}, opts = {}) ⇒ Object
Retrieves information about the specified Account Capability.
-
#update(account, capability, params = {}, opts = {}) ⇒ Object
Updates an existing Account Capability.
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(account, params = {}, opts = {}) request( method: :get, path: format("/v1/accounts/%<account>s/capabilities", { account: CGI.escape(account) }), 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(account, capability, params = {}, opts = {}) request( method: :get, path: format("/v1/accounts/%<account>s/capabilities/%<capability>s", { account: CGI.escape(account), 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(account, capability, params = {}, opts = {}) request( method: :post, path: format("/v1/accounts/%<account>s/capabilities/%<capability>s", { account: CGI.escape(account), capability: CGI.escape(capability) }), params: params, opts: opts, base_address: :api ) end |