class Lithic::Resources::AccountHolders

def create(params)

Other tags:
    See: Lithic::Models::AccountHolderCreateParams -

Returns:
  • (Lithic::Models::AccountHolderCreateResponse) -

Parameters:
  • request_options (Lithic::RequestOptions, Hash{Symbol=>Object}, nil) --
  • business_account_token (String) -- Only applicable for customers using the KYC-Exempt workflow to enroll authorized
  • kyc_passed_timestamp (String) -- An RFC 3339 timestamp indicating when precomputed KYC was completed on the indiv
  • website_url (String) -- Company website URL.
  • kyb_passed_timestamp (String) -- An RFC 3339 timestamp indicating when precomputed KYC was completed on the busin
  • external_id (String) -- A user provided id that can be used to link an account holder with an external s
  • beneficial_owner_entities (Array) -- Deprecated.
  • phone_number (String) -- The KYC Exempt user's phone number, entered in E.164 format.
  • last_name (String) -- The KYC Exempt user's last name
  • kyc_exemption_type (Symbol, Lithic::AccountHolderCreateParams::KYCExemptionType) -- Specifies the type of KYC Exempt user
  • first_name (String) -- The KYC Exempt user's first name
  • email (String) -- The KYC Exempt user's email
  • address (Lithic::Address) -- KYC Exempt user's current address - PO boxes, UPS drops, and FedEx drops are not
  • individual (Lithic::AccountHolderCreateParams::Individual) -- Information on individual for whom the account is being opened and KYC is being
  • workflow (Symbol, Lithic::AccountHolderCreateParams::Workflow) -- Specifies the workflow type. This must be 'KYC_EXEMPT'
  • tos_timestamp (String) -- An RFC 3339 timestamp indicating when the account holder accepted the applicable
  • nature_of_business (String) -- Short description of the company's line of business (i.e., what does the company
  • control_person (Lithic::AccountHolderCreateParams::ControlPerson) -- An individual with significant responsibility for managing the legal entity (e.g
  • business_entity (Lithic::AccountHolderCreateParams::BusinessEntity) -- Information for business for which the account is being opened and KYB is being
  • beneficial_owner_individuals (Array) -- You must submit a list of all direct and indirect individuals with 25% or more o

Overloads:
  • create(beneficial_owner_individuals:, business_entity:, control_person:, nature_of_business:, tos_timestamp:, workflow:, individual:, address:, email:, first_name:, kyc_exemption_type:, last_name:, phone_number:, beneficial_owner_entities: nil, external_id: nil, kyb_passed_timestamp: nil, website_url: nil, kyc_passed_timestamp: nil, business_account_token: nil, request_options: {})
def create(params)
  parsed, options = Lithic::AccountHolderCreateParams.dump_request(params)
  @client.request(
    method: :post,
    path: "v1/account_holders",
    body: parsed,
    model: Lithic::Models::AccountHolderCreateResponse,
    options: {timeout: 300, **options}
  )
end

def initialize(client:)

Parameters:
  • client (Lithic::Client) --

Other tags:
    Api: - private
def initialize(client:)
  @client = client
end

def list(params = {})

Other tags:
    See: Lithic::Models::AccountHolderListParams -

Returns:
  • (Lithic::Internal::SinglePage) -

Parameters:
  • request_options (Lithic::RequestOptions, Hash{Symbol=>Object}, nil) --
  • starting_after (String) -- A cursor representing an item's token after which a page of results should begin
  • phone_number (String) -- Phone number of the account holder. The query must be an exact match.
  • limit (Integer) -- The number of account_holders to limit the response to.
  • legal_business_name (String) -- (Business Account Holders only) The legal business name of the account holder. T
  • last_name (String) -- (Individual Account Holders only) The last name of the account holder. The query
  • first_name (String) -- (Individual Account Holders only) The first name of the account holder. The quer
  • external_id (String) -- If applicable, represents the external_id associated with the account_holder.
  • ending_before (String) -- A cursor representing an item's token before which a page of results should end.
  • end_ (Time) -- Date string in RFC 3339 format. Only entries created before the specified time w
  • email (String) -- Email address of the account holder. The query must be an exact match, case inse
  • begin_ (Time) -- Date string in RFC 3339 format. Only entries created after the specified time wi

Overloads:
  • list(begin_: nil, email: nil, end_: nil, ending_before: nil, external_id: nil, first_name: nil, last_name: nil, legal_business_name: nil, limit: nil, phone_number: nil, starting_after: nil, request_options: {})
def list(params = {})
  parsed, options = Lithic::AccountHolderListParams.dump_request(params)
  @client.request(
    method: :get,
    path: "v1/account_holders",
    query: parsed.transform_keys(begin_: "begin", end_: "end"),
    page: Lithic::Internal::SinglePage,
    model: Lithic::AccountHolder,
    options: options
  )
end

def list_documents(account_holder_token, params = {})

Other tags:
    See: Lithic::Models::AccountHolderListDocumentsParams -

Returns:
  • (Lithic::Models::AccountHolderListDocumentsResponse) -

Parameters:
  • request_options (Lithic::RequestOptions, Hash{Symbol=>Object}, nil) --
  • account_holder_token (String) -- Globally unique identifier for the account holder.

Overloads:
  • list_documents(account_holder_token, request_options: {})
def list_documents(account_holder_token, params = {})
  @client.request(
    method: :get,
    path: ["v1/account_holders/%1$s/documents", account_holder_token],
    model: Lithic::Models::AccountHolderListDocumentsResponse,
    options: params[:request_options]
  )
end

def retrieve(account_holder_token, params = {})

Other tags:
    See: Lithic::Models::AccountHolderRetrieveParams -

Returns:
  • (Lithic::AccountHolder) -

Parameters:
  • request_options (Lithic::RequestOptions, Hash{Symbol=>Object}, nil) --
  • account_holder_token (String) -- Globally unique identifier for the account holder.

Overloads:
  • retrieve(account_holder_token, request_options: {})
def retrieve(account_holder_token, params = {})
  @client.request(
    method: :get,
    path: ["v1/account_holders/%1$s", account_holder_token],
    model: Lithic::AccountHolder,
    options: params[:request_options]
  )
end

def retrieve_document(document_token, params)

Other tags:
    See: Lithic::Models::AccountHolderRetrieveDocumentParams -

Returns:
  • (Lithic::Document) -

Parameters:
  • request_options (Lithic::RequestOptions, Hash{Symbol=>Object}, nil) --
  • account_holder_token (String) -- Globally unique identifier for the account holder.
  • document_token (String) -- Globally unique identifier for the document.

Overloads:
  • retrieve_document(document_token, account_holder_token:, request_options: {})
def retrieve_document(document_token, params)
  parsed, options = Lithic::AccountHolderRetrieveDocumentParams.dump_request(params)
  account_holder_token =
    parsed.delete(:account_holder_token) do
      raise ArgumentError.new("missing required path argument #{_1}")
    end
  @client.request(
    method: :get,
    path: ["v1/account_holders/%1$s/documents/%2$s", account_holder_token, document_token],
    model: Lithic::Document,
    options: options
  )
end

def simulate_enrollment_document_review(params)

Other tags:
    See: Lithic::Models::AccountHolderSimulateEnrollmentDocumentReviewParams -

Returns:
  • (Lithic::Document) -

Parameters:
  • request_options (Lithic::RequestOptions, Hash{Symbol=>Object}, nil) --
  • status_reason (Symbol, Lithic::AccountHolderSimulateEnrollmentDocumentReviewParams::StatusReason) -- Status reason that will be associated with the simulated account holder status.
  • accepted_entity_status_reasons (Array) -- A list of status reasons associated with a KYB account holder in PENDING_REVIEW
  • status (Symbol, Lithic::AccountHolderSimulateEnrollmentDocumentReviewParams::Status) -- An account holder document's upload status for use within the simulation.
  • document_upload_token (String) -- The account holder document upload which to perform the simulation upon.

Overloads:
  • simulate_enrollment_document_review(document_upload_token:, status:, accepted_entity_status_reasons: nil, status_reason: nil, request_options: {})
def simulate_enrollment_document_review(params)
  parsed, options = Lithic::AccountHolderSimulateEnrollmentDocumentReviewParams.dump_request(params)
  @client.request(
    method: :post,
    path: "v1/simulate/account_holders/enrollment_document_review",
    body: parsed,
    model: Lithic::Document,
    options: options
  )
end

def simulate_enrollment_review(params = {})

Other tags:
    See: Lithic::Models::AccountHolderSimulateEnrollmentReviewParams -

Returns:
  • (Lithic::Models::AccountHolderSimulateEnrollmentReviewResponse) -

Parameters:
  • request_options (Lithic::RequestOptions, Hash{Symbol=>Object}, nil) --
  • status_reasons (Array) -- Status reason that will be associated with the simulated account holder status.
  • status (Symbol, Lithic::AccountHolderSimulateEnrollmentReviewParams::Status) -- An account holder's status for use within the simulation.
  • account_holder_token (String) -- The account holder which to perform the simulation upon.

Overloads:
  • simulate_enrollment_review(account_holder_token: nil, status: nil, status_reasons: nil, request_options: {})
def simulate_enrollment_review(params = {})
  parsed, options = Lithic::AccountHolderSimulateEnrollmentReviewParams.dump_request(params)
  @client.request(
    method: :post,
    path: "v1/simulate/account_holders/enrollment_review",
    body: parsed,
    model: Lithic::Models::AccountHolderSimulateEnrollmentReviewResponse,
    options: options
  )
end

def update(account_holder_token, params = {})

Other tags:
    See: Lithic::Models::AccountHolderUpdateParams -

Returns:
  • (Lithic::Models::AccountHolderUpdateResponse::KYBKYCPatchResponse, Lithic::Models::AccountHolderUpdateResponse::PatchResponse) -

Parameters:
  • request_options (Lithic::RequestOptions, Hash{Symbol=>Object}, nil) --
  • phone_number (String) -- Allowed for all Account Holders. Account holder's phone number, entered in E.164
  • legal_business_name (String) -- Allowed for BYO-KYB. Legal business name of the account holder.
  • last_name (String) -- Allowed for KYC-Exempt, BYO-KYC. Account holder's last name.
  • first_name (String) -- Allowed for KYC-Exempt, BYO-KYC. Account holder's first name.
  • email (String) -- Allowed for all Account Holders. Account holder's email address. The primary pur
  • business_account_token (String) -- Allowed for: KYC-Exempt, BYO-KYC. The token of the business account to which the
  • address (Lithic::AddressUpdate) -- Allowed for: KYC-Exempt, BYO-KYC, BYO-KYB.
  • individual (Lithic::AccountHolderUpdateParams::Individual) -- Information on the individual for whom the account is being opened and KYC is be
  • website_url (String) -- Company website URL.
  • nature_of_business (String) -- Short description of the company's line of business (i.e., what does the company
  • external_id (String) -- A user provided id that can be used to link an account holder with an external s
  • control_person (Lithic::AccountHolderUpdateParams::ControlPerson) -- An individual with significant responsibility for managing the legal entity (e.g
  • business_entity (Lithic::AccountHolderUpdateParams::BusinessEntity) -- Information for business for which the account is being opened and KYB is being
  • beneficial_owner_individuals (Array) -- You must submit a list of all direct and indirect individuals with 25% or more o
  • beneficial_owner_entities (Array) -- Deprecated.
  • account_holder_token (String) -- Globally unique identifier for the account holder.

Overloads:
  • update(account_holder_token, beneficial_owner_entities: nil, beneficial_owner_individuals: nil, business_entity: nil, control_person: nil, external_id: nil, nature_of_business: nil, website_url: nil, individual: nil, address: nil, business_account_token: nil, email: nil, first_name: nil, last_name: nil, legal_business_name: nil, phone_number: nil, request_options: {})
def update(account_holder_token, params = {})
  parsed, options = Lithic::AccountHolderUpdateParams.dump_request(params)
  @client.request(
    method: :patch,
    path: ["v1/account_holders/%1$s", account_holder_token],
    body: parsed,
    model: Lithic::Models::AccountHolderUpdateResponse,
    options: options
  )
end

def upload_document(account_holder_token, params)

Other tags:
    See: Lithic::Models::AccountHolderUploadDocumentParams -

Returns:
  • (Lithic::Document) -

Parameters:
  • request_options (Lithic::RequestOptions, Hash{Symbol=>Object}, nil) --
  • entity_token (String) -- Globally unique identifier for the entity.
  • document_type (Symbol, Lithic::AccountHolderUploadDocumentParams::DocumentType) -- The type of document to upload
  • account_holder_token (String) -- Globally unique identifier for the account holder.

Overloads:
  • upload_document(account_holder_token, document_type:, entity_token:, request_options: {})
def upload_document(account_holder_token, params)
  parsed, options = Lithic::AccountHolderUploadDocumentParams.dump_request(params)
  @client.request(
    method: :post,
    path: ["v1/account_holders/%1$s/documents", account_holder_token],
    body: parsed,
    model: Lithic::Document,
    options: options
  )
end