Class: Lithic::Resources::AccountHolders::Entities

Inherits:
Object
  • Object
show all
Defined in:
lib/lithic/resources/account_holders/entities.rb

Instance Method Summary collapse

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.

Parameters:



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.

Parameters:

  • account_holder_token (String)

    Globally unique identifier for the account holder.

  • address (Lithic::Models::AccountHolders::EntityCreateParams::Address)

    Individual’s current address - PO boxes, UPS drops, and FedEx drops are not acce

  • dob (String)

    Individual’s date of birth, as an RFC 3339 date.

  • email (String)

    Individual’s email address. If utilizing Lithic for chargeback processing, this

  • first_name (String)

    Individual’s first name, as it appears on government-issued identity documents.

  • government_id (String)

    Government-issued identification number (required for identity verification and

  • last_name (String)

    Individual’s last name, as it appears on government-issued identity documents.

  • phone_number (String)

    Individual’s phone number, entered in E.164 format.

  • type (Symbol, Lithic::Models::AccountHolders::EntityCreateParams::Type)

    The type of entity to create on the account holder

  • request_options (Lithic::RequestOptions, Hash{Symbol=>Object}, nil)

Returns:

See Also:



41
42
43
44
45
46
47
48
49
50
# File 'lib/lithic/resources/account_holders/entities.rb', line 41

def create(, params)
  parsed, options = Lithic::AccountHolders::EntityCreateParams.dump_request(params)
  @client.request(
    method: :post,
    path: ["v1/account_holders/%1$s/entities", ],
    body: parsed,
    model: Lithic::Models::AccountHolders::EntityCreateResponse,
    options: 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.

Parameters:

  • entity_token (String)

    Globally unique identifier for the entity.

  • account_holder_token (String)

    Globally unique identifier for the account holder.

  • request_options (Lithic::RequestOptions, Hash{Symbol=>Object}, nil)

Returns:

See Also:



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, options = Lithic::AccountHolders::EntityDeleteParams.dump_request(params)
   =
    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", , entity_token],
    model: Lithic::AccountHolders::AccountHolderEntity,
    options: options
  )
end