Class: Stripe::AccountPersonService

Inherits:
StripeService show all
Defined in:
lib/stripe/services/account_person_service.rb

Defined Under Namespace

Classes: CreateParams, DeleteParams, ListParams, RetrieveParams, UpdateParams

Instance Method Summary collapse

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.



966
967
968
969
970
971
972
973
974
# File 'lib/stripe/services/account_person_service.rb', line 966

def create(, params = {}, opts = {})
  request(
    method: :post,
    path: format("/v1/accounts/%<account>s/persons", { account: CGI.escape() }),
    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.



977
978
979
980
981
982
983
984
985
# File 'lib/stripe/services/account_person_service.rb', line 977

def delete(, person, params = {}, opts = {})
  request(
    method: :delete,
    path: format("/v1/accounts/%<account>s/persons/%<person>s", { account: CGI.escape(), 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.



988
989
990
991
992
993
994
995
996
# File 'lib/stripe/services/account_person_service.rb', line 988

def list(, params = {}, opts = {})
  request(
    method: :get,
    path: format("/v1/accounts/%<account>s/persons", { account: CGI.escape() }),
    params: params,
    opts: opts,
    base_address: :api
  )
end

#retrieve(account, person, params = {}, opts = {}) ⇒ Object

Retrieves an existing person.



999
1000
1001
1002
1003
1004
1005
1006
1007
# File 'lib/stripe/services/account_person_service.rb', line 999

def retrieve(, person, params = {}, opts = {})
  request(
    method: :get,
    path: format("/v1/accounts/%<account>s/persons/%<person>s", { account: CGI.escape(), person: CGI.escape(person) }),
    params: params,
    opts: opts,
    base_address: :api
  )
end

#update(account, person, params = {}, opts = {}) ⇒ Object

Updates an existing person.



1010
1011
1012
1013
1014
1015
1016
1017
1018
# File 'lib/stripe/services/account_person_service.rb', line 1010

def update(, person, params = {}, opts = {})
  request(
    method: :post,
    path: format("/v1/accounts/%<account>s/persons/%<person>s", { account: CGI.escape(), person: CGI.escape(person) }),
    params: params,
    opts: opts,
    base_address: :api
  )
end