Class: WhopSDK::Resources::Referrals::Partners

Inherits:
Object
  • Object
show all
Defined in:
lib/whop_sdk/resources/referrals/partners.rb,
sig/whop_sdk/resources/referrals/partners.rbs

Overview

The Referrals API covers your Whop partner activity: the users you referred onto Whop, the businesses you referred and the earnings generated from their processing volume, and the partner leaderboard.

Use it to enroll as a Whop partner, list the users you referred, list your referred businesses and review their earnings, and see the partner leaderboard.

Instance Method Summary collapse

Constructor Details

#initialize(client:) ⇒ Partners

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

Parameters:



36
37
38
# File 'lib/whop_sdk/resources/referrals/partners.rb', line 36

def initialize(client:)
  @client = client
end

Instance Method Details

#create(request_options: {}) ⇒ WhopSDK::Models::Referrals::PartnerCreateResponse

Enrolls the calling user in the Whop partner program, making their business referrals eligible for earnings. Idempotent — enrolling again keeps the original enrollment time.

Parameters:

Returns:

See Also:



24
25
26
27
28
29
30
31
# File 'lib/whop_sdk/resources/referrals/partners.rb', line 24

def create(params = {})
  @client.request(
    method: :post,
    path: "partners",
    model: WhopSDK::Models::Referrals::PartnerCreateResponse,
    options: params[:request_options]
  )
end