Class: LemonwayOnboarding::Api::Documents

Inherits:
Object
  • Object
show all
Defined in:
lib/lemonway_onboarding/api/documents.rb

Overview

Documents API for Lemonway Onboarding

Instance Method Summary collapse

Constructor Details

#initialize(client = LemonwayOnboarding::Client.new) ⇒ LemonwayOnboarding::Api::Documents

Initializes the Documents API with a client.

Parameters:



11
12
13
# File 'lib/lemonway_onboarding/api/documents.rb', line 11

def initialize(client = LemonwayOnboarding::Client.new)
  @client = client
end

Instance Method Details

#get(account_id, document_name) ⇒ Hash

Retrieves a document for a specific account.

Parameters:

  • account_id (String)

    The ID of the account to retrieve the document for

  • document_name (String)

    The name of the document to retrieve

Returns:

  • (Hash)

    The response from the API containing the document details



20
21
22
# File 'lib/lemonway_onboarding/api/documents.rb', line 20

def get(, document_name)
  @client.get("accounts/#{}/documents/#{document_name}")
end

#update(onboarding_id, body) ⇒ Hash

Updates a document for a specific onboarding process.

Parameters:

  • onboarding_id (String)

    The ID of the onboarding process

  • body (Hash)

    The body of the request containing document details

Returns:

  • (Hash)

    The response from the API containing the updated document details



29
30
31
# File 'lib/lemonway_onboarding/api/documents.rb', line 29

def update(onboarding_id, body)
  @client.post("legal_entity_onboarding/#{onboarding_id}/document", body)
end