Class: WhopSDK::Models::PlanCreateParams

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

Overview

Defined Under Namespace

Modules: Image Classes: CustomField, PaymentMethodConfiguration

Instance Attribute Summary collapse

Attributes included from Internal::Type::RequestParameters

#request_options

Class Method Summary collapse

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(id: ) ⇒ Object

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

Input for an attachment

Parameters:

  • id (String) (defaults to: )

    The ID of an existing attachment object. Use this when updating a resource and k



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

Instance Attribute Details

#billing_periodInteger?

The interval in days at which the plan charges (renewal plans).

Returns:

  • (Integer, nil)


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

optional :billing_period, Integer, nil?: true

#company_idString

The company the plan should be created for.

Returns:

  • (String)


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

required :company_id, String

#currencySymbol, ...

The available currencies on the platform

Returns:



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

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

#custom_fieldsArray<WhopSDK::Models::PlanCreateParams::CustomField>?

An array of custom field objects.



38
39
40
# File 'lib/whop_sdk/models/plan_create_params.rb', line 38

optional :custom_fields,
-> { WhopSDK::Internal::Type::ArrayOf[WhopSDK::PlanCreateParams::CustomField] },
nil?: true

#descriptionString?

The description of the plan.

Returns:

  • (String, nil)


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

optional :description, String, nil?: true

#expiration_daysInteger?

The interval at which the plan charges (expiration plans).

Returns:

  • (Integer, nil)


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

optional :expiration_days, Integer, nil?: true

#imageWhopSDK::Models::PlanCreateParams::Image::AttachmentInputWithDirectUploadID, ...

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



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

optional :image, union: -> { WhopSDK::PlanCreateParams::Image }, nil?: true

#initial_priceFloat?

An additional amount charged upon first purchase. Use only if a one time payment OR you want to charge an additional amount on top of the renewal price. Provided as a number in dollars. Eg: 10.43 for $10.43

Returns:

  • (Float, nil)


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

optional :initial_price, Float, nil?: true

#internal_notesString?

A personal description or notes section for the business.

Returns:

  • (String, nil)


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

optional :internal_notes, String, nil?: true

#override_tax_typeSymbol, ...

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

Returns:



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

optional :override_tax_type, enum: -> { WhopSDK::TaxType }, nil?: true

#payment_method_configurationWhopSDK::Models::PlanCreateParams::PaymentMethodConfiguration?

The explicit payment method configuration for the plan. If not provided, the platform or company’s defaults will apply.



86
87
88
# File 'lib/whop_sdk/models/plan_create_params.rb', line 86

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

#plan_typeSymbol, ...

The type of plan that can be attached to a product

Returns:



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

optional :plan_type, enum: -> { WhopSDK::PlanType }, nil?: true

#product_idString

The product the plan is related to.

Returns:

  • (String)


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

required :product_id, String

#release_methodSymbol, ...

The methods of how a plan can be released.

Returns:



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

optional :release_method, enum: -> { WhopSDK::ReleaseMethod }, nil?: true

#renewal_priceFloat?

The amount the customer is charged every billing period. Use only if a recurring payment. Provided as a number in dollars. Eg: 10.43 for $10.43

Returns:

  • (Float, nil)


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

optional :renewal_price, Float, nil?: true

#stockInteger?

The number of units available for purchase.

Returns:

  • (Integer, nil)


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

optional :stock, Integer, nil?: true

#strike_through_initial_priceFloat?

The price to display with a strikethrough for the initial price. Provided as a number in dollars. Eg: 19.99 for $19.99

Returns:

  • (Float, nil)


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

optional :strike_through_initial_price, Float, nil?: true

#strike_through_renewal_priceFloat?

The price to display with a strikethrough for the renewal price. Provided as a number in dollars. Eg: 19.99 for $19.99

Returns:

  • (Float, nil)


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

optional :strike_through_renewal_price, Float, nil?: true

#titleString?

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

Returns:

  • (String, nil)


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

optional :title, String, nil?: true

#trial_period_daysInteger?

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

Returns:

  • (Integer, nil)


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

optional :trial_period_days, Integer, nil?: true

#unlimited_stockBoolean?

Limits/doesn’t limit the number of units available for purchase.

Returns:

  • (Boolean, nil)


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

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

#visibilitySymbol, ...

Visibility of a resource

Returns:



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

optional :visibility, enum: -> { WhopSDK::Visibility }, nil?: true