Class: WhopSDK::Models::PaymentCreateParams::Body::CreatePaymentInputWithPlan::Plan

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

Overview

See Also:

Defined Under Namespace

Classes: Product

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(currency:, application_fee_amount: nil, billing_period: nil, description: nil, expiration_days: nil, force_create_new_plan: nil, initial_price: nil, internal_notes: nil, plan_type: nil, product: nil, product_id: nil, renewal_price: nil, title: nil, trial_period_days: nil, visibility: nil) ⇒ Object

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

Pass this object to create a new plan for this payment

Parameters:

  • 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

  • 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 and revokes access (expiration p

  • 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

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

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

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

    A personal description or notes section for the business.

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

    The type of plan that can be attached to a product

  • product (WhopSDK::Models::PaymentCreateParams::Body::CreatePaymentInputWithPlan::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.

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

    The amount the customer is charged every billing period. Provided as a number in

  • 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



# File 'lib/whop_sdk/models/payment_create_params.rb', line 183

Instance Attribute Details

#application_fee_amountFloat?

The application fee amount collected by the platform from this connected account. Provided as a number in dollars (e.g., 5.00 for $5.00). Must be less than the total payment amount. Only valid for connected accounts with a parent company.

Returns:

  • (Float, nil)


95
# File 'lib/whop_sdk/models/payment_create_params.rb', line 95

optional :application_fee_amount, Float, nil?: true

#billing_periodInteger?

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

Returns:

  • (Integer, nil)


102
# File 'lib/whop_sdk/models/payment_create_params.rb', line 102

optional :billing_period, Integer, nil?: true

#currencySymbol, WhopSDK::Models::Currency

The respective currency identifier for the plan.

Returns:



86
# File 'lib/whop_sdk/models/payment_create_params.rb', line 86

required :currency, enum: -> { WhopSDK::Currency }

#descriptionString?

The description of the plan.

Returns:

  • (String, nil)


108
# File 'lib/whop_sdk/models/payment_create_params.rb', line 108

optional :description, String, nil?: true

#expiration_daysInteger?

The number of days until the membership expires and revokes access (expiration plans). For example, 365 for one year.

Returns:

  • (Integer, nil)


115
# File 'lib/whop_sdk/models/payment_create_params.rb', line 115

optional :expiration_days, Integer, nil?: true

#force_create_new_planBoolean?

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

Returns:

  • (Boolean, nil)


122
# File 'lib/whop_sdk/models/payment_create_params.rb', line 122

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

#initial_priceFloat?

An additional amount charged upon first purchase. Provided as a number in the specified currency. Eg: 10.43 for $10.43 USD.

Returns:

  • (Float, nil)


129
# File 'lib/whop_sdk/models/payment_create_params.rb', line 129

optional :initial_price, Float, nil?: true

#internal_notesString?

A personal description or notes section for the business.

Returns:

  • (String, nil)


135
# File 'lib/whop_sdk/models/payment_create_params.rb', line 135

optional :internal_notes, String, nil?: true

#plan_typeSymbol, ...

The type of plan that can be attached to a product

Returns:



141
# File 'lib/whop_sdk/models/payment_create_params.rb', line 141

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

#productWhopSDK::Models::PaymentCreateParams::Body::CreatePaymentInputWithPlan::Plan::Product?

Pass this object to create a new product for this plan. We will use the product external identifier to find or create an existing product.



148
149
150
# File 'lib/whop_sdk/models/payment_create_params.rb', line 148

optional :product,
-> { WhopSDK::PaymentCreateParams::Body::CreatePaymentInputWithPlan::Plan::Product },
nil?: true

#product_idString?

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

Returns:

  • (String, nil)


156
# File 'lib/whop_sdk/models/payment_create_params.rb', line 156

optional :product_id, String, nil?: true

#renewal_priceFloat?

The amount the customer is charged every billing period. Provided as a number in the specified currency. Eg: 10.43 for $10.43 USD.

Returns:

  • (Float, nil)


163
# File 'lib/whop_sdk/models/payment_create_params.rb', line 163

optional :renewal_price, Float, nil?: true

#titleString?

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

Returns:

  • (String, nil)


169
# File 'lib/whop_sdk/models/payment_create_params.rb', line 169

optional :title, String, nil?: true

#trial_period_daysInteger?

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

Returns:

  • (Integer, nil)


175
# File 'lib/whop_sdk/models/payment_create_params.rb', line 175

optional :trial_period_days, Integer, nil?: true

#visibilitySymbol, ...

Visibility of a resource

Returns:



181
# File 'lib/whop_sdk/models/payment_create_params.rb', line 181

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