Class: Stripe::V2::Core::Accounts::PersonService
- Inherits:
-
StripeService
- Object
- StripeService
- Stripe::V2::Core::Accounts::PersonService
- Defined in:
- lib/stripe/services/v2/core/accounts/person_service.rb
Instance Method Summary collapse
-
#create(account_id, params = {}, opts = {}) ⇒ Object
Create a Person.
-
#delete(account_id, id, params = {}, opts = {}) ⇒ Object
Delete a Person associated with an Account.
-
#list(account_id, params = {}, opts = {}) ⇒ Object
Returns a paginated list of Persons associated with an Account.
-
#retrieve(account_id, id, params = {}, opts = {}) ⇒ Object
Retrieves a Person associated with an Account.
-
#update(account_id, id, params = {}, opts = {}) ⇒ Object
Updates a Person associated with an Account.
Methods inherited from StripeService
#initialize, #request, #request_stream
Constructor Details
This class inherits a constructor from Stripe::StripeService
Instance Method Details
#create(account_id, params = {}, opts = {}) ⇒ Object
Create a Person. Adds an individual to an Account’s identity. You can set relationship attributes and identity information at creation.
** raises RateLimitError
12 13 14 15 16 17 18 19 20 21 22 23 24 |
# File 'lib/stripe/services/v2/core/accounts/person_service.rb', line 12 def create(account_id, params = {}, opts = {}) unless params.is_a?(Stripe::RequestParams) params = ::Stripe::V2::Core::Accounts::PersonCreateParams.coerce_params(params) end request( method: :post, path: format("/v2/core/accounts/%<account_id>s/persons", { account_id: CGI.escape(account_id) }), params: params, opts: opts, base_address: :api ) end |
#delete(account_id, id, params = {}, opts = {}) ⇒ Object
Delete a Person associated with an Account.
** raises RateLimitError
29 30 31 32 33 34 35 36 37 |
# File 'lib/stripe/services/v2/core/accounts/person_service.rb', line 29 def delete(account_id, id, params = {}, opts = {}) request( method: :delete, path: format("/v2/core/accounts/%<account_id>s/persons/%<id>s", { account_id: CGI.escape(account_id), id: CGI.escape(id) }), params: params, opts: opts, base_address: :api ) end |
#list(account_id, params = {}, opts = {}) ⇒ Object
Returns a paginated list of Persons associated with an Account.
** raises RateLimitError
42 43 44 45 46 47 48 49 50 |
# File 'lib/stripe/services/v2/core/accounts/person_service.rb', line 42 def list(account_id, params = {}, opts = {}) request( method: :get, path: format("/v2/core/accounts/%<account_id>s/persons", { account_id: CGI.escape(account_id) }), params: params, opts: opts, base_address: :api ) end |
#retrieve(account_id, id, params = {}, opts = {}) ⇒ Object
Retrieves a Person associated with an Account.
** raises RateLimitError
55 56 57 58 59 60 61 62 63 |
# File 'lib/stripe/services/v2/core/accounts/person_service.rb', line 55 def retrieve(account_id, id, params = {}, opts = {}) request( method: :get, path: format("/v2/core/accounts/%<account_id>s/persons/%<id>s", { account_id: CGI.escape(account_id), id: CGI.escape(id) }), params: params, opts: opts, base_address: :api ) end |
#update(account_id, id, params = {}, opts = {}) ⇒ Object
Updates a Person associated with an Account.
** raises RateLimitError
68 69 70 71 72 73 74 75 76 77 78 79 80 |
# File 'lib/stripe/services/v2/core/accounts/person_service.rb', line 68 def update(account_id, id, params = {}, opts = {}) unless params.is_a?(Stripe::RequestParams) params = ::Stripe::V2::Core::Accounts::PersonUpdateParams.coerce_params(params) end request( method: :post, path: format("/v2/core/accounts/%<account_id>s/persons/%<id>s", { account_id: CGI.escape(account_id), id: CGI.escape(id) }), params: params, opts: opts, base_address: :api ) end |