Class: WhopSDK::Models::CheckoutConfiguration

Inherits:
Internal::Type::BaseModel show all
Defined in:
lib/whop_sdk/models/checkout_configuration.rb

Defined Under Namespace

Classes: PaymentMethodConfiguration, Plan

Instance Attribute Summary collapse

Instance Method Summary collapse

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(disabled:, enabled:, include_platform_defaults:) ⇒ Object

Some parameter documentations has been truncated, see PaymentMethodConfiguration for more details.

The explicit payment method configuration for the session, if any. This currently only works in ‘setup’ mode. Use the plan’s payment_method_configuration for payment method.

Parameters:

  • disabled (Array<Symbol, WhopSDK::Models::PaymentMethodTypes>)

    An array of payment method identifiers that are explicitly disabled. Only applie

  • enabled (Array<Symbol, WhopSDK::Models::PaymentMethodTypes>)

    An array of payment method identifiers that are explicitly enabled. This means t

  • include_platform_defaults (Boolean)

    Whether Whop’s platform default payment method enablement settings are included



# File 'lib/whop_sdk/models/checkout_configuration.rb', line 78

Instance Attribute Details

#affiliate_codeString?

The affiliate code to use for the checkout configuration

Returns:

  • (String, nil)


16
# File 'lib/whop_sdk/models/checkout_configuration.rb', line 16

required :affiliate_code, String, nil?: true

#allow_promo_codesBoolean

Whether the checkout configuration allows promo codes. When false, the promo code input is hidden and promo codes are rejected.

Returns:

  • (Boolean)


23
# File 'lib/whop_sdk/models/checkout_configuration.rb', line 23

required :allow_promo_codes, WhopSDK::Internal::Type::Boolean

#company_idString

The ID of the company to use for the checkout configuration

Returns:

  • (String)


29
# File 'lib/whop_sdk/models/checkout_configuration.rb', line 29

required :company_id, String

#currencySymbol, ...

The available currencies on the platform

Returns:



35
# File 'lib/whop_sdk/models/checkout_configuration.rb', line 35

required :currency, enum: -> { WhopSDK::Currency }, nil?: true

#idString

The unique identifier for the checkout session.

Returns:

  • (String)


10
# File 'lib/whop_sdk/models/checkout_configuration.rb', line 10

required :id, String

#metadataHash{Symbol=>Object}?

The metadata to use for the checkout configuration

Returns:

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


41
# File 'lib/whop_sdk/models/checkout_configuration.rb', line 41

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

#modeSymbol, WhopSDK::Models::CheckoutModes

The mode of the checkout session.

Returns:



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

required :mode, enum: -> { WhopSDK::CheckoutModes }

#payment_method_configurationWhopSDK::Models::CheckoutConfiguration::PaymentMethodConfiguration?

The explicit payment method configuration for the session, if any. This currently only works in ‘setup’ mode. Use the plan’s payment_method_configuration for payment method.



55
56
57
# File 'lib/whop_sdk/models/checkout_configuration.rb', line 55

required :payment_method_configuration,
-> { WhopSDK::CheckoutConfiguration::PaymentMethodConfiguration },
nil?: true

#planWhopSDK::Models::CheckoutConfiguration::Plan?

The plan to use for the checkout configuration



63
# File 'lib/whop_sdk/models/checkout_configuration.rb', line 63

required :plan, -> { WhopSDK::CheckoutConfiguration::Plan }, nil?: true

#purchase_urlString

A URL you can send to customers to complete a checkout. It looks like ‘/checkout/plan_xxxx?session=#id`

Returns:

  • (String)


70
# File 'lib/whop_sdk/models/checkout_configuration.rb', line 70

required :purchase_url, String

#redirect_urlString?

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

Returns:

  • (String, nil)


76
# File 'lib/whop_sdk/models/checkout_configuration.rb', line 76

required :redirect_url, String, nil?: true