Class: Stripe::AccountPersonService
- Inherits:
-
StripeService
- Object
- StripeService
- Stripe::AccountPersonService
- Defined in:
- lib/stripe/services/account_person_service.rb
Defined Under Namespace
Classes: CreateParams, DeleteParams, ListParams, RetrieveParams, UpdateParams
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.
1021 1022 1023 1024 1025 1026 1027 1028 1029 |
# File 'lib/stripe/services/account_person_service.rb', line 1021 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.
1032 1033 1034 1035 1036 1037 1038 1039 1040 |
# File 'lib/stripe/services/account_person_service.rb', line 1032 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.
1043 1044 1045 1046 1047 1048 1049 1050 1051 |
# File 'lib/stripe/services/account_person_service.rb', line 1043 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.
1054 1055 1056 1057 1058 1059 1060 1061 1062 |
# File 'lib/stripe/services/account_person_service.rb', line 1054 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.
1065 1066 1067 1068 1069 1070 1071 1072 1073 |
# File 'lib/stripe/services/account_person_service.rb', line 1065 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 |