Class: WhopSDK::Models::PlanCreateParams::CheckoutStyling

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

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(company_id:, product_id:, adaptive_pricing_enabled: nil, billing_period: nil, checkout_styling: nil, currency: nil, custom_fields: nil, description: nil, expiration_days: nil, image: nil, initial_price: nil, internal_notes: nil, legacy_payment_method_controls: nil, metadata: nil, override_tax_type: nil, payment_method_configuration: nil, plan_type: nil, release_method: nil, renewal_price: nil, split_pay_required_payments: nil, stock: nil, three_ds_level: nil, title: nil, trial_period_days: nil, unlimited_stock: nil, visibility: nil, request_options: {}) ⇒ Object

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

Parameters:

  • company_id (String)

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

  • product_id (String)

    The unique identifier of the product to attach this plan to.

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

    Whether this plan accepts local currency payments via adaptive pricing.

  • billing_period (Integer, nil) (defaults to: nil)

    The number of days between recurring charges. For example, 30 for monthly or 365

  • checkout_styling (WhopSDK::Models::PlanCreateParams::CheckoutStyling, nil) (defaults to: nil)

    Checkout styling overrides for this plan. Pass null to inherit from the company

  • currency (Symbol, WhopSDK::Models::Currency, nil) (defaults to: nil)

    The available currencies on the platform

  • custom_fields (Array<WhopSDK::Models::PlanCreateParams::CustomField>, nil) (defaults to: nil)

    An array of custom field definitions to collect from customers at checkout.

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

    A text description of the plan displayed to customers on the product page.

  • expiration_days (Integer, nil) (defaults to: nil)

    The number of days until the membership expires and access is revoked. Used for

  • image (WhopSDK::Models::PlanCreateParams::Image, nil) (defaults to: nil)

    An image displayed on the product page to represent this plan.

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

    The amount charged on the first purchase. For one-time plans, this is the full p

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

    Private notes visible only to the business owner. Not shown to customers.

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

    Whether this plan uses legacy payment method controls.

  • metadata (Hash{Symbol=>Object}, nil) (defaults to: nil)

    Custom key-value pairs to store on the plan. Included in webhook payloads for pa

  • override_tax_type (Symbol, WhopSDK::Models::TaxType, nil) (defaults to: nil)

    Whether or not the tax is included in a plan’s price (or if it hasn’t been set u

  • payment_method_configuration (WhopSDK::Models::PlanCreateParams::PaymentMethodConfiguration, nil) (defaults to: nil)

    Explicit payment method configuration for the plan. When not provided, the compa

  • plan_type (Symbol, WhopSDK::Models::PlanType, nil) (defaults to: nil)

    The type of plan that can be attached to a product

  • release_method (Symbol, WhopSDK::Models::ReleaseMethod, nil) (defaults to: nil)

    The methods of how a plan can be released.

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

    The amount charged each billing period for recurring plans. Provided in the plan

  • split_pay_required_payments (Integer, nil) (defaults to: nil)

    The number of installment payments required before the subscription pauses.

  • stock (Integer, nil) (defaults to: nil)

    The maximum number of units available for purchase. Ignored when unlimited_stock

  • three_ds_level (Symbol, WhopSDK::Models::PlanCreateParams::ThreeDSLevel, nil) (defaults to: nil)

    The 3D Secure behavior for a plan.

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

    The display name of the plan shown to customers on the product page.

  • trial_period_days (Integer, nil) (defaults to: nil)

    The number of free trial days before the first charge on a recurring plan.

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

    Whether the plan has unlimited stock. When true, the stock field is ignored. Def

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

    Visibility of a resource

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


240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
# File 'lib/whop_sdk/models/plan_create_params.rb', line 240

class CheckoutStyling < WhopSDK::Internal::Type::BaseModel
  # @!attribute background_color
  #   A hex color code for the checkout page background, applied to the order summary
  #   panel (e.g. #F4F4F5).
  #
  #   @return [String, nil]
  optional :background_color, String, nil?: true

  # @!attribute border_style
  #   The different border-radius styles available for checkout pages.
  #
  #   @return [Symbol, WhopSDK::Models::CheckoutShape, nil]
  optional :border_style, enum: -> { WhopSDK::CheckoutShape }, nil?: true

  # @!attribute button_color
  #   A hex color code for the button color (e.g. #FF5733).
  #
  #   @return [String, nil]
  optional :button_color, String, nil?: true

  # @!attribute font_family
  #   The different font families available for checkout pages.
  #
  #   @return [Symbol, WhopSDK::Models::CheckoutFont, nil]
  optional :font_family, enum: -> { WhopSDK::CheckoutFont }, nil?: true

  # @!method initialize(background_color: nil, border_style: nil, button_color: nil, font_family: nil)
  #   Some parameter documentations has been truncated, see
  #   {WhopSDK::Models::PlanCreateParams::CheckoutStyling} for more details.
  #
  #   Checkout styling overrides for this plan. Pass null to inherit from the company
  #   default.
  #
  #   @param background_color [String, nil] A hex color code for the checkout page background, applied to the order summary
  #
  #   @param border_style [Symbol, WhopSDK::Models::CheckoutShape, nil] The different border-radius styles available for checkout pages.
  #
  #   @param button_color [String, nil] A hex color code for the button color (e.g. #FF5733).
  #
  #   @param font_family [Symbol, WhopSDK::Models::CheckoutFont, nil] The different font families available for checkout pages.
end

Instance Attribute Details

#background_colorString?

A hex color code for the checkout page background, applied to the order summary panel (e.g. #F4F4F5).

Returns:

  • (String, nil)


246
# File 'lib/whop_sdk/models/plan_create_params.rb', line 246

optional :background_color, String, nil?: true

#border_styleSymbol, ...

The different border-radius styles available for checkout pages.

Returns:



252
# File 'lib/whop_sdk/models/plan_create_params.rb', line 252

optional :border_style, enum: -> { WhopSDK::CheckoutShape }, nil?: true

#button_colorString?

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

Returns:

  • (String, nil)


258
# File 'lib/whop_sdk/models/plan_create_params.rb', line 258

optional :button_color, String, nil?: true

#font_familySymbol, ...

The different font families available for checkout pages.

Returns:



264
# File 'lib/whop_sdk/models/plan_create_params.rb', line 264

optional :font_family, enum: -> { WhopSDK::CheckoutFont }, nil?: true