Class: WhopSDK::Models::InvoiceCreateParams::Body::CreateInvoiceInputWithProductID::Plan

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

Overview

See Also:

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 928

Instance Attribute Details

#billing_periodInteger?

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

Returns:

  • (Integer, nil)


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

optional :billing_period, Integer, nil?: true

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

An array of custom field objects.



759
760
761
762
763
# File 'lib/whop_sdk/models/invoice_create_params.rb', line 759

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

#descriptionString?

The description of the plan.

Returns:

  • (String, nil)


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

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)


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

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)


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

optional :initial_price, Float, nil?: true

#internal_notesString?

A personal description or notes section for the business.

Returns:

  • (String, nil)


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

optional :internal_notes, String, nil?: true

#legacy_payment_method_controlsBoolean?

Whether this plan uses legacy payment method controls

Returns:

  • (Boolean, nil)


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

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

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

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



803
804
805
806
807
# File 'lib/whop_sdk/models/invoice_create_params.rb', line 803

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

#plan_typeSymbol, ...

The type of plan that can be attached to a product

Returns:



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

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

#release_methodSymbol, ...

The methods of how a plan can be released.

Returns:



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

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)


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

optional :renewal_price, Float, nil?: true

#stockInteger?

The number of units available for purchase.

Returns:

  • (Integer, nil)


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

optional :stock, Integer, nil?: true

#trial_period_daysInteger?

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

Returns:

  • (Integer, nil)


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

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)


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

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

#visibilitySymbol, ...

Visibility of a resource

Returns:



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

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