Class: WhopSDK::Models::CheckoutConfigurationCreateParams

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

Overview

Defined Under Namespace

Classes: PaymentMethodConfiguration, Plan

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(external_identifier: , title: , business_type: nil, collect_shipping_address: nil, custom_statement_descriptor: nil, description: nil, global_affiliate_percentage: nil, global_affiliate_status: nil, headline: nil, industry_type: nil, product_tax_code_id: nil, redirect_purchase_url: nil, route: nil, visibility: nil) ⇒ Object

Some parameter documentations has been truncated, see WhopSDK::Models::CheckoutConfigurationCreateParams::Plan::Product for more details.

Pass this object to create a new product for this plan. We will use the product external identifier to find or create an existing product.

betwee

Parameters:

  • external_identifier (String) (defaults to: )

    A unique ID used to find or create a product. When provided during creation, we

  • title (String) (defaults to: )

    The title of the product.

  • business_type (Symbol, WhopSDK::Models::BusinessTypes, nil) (defaults to: nil)

    The different business types a company can be.

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

    Whether or not to collect shipping information at checkout from the customer.

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

    The custom statement descriptor for the product i.e. WHOP*SPORTS, must be

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

    A written description of the product.

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

    The percentage of the revenue that goes to the global affiliate program.

  • global_affiliate_status (Symbol, WhopSDK::Models::GlobalAffiliateStatus, nil) (defaults to: nil)

    The different statuses of the global affiliate program for a product.

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

    The headline of the product.

  • industry_type (Symbol, WhopSDK::Models::IndustryTypes, nil) (defaults to: nil)

    The different industry types a company can be in.

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

    The ID of the product tax code to apply to this product.

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

    The URL to redirect the customer to after a purchase.

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

    The route of the product.

  • visibility (Symbol, WhopSDK::Models::Visibility, nil) (defaults to: nil)

    Visibility of a resource



# File 'lib/whop_sdk/models/checkout_configuration_create_params.rb', line 497

Instance Attribute Details

#affiliate_codeString?

The affiliate code to use for the checkout configuration

Returns:

  • (String, nil)


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

optional :affiliate_code, String, nil?: true

#company_idString

The ID of the company for which to generate the checkout configuration. Only required in setup mode.

Returns:

  • (String)


60
# File 'lib/whop_sdk/models/checkout_configuration_create_params.rb', line 60

required :company_id, String

#metadataHash{Symbol=>Object}?

The metadata to use for the checkout configuration

Returns:

  • (Hash{Symbol=>Object}, nil)


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

optional :metadata, WhopSDK::Internal::Type::HashOf[WhopSDK::Internal::Type::Unknown], nil?: true

#modeSymbol, :setup

Returns:

  • (Symbol, :setup)


31
# File 'lib/whop_sdk/models/checkout_configuration_create_params.rb', line 31

required :mode, const: :setup

#payment_method_configurationWhopSDK::Models::CheckoutConfigurationCreateParams::PaymentMethodConfiguration?

This currently only works for configurations made in ‘setup’ mode. The explicit payment method configuration for the checkout session. If not provided, the platform or company’s defaults will apply.



39
40
41
# File 'lib/whop_sdk/models/checkout_configuration_create_params.rb', line 39

optional :payment_method_configuration,
-> { WhopSDK::CheckoutConfigurationCreateParams::PaymentMethodConfiguration },
nil?: true

#planWhopSDK::Models::CheckoutConfigurationCreateParams::Plan

Pass this object to create a new plan for this checkout configuration



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

required :plan, -> { WhopSDK::CheckoutConfigurationCreateParams::Plan }

#plan_idString

The ID of the plan to use for the checkout configuration

Returns:

  • (String)


53
# File 'lib/whop_sdk/models/checkout_configuration_create_params.rb', line 53

required :plan_id, String

#redirect_urlString?

The URL to redirect the user to after the checkout configuration is created

Returns:

  • (String, nil)


47
# File 'lib/whop_sdk/models/checkout_configuration_create_params.rb', line 47

optional :redirect_url, String, nil?: true