Class: Lithic::Resources::AccountHolders::Entities
- Inherits:
-
Object
- Object
- Lithic::Resources::AccountHolders::Entities
- Defined in:
- lib/lithic/resources/account_holders/entities.rb
Instance Method Summary collapse
-
#create(account_holder_token, address:, dob:, email:, first_name:, government_id:, last_name:, phone_number:, type:, request_options: {}) ⇒ Lithic::Models::AccountHolders::EntityCreateResponse
Some parameter documentations has been truncated, see Models::AccountHolders::EntityCreateParams for more details.
-
#delete(entity_token, account_holder_token:, request_options: {}) ⇒ Lithic::Models::AccountHolders::AccountHolderEntity
Deactivate a beneficial owner individual on an existing KYB account holder.
-
#initialize(client:) ⇒ Entities
constructor
private
A new instance of Entities.
Constructor Details
#initialize(client:) ⇒ Entities
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
Returns a new instance of Entities.
83 84 85 |
# File 'lib/lithic/resources/account_holders/entities.rb', line 83 def initialize(client:) @client = client end |
Instance Method Details
#create(account_holder_token, address:, dob:, email:, first_name:, government_id:, last_name:, phone_number:, type:, request_options: {}) ⇒ Lithic::Models::AccountHolders::EntityCreateResponse
Some parameter documentations has been truncated, see Models::AccountHolders::EntityCreateParams for more details.
Create a new beneficial owner individual or replace the control person entity on an existing KYB account holder. This endpoint is only applicable for account holders enrolled through a KYB workflow with the Persona KYB provider. A new control person can only replace the existing one. A maximum of 4 beneficial owners can be associated with an account holder.
41 42 43 44 45 46 47 48 49 50 |
# File 'lib/lithic/resources/account_holders/entities.rb', line 41 def create(account_holder_token, params) parsed, = Lithic::AccountHolders::EntityCreateParams.dump_request(params) @client.request( method: :post, path: ["v1/account_holders/%1$s/entities", account_holder_token], body: parsed, model: Lithic::Models::AccountHolders::EntityCreateResponse, options: ) end |
#delete(entity_token, account_holder_token:, request_options: {}) ⇒ Lithic::Models::AccountHolders::AccountHolderEntity
Deactivate a beneficial owner individual on an existing KYB account holder. Only beneficial owner individuals can be deactivated.
66 67 68 69 70 71 72 73 74 75 76 77 78 |
# File 'lib/lithic/resources/account_holders/entities.rb', line 66 def delete(entity_token, params) parsed, = Lithic::AccountHolders::EntityDeleteParams.dump_request(params) account_holder_token = parsed.delete(:account_holder_token) do raise ArgumentError.new("missing required path argument #{_1}") end @client.request( method: :delete, path: ["v1/account_holders/%1$s/entities/%2$s", account_holder_token, entity_token], model: Lithic::AccountHolders::AccountHolderEntity, options: ) end |