Class: Stripe::V2::Core::AccountService
- Inherits:
-
StripeService
- Object
- StripeService
- Stripe::V2::Core::AccountService
- Defined in:
- lib/stripe/services/v2/core/account_service.rb
Defined Under Namespace
Classes: CloseParams, CreateParams, ListParams, RetrieveParams, UpdateParams
Instance Attribute Summary collapse
-
#persons ⇒ Object
readonly
Returns the value of attribute persons.
Instance Method Summary collapse
-
#close(id, params = {}, opts = {}) ⇒ Object
Removes access to the Account and its associated resources.
-
#create(params = {}, opts = {}) ⇒ Object
An Account is a representation of a company, individual or other entity that a user interacts with.
-
#initialize(requestor) ⇒ AccountService
constructor
A new instance of AccountService.
-
#list(params = {}, opts = {}) ⇒ Object
Returns a list of Accounts.
-
#retrieve(id, params = {}, opts = {}) ⇒ Object
Retrieves the details of an Account.
-
#update(id, params = {}, opts = {}) ⇒ Object
Updates the details of an Account.
Methods inherited from StripeService
Constructor Details
#initialize(requestor) ⇒ AccountService
Returns a new instance of AccountService.
10 11 12 13 |
# File 'lib/stripe/services/v2/core/account_service.rb', line 10 def initialize(requestor) super @persons = Stripe::V2::Core::Accounts::PersonService.new(@requestor) end |
Instance Attribute Details
#persons ⇒ Object (readonly)
Returns the value of attribute persons.
8 9 10 |
# File 'lib/stripe/services/v2/core/account_service.rb', line 8 def persons @persons end |
Instance Method Details
#close(id, params = {}, opts = {}) ⇒ Object
Removes access to the Account and its associated resources.
4480 4481 4482 4483 4484 4485 4486 4487 4488 |
# File 'lib/stripe/services/v2/core/account_service.rb', line 4480 def close(id, params = {}, opts = {}) request( method: :post, path: format("/v2/core/accounts/%<id>s/close", { id: CGI.escape(id) }), params: params, opts: opts, base_address: :api ) end |
#create(params = {}, opts = {}) ⇒ Object
An Account is a representation of a company, individual or other entity that a user interacts with. Accounts contain identifying information about the entity, and configurations that store the features an account has access to. An account can be configured as any or all of the following configurations: Customer, Merchant and/or Recipient.
4491 4492 4493 4494 4495 4496 4497 4498 4499 |
# File 'lib/stripe/services/v2/core/account_service.rb', line 4491 def create(params = {}, opts = {}) request( method: :post, path: "/v2/core/accounts", params: params, opts: opts, base_address: :api ) end |
#list(params = {}, opts = {}) ⇒ Object
Returns a list of Accounts.
4502 4503 4504 4505 4506 4507 4508 4509 4510 |
# File 'lib/stripe/services/v2/core/account_service.rb', line 4502 def list(params = {}, opts = {}) request( method: :get, path: "/v2/core/accounts", params: params, opts: opts, base_address: :api ) end |
#retrieve(id, params = {}, opts = {}) ⇒ Object
Retrieves the details of an Account.
4513 4514 4515 4516 4517 4518 4519 4520 4521 |
# File 'lib/stripe/services/v2/core/account_service.rb', line 4513 def retrieve(id, params = {}, opts = {}) request( method: :get, path: format("/v2/core/accounts/%<id>s", { id: CGI.escape(id) }), params: params, opts: opts, base_address: :api ) end |
#update(id, params = {}, opts = {}) ⇒ Object
Updates the details of an Account.
4524 4525 4526 4527 4528 4529 4530 4531 4532 |
# File 'lib/stripe/services/v2/core/account_service.rb', line 4524 def update(id, params = {}, opts = {}) request( method: :post, path: format("/v2/core/accounts/%<id>s", { id: CGI.escape(id) }), params: params, opts: opts, base_address: :api ) end |