Class: WhopSDK::Resources::Conversions

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

Overview

Conversions

Instance Method Summary collapse

Constructor Details

#initialize(client:) ⇒ Conversions

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

Parameters:



62
63
64
# File 'lib/whop_sdk/resources/conversions.rb', line 62

def initialize(client:)
  @client = client
end

Instance Method Details

#create(company_id:, event_name:, action_source: nil, context: nil, currency: nil, custom_name: nil, event_id: nil, event_time: nil, plan_id: nil, product_id: nil, referrer_url: nil, url: nil, user: nil, value: nil, request_options: {}) ⇒ WhopSDK::Models::ConversionCreateResponse

Track a conversion or engagement event for a company.

Required permissions:

  • ‘event:create`

Parameters:

Returns:

See Also:



48
49
50
51
52
53
54
55
56
57
# File 'lib/whop_sdk/resources/conversions.rb', line 48

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