Class: Stripe::AccountCapabilityService
- Inherits:
-
StripeService
- Object
- StripeService
- Stripe::AccountCapabilityService
- Defined in:
- lib/stripe/services/account_capability_service.rb
Defined Under Namespace
Classes: ListParams, RetrieveParams, UpdateParams
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.
39 40 41 42 43 44 45 46 47 |
# File 'lib/stripe/services/account_capability_service.rb', line 39 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.
50 51 52 53 54 55 56 57 58 |
# File 'lib/stripe/services/account_capability_service.rb', line 50 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.
61 62 63 64 65 66 67 68 69 |
# File 'lib/stripe/services/account_capability_service.rb', line 61 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 |