Class: WhopSDK::Models::CheckoutConfigurationCreateParams::Body::CreateCheckoutSessionInputModePaymentWithPlanID

Inherits:
Internal::Type::BaseModel
  • Object
show all
Defined in:
lib/whop_sdk/models/checkout_configuration_create_params.rb

Defined Under Namespace

Modules: Mode Classes: CheckoutStyling, PaymentMethodConfiguration

Instance Attribute Summary collapse

Class Method 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(background_color: nil, border_style: nil, button_color: nil, font_family: nil) ⇒ Object

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

Checkout styling overrides for this session. Overrides plan and company defaults.

Parameters:

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

    A hex color code for the checkout page background, applied to the order summary

  • border_style (Symbol, WhopSDK::Models::CheckoutShape, nil) (defaults to: nil)

    The different border-radius styles available for checkout pages.

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

    A hex color code for the button color (e.g. #FF5733).

  • font_family (Symbol, WhopSDK::Models::CheckoutFont, nil) (defaults to: nil)

    The different font families available for checkout pages.



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

Instance Attribute Details

#affiliate_codeString?

An affiliate tracking code to attribute the checkout to a specific affiliate.

Returns:

  • (String, nil)


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

optional :affiliate_code, String, nil?: true

#allow_promo_codesBoolean?

Whether the checkout should show the promo code input field and accept promo codes. Defaults to true.

Returns:

  • (Boolean, nil)


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

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

#checkout_stylingWhopSDK::Models::CheckoutConfigurationCreateParams::Body::CreateCheckoutSessionInputModePaymentWithPlanID::CheckoutStyling?

Checkout styling overrides for this session. Overrides plan and company defaults.



705
706
707
708
709
# File 'lib/whop_sdk/models/checkout_configuration_create_params.rb', line 705

optional :checkout_styling,
-> {
  WhopSDK::CheckoutConfigurationCreateParams::Body::CreateCheckoutSessionInputModePaymentWithPlanID::CheckoutStyling
},
nil?: true

#currencySymbol, ...

The available currencies on the platform

Returns:



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

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

#metadataHash{Symbol=>Object}?

Custom key-value metadata to attach to the checkout configuration.

Returns:

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


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

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

#modeSymbol, ...



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

optional :mode,
enum: -> { WhopSDK::CheckoutConfigurationCreateParams::Body::CreateCheckoutSessionInputModePaymentWithPlanID::Mode }

#payment_method_configurationWhopSDK::Models::CheckoutConfigurationCreateParams::Body::CreateCheckoutSessionInputModePaymentWithPlanID::PaymentMethodConfiguration?

The explicit payment method configuration for the checkout session. Only applies to setup mode. If not provided, the platform or company defaults will apply.



734
735
736
737
738
# File 'lib/whop_sdk/models/checkout_configuration_create_params.rb', line 734

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

#plan_idString

The unique identifier of an existing plan to use for this checkout configuration.

Returns:

  • (String)


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

required :plan_id, String

#redirect_urlString?

The URL to redirect the user to after checkout is completed.

Returns:

  • (String, nil)


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

optional :redirect_url, String, nil?: true

#source_urlString?

The URL of the page where the checkout is being initiated from.

Returns:

  • (String, nil)


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

optional :source_url, String, nil?: true

Class Method Details

.valuesArray<Symbol>

Returns:

  • (Array<Symbol>)


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