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.



882
883
884
885
886
887
888
889
890
# File 'lib/stripe/services/account_person_service.rb', line 882

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.



893
894
895
896
897
898
899
900
901
# File 'lib/stripe/services/account_person_service.rb', line 893

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.



904
905
906
907
908
909
910
911
912
# File 'lib/stripe/services/account_person_service.rb', line 904

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.



915
916
917
918
919
920
921
922
923
# File 'lib/stripe/services/account_person_service.rb', line 915

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.



926
927
928
929
930
931
932
933
934
# File 'lib/stripe/services/account_person_service.rb', line 926

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