Class: LemonwayOnboarding::Api::Onboardings

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

Overview

Onboardings API for Lemonway Onboarding

Instance Method Summary collapse

Constructor Details

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

Initializes the Onboardings API with a client.

Parameters:



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

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

Instance Method Details

#create(type, body) ⇒ Object

Creates a new onboarding process.

Parameters:

  • type (String)

    The type of onboarding to create

  • body (Hash)

    The body of the request containing onboarding details



19
20
21
# File 'lib/lemonway_onboarding/api/onboardings.rb', line 19

def create(type, body)
  @client.post("onboardings/#{type}", body)
end

#update(id) ⇒ Array<Hash>

Resumes an existing onboarding process.

Parameters:

  • id (String)

    The ID of the onboarding process to resume

Returns:

  • (Array<Hash>)

    The list of onboardings



27
28
29
# File 'lib/lemonway_onboarding/api/onboardings.rb', line 27

def update(id)
  @client.get("onboardings/#{id}/resume")
end