Class: WhopSDK::Models::InvoiceUpdateParams::Plan

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

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_update_params.rb', line 424

Instance Attribute Details

#billing_periodInteger?

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

Returns:

  • (Integer, nil)


255
# File 'lib/whop_sdk/models/invoice_update_params.rb', line 255

optional :billing_period, Integer, nil?: true

#custom_fieldsArray<WhopSDK::Models::InvoiceUpdateParams::Plan::CustomField>?

An array of custom field objects.



261
262
263
# File 'lib/whop_sdk/models/invoice_update_params.rb', line 261

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

#descriptionString?

The description of the plan.

Returns:

  • (String, nil)


269
# File 'lib/whop_sdk/models/invoice_update_params.rb', line 269

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.

Returns:

  • (Integer, nil)


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

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

Returns:

  • (Float, nil)


284
# File 'lib/whop_sdk/models/invoice_update_params.rb', line 284

optional :initial_price, Float, nil?: true

#internal_notesString?

A personal description or notes section for the business.

Returns:

  • (String, nil)


290
# File 'lib/whop_sdk/models/invoice_update_params.rb', line 290

optional :internal_notes, String, nil?: true

#legacy_payment_method_controlsBoolean?

Whether this plan uses legacy payment method controls

Returns:

  • (Boolean, nil)


296
# File 'lib/whop_sdk/models/invoice_update_params.rb', line 296

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

#payment_method_configurationWhopSDK::Models::InvoiceUpdateParams::Plan::PaymentMethodConfiguration?

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



303
304
305
# File 'lib/whop_sdk/models/invoice_update_params.rb', line 303

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

#plan_typeSymbol, ...

The type of plan that can be attached to a product

Returns:



311
# File 'lib/whop_sdk/models/invoice_update_params.rb', line 311

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

#release_methodSymbol, ...

The methods of how a plan can be released.

Returns:



317
# File 'lib/whop_sdk/models/invoice_update_params.rb', line 317

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

Returns:

  • (Float, nil)


324
# File 'lib/whop_sdk/models/invoice_update_params.rb', line 324

optional :renewal_price, Float, nil?: true

#stockInteger?

The number of units available for purchase.

Returns:

  • (Integer, nil)


330
# File 'lib/whop_sdk/models/invoice_update_params.rb', line 330

optional :stock, Integer, nil?: true

#trial_period_daysInteger?

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

Returns:

  • (Integer, nil)


336
# File 'lib/whop_sdk/models/invoice_update_params.rb', line 336

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.

Returns:

  • (Boolean, nil)


343
# File 'lib/whop_sdk/models/invoice_update_params.rb', line 343

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

#visibilitySymbol, ...

Visibility of a resource

Returns:



349
# File 'lib/whop_sdk/models/invoice_update_params.rb', line 349

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