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

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

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(billing_period: nil, custom_fields: nil, description: nil, expiration_days: nil, initial_price: nil, internal_notes: nil, legacy_payment_method_controls: nil, payment_method_configuration: nil, plan_type: nil, release_method: nil, renewal_price: nil, stock: nil, trial_period_days: nil, unlimited_stock: nil, visibility: nil) ⇒ Object

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

Updated plan attributes.

Parameters:

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

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

  • custom_fields (Array<WhopSDK::Models::InvoiceUpdateParams::Plan::CustomField>, nil) (defaults to: nil)

    An array of custom field objects.

  • 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

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

    An additional amount charged upon first purchase. Use only if a one time payment

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

    A personal description or notes section for the business.

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

    Whether this plan uses legacy payment method controls

  • payment_method_configuration (WhopSDK::Models::InvoiceUpdateParams::Plan::PaymentMethodConfiguration, nil) (defaults to: nil)

    The explicit payment method configuration for the plan. If not provided, the pla

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

    The type of plan that can be attached to a product

  • release_method (Symbol, WhopSDK::Models::ReleaseMethod, nil) (defaults to: nil)

    The methods of how a plan can be released.

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

    The amount the customer is charged every billing period. Use only if a recurring

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

    The number of units available for purchase.

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

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

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

    When true, the plan has unlimited stock (stock field is ignored). When false, pu

  • visibility (Symbol, WhopSDK::Models::Visibility, nil) (defaults to: nil)

    Visibility of a resource



387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
# File 'lib/whop_sdk/models/invoice_update_params.rb', line 387

class CustomField < WhopSDK::Internal::Type::BaseModel
  # @!attribute field_type
  #   The type of the custom field.
  #
  #   @return [Symbol, :text]
  required :field_type, const: :text

  # @!attribute name
  #   The name of the custom field.
  #
  #   @return [String]
  required :name, String

  # @!attribute id
  #   The ID of the custom field (if being updated)
  #
  #   @return [String, nil]
  optional :id, String, nil?: true

  # @!attribute order
  #   The order of the field.
  #
  #   @return [Integer, nil]
  optional :order, Integer, nil?: true

  # @!attribute placeholder
  #   The placeholder value of the field.
  #
  #   @return [String, nil]
  optional :placeholder, String, nil?: true

  # @!attribute required
  #   Whether or not the field is required.
  #
  #   @return [Boolean, nil]
  optional :required, WhopSDK::Internal::Type::Boolean, nil?: true

  # @!method initialize(name:, id: nil, order: nil, placeholder: nil, required: nil, field_type: :text)
  #   @param name [String] The name of the custom field.
  #
  #   @param id [String, nil] The ID of the custom field (if being updated)
  #
  #   @param order [Integer, nil] The order of the field.
  #
  #   @param placeholder [String, nil] The placeholder value of the field.
  #
  #   @param required [Boolean, nil] Whether or not the field is required.
  #
  #   @param field_type [Symbol, :text] The type of the custom field.
end

Instance Attribute Details

#field_typeSymbol, :text

The type of the custom field.

Returns:

  • (Symbol, :text)


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

required :field_type, const: :text

#idString?

The ID of the custom field (if being updated)

Returns:

  • (String, nil)


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

optional :id, String, nil?: true

#nameString

The name of the custom field.

Returns:

  • (String)


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

required :name, String

#orderInteger?

The order of the field.

Returns:

  • (Integer, nil)


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

optional :order, Integer, nil?: true

#placeholderString?

The placeholder value of the field.

Returns:

  • (String, nil)


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

optional :placeholder, String, nil?: true

#requiredBoolean?

Whether or not the field is required.

Returns:

  • (Boolean, nil)


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

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