Class: WhopSDK::Models::InvoiceCreateParams::Body::CreateInvoiceInputWithProduct::Plan

Inherits:
Internal::Type::BaseModel show all
Defined in:
lib/whop_sdk/models/invoice_create_params.rb,
sig/whop_sdk/models/invoice_create_params.rbs

Overview

See Also:

  • WhopSDK::Models::InvoiceCreateParams::Body::CreateInvoiceInputWithProduct#plan

Defined Under Namespace

Classes: CustomField, PaymentMethodConfiguration

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(name:, id: nil, order: nil, placeholder: nil, required: nil, field_type: :text) ⇒ Object

Parameters:

  • name (String)

    The name of the custom field.

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

    The ID of the custom field (if being updated)

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

    The order of the field.

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

    The placeholder value of the field.

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

    Whether or not the field is required.

  • field_type (Symbol, :text) (defaults to: :text)

    The type of the custom field.



# File 'lib/whop_sdk/models/invoice_create_params.rb', line 395

Instance Attribute Details

#adaptive_pricing_enabledBoolean?

Whether this plan accepts local currency payments via adaptive pricing.

Parameters:

  • value (Boolean, nil)

Returns:

  • (Boolean, nil)


204
# File 'lib/whop_sdk/models/invoice_create_params.rb', line 204

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

#billing_periodInteger?

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

Parameters:

  • value (Integer, nil)

Returns:

  • (Integer, nil)


210
# File 'lib/whop_sdk/models/invoice_create_params.rb', line 210

optional :billing_period, Integer, nil?: true

#currencySymbol, ...

The available currencies on the platform

Parameters:

  • value (WhopSDK::Models::currency, nil)

Returns:



216
# File 'lib/whop_sdk/models/invoice_create_params.rb', line 216

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

#custom_fieldsArray<WhopSDK::Models::InvoiceCreateParams::Body::CreateInvoiceInputWithProduct::Plan::CustomField>?

An array of custom field objects.

Parameters:

  • value (::Array[WhopSDK::InvoiceCreateParams::Body::CreateInvoiceInputWithProduct::Plan::CustomField], nil)

Returns:



222
223
224
225
226
# File 'lib/whop_sdk/models/invoice_create_params.rb', line 222

optional :custom_fields,
-> {
  WhopSDK::Internal::Type::ArrayOf[WhopSDK::InvoiceCreateParams::Body::CreateInvoiceInputWithProduct::Plan::CustomField]
},
nil?: true

#descriptionString?

The description of the plan.

Parameters:

  • value (String, nil)

Returns:

  • (String, nil)


232
# File 'lib/whop_sdk/models/invoice_create_params.rb', line 232

optional :description, String, nil?: true

#expiration_daysInteger?

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

Parameters:

  • value (Integer, nil)

Returns:

  • (Integer, nil)


239
# File 'lib/whop_sdk/models/invoice_create_params.rb', line 239

optional :expiration_days, Integer, 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 the specified currency. Eg: 10.43 for $10.43

Parameters:

  • value (Float, nil)

Returns:

  • (Float, nil)


247
# File 'lib/whop_sdk/models/invoice_create_params.rb', line 247

optional :initial_price, Float, nil?: true

#internal_notesString?

A personal description or notes section for the business.

Parameters:

  • value (String, nil)

Returns:

  • (String, nil)


253
# File 'lib/whop_sdk/models/invoice_create_params.rb', line 253

optional :internal_notes, String, nil?: true

#legacy_payment_method_controlsBoolean?

Whether this plan uses legacy payment method controls

Parameters:

  • value (Boolean, nil)

Returns:

  • (Boolean, nil)


259
# File 'lib/whop_sdk/models/invoice_create_params.rb', line 259

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

#payment_method_configurationWhopSDK::Models::InvoiceCreateParams::Body::CreateInvoiceInputWithProduct::Plan::PaymentMethodConfiguration?

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

Parameters:

  • value (WhopSDK::InvoiceCreateParams::Body::CreateInvoiceInputWithProduct::Plan::PaymentMethodConfiguration, nil)

Returns:



266
267
268
269
270
# File 'lib/whop_sdk/models/invoice_create_params.rb', line 266

optional :payment_method_configuration,
-> {
  WhopSDK::InvoiceCreateParams::Body::CreateInvoiceInputWithProduct::Plan::PaymentMethodConfiguration
},
nil?: true

#plan_typeSymbol, ...

The type of plan that can be attached to a product

Parameters:

  • value (WhopSDK::Models::plan_type, nil)

Returns:



276
# File 'lib/whop_sdk/models/invoice_create_params.rb', line 276

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

#release_methodSymbol, ...

The methods of how a plan can be released.

Parameters:

  • value (WhopSDK::Models::release_method, nil)

Returns:



282
# File 'lib/whop_sdk/models/invoice_create_params.rb', line 282

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 the specified currency. Eg: 10.43 for $10.43

Parameters:

  • value (Float, nil)

Returns:

  • (Float, nil)


289
# File 'lib/whop_sdk/models/invoice_create_params.rb', line 289

optional :renewal_price, Float, nil?: true

#stockInteger?

The number of units available for purchase.

Parameters:

  • value (Integer, nil)

Returns:

  • (Integer, nil)


295
# File 'lib/whop_sdk/models/invoice_create_params.rb', line 295

optional :stock, Integer, nil?: true

#trial_period_daysInteger?

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

Parameters:

  • value (Integer, nil)

Returns:

  • (Integer, nil)


301
# File 'lib/whop_sdk/models/invoice_create_params.rb', line 301

optional :trial_period_days, Integer, nil?: true

#unlimited_stockBoolean?

When true, the plan has unlimited stock (stock field is ignored). When false, purchases are limited by the stock field.

Parameters:

  • value (Boolean, nil)

Returns:

  • (Boolean, nil)


308
# File 'lib/whop_sdk/models/invoice_create_params.rb', line 308

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

#visibilitySymbol, ...

Visibility of a resource

Parameters:

  • value (WhopSDK::Models::visibility, nil)

Returns:



314
# File 'lib/whop_sdk/models/invoice_create_params.rb', line 314

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

Instance Method Details

#to_hash{

Returns:

  • ({)


202
# File 'sig/whop_sdk/models/invoice_create_params.rbs', line 202

def to_hash: -> {