Class: WhopSDK::Models::ProductCreateParams

Inherits:
Internal::Type::BaseModel show all
Extended by:
Internal::Type::RequestParameters::Converter
Includes:
Internal::Type::RequestParameters
Defined in:
lib/whop_sdk/models/product_create_params.rb,
sig/whop_sdk/models/product_create_params.rbs

Overview

See Also:

  • WhopSDK::Resources::Products#create

Instance Attribute Summary collapse

Attributes included from Internal::Type::RequestParameters

#request_options

Instance Method Summary collapse

Methods included from Internal::Type::RequestParameters::Converter

dump_request

Methods included from Internal::Type::RequestParameters

included

Methods inherited from Internal::Type::BaseModel

==, #==, #[], coerce, #deconstruct_keys, #deep_to_h, dump, fields, hash, #hash, inherited, inspect, #inspect, known_fields, optional, recursively_to_h, required, #to_h, #to_json, #to_s, to_sorbet_type, #to_yaml

Methods included from Internal::Type::Converter

#coerce, coerce, #dump, dump, #inspect, inspect, meta_info, new_coerce_state, type_info

Methods included from Internal::Util::SorbetRuntimeSupport

#const_missing, #define_sorbet_constant!, #sorbet_constant_defined?, #to_sorbet_type, to_sorbet_type

Constructor Details

#initialize(title:, collect_shipping_address: nil, company_id: nil, custom_cta: nil, custom_cta_url: nil, custom_statement_descriptor: nil, description: nil, global_affiliate_percentage: nil, global_affiliate_status: nil, headline: nil, member_affiliate_percentage: nil, member_affiliate_status: nil, metadata: nil, product_tax_code_id: nil, redirect_purchase_url: nil, route: nil, send_welcome_message: nil, visibility: nil, request_options: {}) ⇒ Object

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

Parameters:

  • title (String)

    The display name of the product. Maximum 80 characters.

  • collect_shipping_address (Boolean, nil) (defaults to: nil)

    Whether to collect a shipping address at checkout.

  • company_id (String) (defaults to: nil)

    The unique identifier of the company to create this product for.

  • custom_cta (String, nil) (defaults to: nil)

    The call-to-action button label.

  • custom_cta_url (String, nil) (defaults to: nil)

    A URL the call-to-action button links to.

  • custom_statement_descriptor (String, nil) (defaults to: nil)

    Custom bank statement descriptor. Must start with WHOP*.

  • description (String, nil) (defaults to: nil)

    A written description displayed on the product page.

  • global_affiliate_percentage (Float, nil) (defaults to: nil)

    The commission rate affiliates earn.

  • global_affiliate_status (String) (defaults to: nil)

    The enrollment status in the global affiliate program.

  • headline (String, nil) (defaults to: nil)

    A short marketing headline for the product page.

  • member_affiliate_percentage (Float, nil) (defaults to: nil)

    The commission rate members earn.

  • member_affiliate_status (String) (defaults to: nil)

    The enrollment status in the member affiliate program.

  • metadata (Object, nil) (defaults to: nil)

    Custom key-value pairs to store on the product.

  • product_tax_code_id (String, nil) (defaults to: nil)

    The unique identifier of the tax classification code. See the available [product

  • redirect_purchase_url (String, nil) (defaults to: nil)

    A URL to redirect the customer to after purchase.

  • route (String, nil) (defaults to: nil)

    The URL slug for the product's public link.

  • send_welcome_message (Boolean, nil) (defaults to: nil)

    Whether to send an automated welcome message via support chat when a user joins

  • visibility (String) (defaults to: nil)

    Whether the product is visible to customers.

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


# File 'lib/whop_sdk/models/product_create_params.rb', line 120

Instance Attribute Details

#collect_shipping_addressBoolean?

Whether to collect a shipping address at checkout.

Parameters:

  • value (Boolean, nil)

Returns:

  • (Boolean, nil)


20
# File 'lib/whop_sdk/models/product_create_params.rb', line 20

optional :collect_shipping_address, WhopSDK::Internal::Type::Boolean, nil?: true

#company_idString?

The unique identifier of the company to create this product for.

Parameters:

  • (String)

Returns:

  • (String, nil)


26
# File 'lib/whop_sdk/models/product_create_params.rb', line 26

optional :company_id, String

#custom_ctaString?

The call-to-action button label.

Parameters:

  • value (String, nil)

Returns:

  • (String, nil)


32
# File 'lib/whop_sdk/models/product_create_params.rb', line 32

optional :custom_cta, String, nil?: true

#custom_cta_urlString?

A URL the call-to-action button links to.

Parameters:

  • value (String, nil)

Returns:

  • (String, nil)


38
# File 'lib/whop_sdk/models/product_create_params.rb', line 38

optional :custom_cta_url, String, nil?: true

#custom_statement_descriptorString?

Custom bank statement descriptor. Must start with WHOP*.

Parameters:

  • value (String, nil)

Returns:

  • (String, nil)


44
# File 'lib/whop_sdk/models/product_create_params.rb', line 44

optional :custom_statement_descriptor, String, nil?: true

#descriptionString?

A written description displayed on the product page.

Parameters:

  • value (String, nil)

Returns:

  • (String, nil)


50
# File 'lib/whop_sdk/models/product_create_params.rb', line 50

optional :description, String, nil?: true

#global_affiliate_percentageFloat?

The commission rate affiliates earn.

Parameters:

  • value (Float, nil)

Returns:

  • (Float, nil)


56
# File 'lib/whop_sdk/models/product_create_params.rb', line 56

optional :global_affiliate_percentage, Float, nil?: true

#global_affiliate_statusString?

The enrollment status in the global affiliate program.

Parameters:

  • (String)

Returns:

  • (String, nil)


62
# File 'lib/whop_sdk/models/product_create_params.rb', line 62

optional :global_affiliate_status, String

#headlineString?

A short marketing headline for the product page.

Parameters:

  • value (String, nil)

Returns:

  • (String, nil)


68
# File 'lib/whop_sdk/models/product_create_params.rb', line 68

optional :headline, String, nil?: true

#member_affiliate_percentageFloat?

The commission rate members earn.

Parameters:

  • value (Float, nil)

Returns:

  • (Float, nil)


74
# File 'lib/whop_sdk/models/product_create_params.rb', line 74

optional :member_affiliate_percentage, Float, nil?: true

#member_affiliate_statusString?

The enrollment status in the member affiliate program.

Parameters:

  • (String)

Returns:

  • (String, nil)


80
# File 'lib/whop_sdk/models/product_create_params.rb', line 80

optional :member_affiliate_status, String

#metadataObject?

Custom key-value pairs to store on the product.

Parameters:

  • value (top, nil)

Returns:

  • (Object, nil)


86
# File 'lib/whop_sdk/models/product_create_params.rb', line 86

optional :metadata, WhopSDK::Internal::Type::Unknown, nil?: true

#product_tax_code_idString?

The unique identifier of the tax classification code. See the available product categories.

Parameters:

  • value (String, nil)

Returns:

  • (String, nil)


93
# File 'lib/whop_sdk/models/product_create_params.rb', line 93

optional :product_tax_code_id, String, nil?: true

#redirect_purchase_urlString?

A URL to redirect the customer to after purchase.

Parameters:

  • value (String, nil)

Returns:

  • (String, nil)


99
# File 'lib/whop_sdk/models/product_create_params.rb', line 99

optional :redirect_purchase_url, String, nil?: true

#routeString?

The URL slug for the product's public link.

Parameters:

  • value (String, nil)

Returns:

  • (String, nil)


105
# File 'lib/whop_sdk/models/product_create_params.rb', line 105

optional :route, String, nil?: true

#send_welcome_messageBoolean?

Whether to send an automated welcome message via support chat when a user joins this product. Defaults to true.

Parameters:

  • value (Boolean, nil)

Returns:

  • (Boolean, nil)


112
# File 'lib/whop_sdk/models/product_create_params.rb', line 112

optional :send_welcome_message, WhopSDK::Internal::Type::Boolean, nil?: true

#titleString

The display name of the product. Maximum 80 characters.

Parameters:

  • value (String)

Returns:

  • (String)


14
# File 'lib/whop_sdk/models/product_create_params.rb', line 14

required :title, String

#visibilityString?

Whether the product is visible to customers.

Parameters:

  • (String)

Returns:

  • (String, nil)


118
# File 'lib/whop_sdk/models/product_create_params.rb', line 118

optional :visibility, String

Instance Method Details

#to_hash{

Returns:

  • ({)


96
# File 'sig/whop_sdk/models/product_create_params.rbs', line 96

def to_hash: -> {