Class: Stripe::AccountPersonService
- Inherits:
-
StripeService
- Object
- StripeService
- Stripe::AccountPersonService
- Defined in:
- lib/stripe/services/account_person_service.rb
Instance Method Summary collapse
-
#create(account, params = {}, opts = {}) ⇒ Object
Creates a new person.
-
#delete(account, person, params = {}, opts = {}) ⇒ Object
Deletes an existing person’s relationship to the account’s legal entity.
-
#list(account, params = {}, opts = {}) ⇒ Object
Returns a list of people associated with the account’s legal entity.
-
#retrieve(account, person, params = {}, opts = {}) ⇒ Object
Retrieves an existing person.
-
#update(account, person, params = {}, opts = {}) ⇒ Object
Updates an existing person.
Methods inherited from StripeService
#initialize, #request, #request_stream
Constructor Details
This class inherits a constructor from Stripe::StripeService
Instance Method Details
#create(account, params = {}, opts = {}) ⇒ Object
Creates a new person.
7 8 9 10 11 12 13 14 15 |
# File 'lib/stripe/services/account_person_service.rb', line 7 def create(account, params = {}, opts = {}) request( method: :post, path: format("/v1/accounts/%<account>s/persons", { account: CGI.escape(account) }), params: params, opts: opts, base_address: :api ) end |
#delete(account, person, params = {}, opts = {}) ⇒ Object
Deletes an existing person’s relationship to the account’s legal entity. Any person with a relationship for an account can be deleted through the API, except if the person is the account_opener. If your integration is using the executive parameter, you cannot delete the only verified executive on file.
18 19 20 21 22 23 24 25 26 |
# File 'lib/stripe/services/account_person_service.rb', line 18 def delete(account, person, params = {}, opts = {}) request( method: :delete, path: format("/v1/accounts/%<account>s/persons/%<person>s", { account: CGI.escape(account), person: CGI.escape(person) }), params: params, opts: opts, base_address: :api ) end |
#list(account, params = {}, opts = {}) ⇒ Object
Returns a list of people associated with the account’s legal entity. The people are returned sorted by creation date, with the most recent people appearing first.
29 30 31 32 33 34 35 36 37 |
# File 'lib/stripe/services/account_person_service.rb', line 29 def list(account, params = {}, opts = {}) request( method: :get, path: format("/v1/accounts/%<account>s/persons", { account: CGI.escape(account) }), params: params, opts: opts, base_address: :api ) end |
#retrieve(account, person, params = {}, opts = {}) ⇒ Object
Retrieves an existing person.
40 41 42 43 44 45 46 47 48 |
# File 'lib/stripe/services/account_person_service.rb', line 40 def retrieve(account, person, params = {}, opts = {}) request( method: :get, path: format("/v1/accounts/%<account>s/persons/%<person>s", { account: CGI.escape(account), person: CGI.escape(person) }), params: params, opts: opts, base_address: :api ) end |
#update(account, person, params = {}, opts = {}) ⇒ Object
Updates an existing person.
51 52 53 54 55 56 57 58 59 |
# File 'lib/stripe/services/account_person_service.rb', line 51 def update(account, person, params = {}, opts = {}) request( method: :post, path: format("/v1/accounts/%<account>s/persons/%<person>s", { account: CGI.escape(account), person: CGI.escape(person) }), params: params, opts: opts, base_address: :api ) end |