Class: WhopSDK::Resources::AccountLinks

Inherits:
Object
  • Object
show all
Defined in:
lib/whop_sdk/resources/account_links.rb

Overview

Account links

Instance Method Summary collapse

Constructor Details

#initialize(client:) ⇒ AccountLinks

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 AccountLinks.

Parameters:



42
43
44
# File 'lib/whop_sdk/resources/account_links.rb', line 42

def initialize(client:)
  @client = client
end

Instance Method Details

#create(company_id:, refresh_url:, return_url:, use_case:, request_options: {}) ⇒ WhopSDK::Models::AccountLinkCreateResponse

Some parameter documentations has been truncated, see Models::AccountLinkCreateParams for more details.

Generate a URL that directs a sub-merchant to their account portal, such as the hosted payouts dashboard or the KYC onboarding flow.

Parameters:

  • company_id (String)

    The unique identifier of the company to generate the link for, starting with ‘bi

  • refresh_url (String)

    The URL to redirect the user to if the session expires and needs to be re-authen

  • return_url (String)

    The URL to redirect the user to when they want to return to your site, such as ‘

  • use_case (Symbol, WhopSDK::Models::AccountLinkCreateParams::UseCase)

    The purpose of the account link, such as hosted payouts portal or hosted KYC onb

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

Returns:

See Also:



28
29
30
31
32
33
34
35
36
37
# File 'lib/whop_sdk/resources/account_links.rb', line 28

def create(params)
  parsed, options = WhopSDK::AccountLinkCreateParams.dump_request(params)
  @client.request(
    method: :post,
    path: "account_links",
    body: parsed,
    model: WhopSDK::Models::AccountLinkCreateResponse,
    options: options
  )
end