Class: WhopSDK::Models::CheckoutConfigurationCreateParams::Body::CreateCheckoutSessionInputModePaymentWithPlan::Plan::CustomField

Inherits:
Internal::Type::BaseModel
  • Object
show all
Defined in:
lib/whop_sdk/models/checkout_configuration_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:, currency:, application_fee_amount: nil, billing_period: nil, custom_fields: nil, description: nil, expiration_days: nil, force_create_new_plan: nil, image: nil, initial_price: nil, internal_notes: nil, override_tax_type: nil, payment_method_configuration: nil, plan_type: nil, product: nil, product_id: nil, release_method: nil, renewal_price: nil, split_pay_required_payments: nil, stock: nil, title: nil, trial_period_days: nil, visibility: nil) ⇒ Object

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

The plan attributes to create a new plan inline for this checkout configuration.

Parameters:

  • company_id (String)

    The company the plan should be created for.

  • currency (Symbol, WhopSDK::Models::Currency)

    The respective currency identifier for the plan.

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

    The application fee amount collected by the platform from this connected account

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

    The interval in days at which the plan charges (renewal plans). For example, 30

  • custom_fields (Array<WhopSDK::Models::CheckoutConfigurationCreateParams::Body::CreateCheckoutSessionInputModePaymentWithPlan::Plan::CustomField>, nil) (defaults to: nil)

    An array of custom field objects.

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

    The description of the plan.

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

    The number of days until the membership expires (for expiration-based plans). Fo

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

    Whether to force the creation of a new plan even if one with the same attributes

  • image (WhopSDK::Models::CheckoutConfigurationCreateParams::Body::CreateCheckoutSessionInputModePaymentWithPlan::Plan::Image, nil) (defaults to: nil)

    An image for the plan. This will be visible on the product page to customers.

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

    An additional amount charged upon first purchase. Provided as a number in dollar

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

    A personal description or notes section for the business.

  • 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::CheckoutConfigurationCreateParams::Body::CreateCheckoutSessionInputModePaymentWithPlan::Plan::PaymentMethodConfiguration, nil) (defaults to: nil)

    The explicit payment method configuration for the plan. If not provided, the pla

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

    The type of plan that can be attached to a product

  • product (WhopSDK::Models::CheckoutConfigurationCreateParams::Body::CreateCheckoutSessionInputModePaymentWithPlan::Plan::Product, nil) (defaults to: nil)

    Pass this object to create a new product for this plan. We will use the product

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

    The product the plan is related to. Either this or product is required.

  • 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 the customer is charged every billing period. Provided as a number in

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

    The number of payments required before pausing the subscription.

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

    The number of units available for purchase. If not provided, stock is unlimited.

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

    The title of the plan. This will be visible on the product page to customers.

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

    The number of free trial days added before a renewal plan.

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

    Visibility of a resource



356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
# File 'lib/whop_sdk/models/checkout_configuration_create_params.rb', line 356

class CustomField < WhopSDK::Internal::Type::BaseModel
  # @!attribute field_type
  #   The type of the custom field.
  #
  #   @return [Symbol, :text]
  required :field_type, const: :text

  # @!attribute name
  #   The name of the custom field.
  #
  #   @return [String]
  required :name, String

  # @!attribute id
  #   The ID of the custom field (if being updated)
  #
  #   @return [String, nil]
  optional :id, String, nil?: true

  # @!attribute order
  #   The order of the field.
  #
  #   @return [Integer, nil]
  optional :order, Integer, nil?: true

  # @!attribute placeholder
  #   The placeholder value of the field.
  #
  #   @return [String, nil]
  optional :placeholder, String, nil?: true

  # @!attribute required
  #   Whether or not the field is required.
  #
  #   @return [Boolean, nil]
  optional :required, WhopSDK::Internal::Type::Boolean, nil?: true

  # @!method initialize(name:, id: nil, order: nil, placeholder: nil, required: nil, field_type: :text)
  #   @param name [String] The name of the custom field.
  #
  #   @param id [String, nil] The ID of the custom field (if being updated)
  #
  #   @param order [Integer, nil] The order of the field.
  #
  #   @param placeholder [String, nil] The placeholder value of the field.
  #
  #   @param required [Boolean, nil] Whether or not the field is required.
  #
  #   @param field_type [Symbol, :text] The type of the custom field.
end

Instance Attribute Details

#field_typeSymbol, :text

The type of the custom field.

Returns:

  • (Symbol, :text)


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

required :field_type, const: :text

#idString?

The ID of the custom field (if being updated)

Returns:

  • (String, nil)


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

optional :id, String, nil?: true

#nameString

The name of the custom field.

Returns:

  • (String)


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

required :name, String

#orderInteger?

The order of the field.

Returns:

  • (Integer, nil)


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

optional :order, Integer, nil?: true

#placeholderString?

The placeholder value of the field.

Returns:

  • (String, nil)


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

optional :placeholder, String, nil?: true

#requiredBoolean?

Whether or not the field is required.

Returns:

  • (Boolean, nil)


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

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