Class: WhopSDK::Resources::AccountLinks

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

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.

Generates a url that a user can be directed to in order to access their sub-merchant account. For example, they can visit the hosted payouts portal or the hosted KYC onboarding flow.

Parameters:

  • company_id (String)

    The ID of the Company to generate the url for. The company must be a sub-merchan

  • refresh_url (String)

    The URL to redirect to if the session expires and needs to be re-authenticated d

  • return_url (String)

    The URL to redirect to when the customer wants to return to your site.

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

    The use case for which the link will be used.

  • 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