Class: LemonwayOnboarding::Api::Profiles

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

Overview

Profiles API for Lemonway Onboarding

Instance Method Summary collapse

Constructor Details

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

Initializes the Profiles API with a client.

Parameters:



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

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

Instance Method Details

#create(type, account_id, body) ⇒ Hash

Creates a new profile.

Parameters:

  • type (String)

    The type of account

  • account_id (String)

    The ID of the account to associate the profile with

  • body (Hash)

    The body of the request containing profile details

Returns:

  • (Hash)

    The response from the API containing the created profile details



21
22
23
# File 'lib/lemonway_onboarding/api/profiles.rb', line 21

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