Class: WhopSDK::Models::AdCreateParams::LeadForm

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

Defined Under Namespace

Modules: FormType Classes: Completion, Disclaimer, Intro, PrivacyPolicy, Question

Instance Attribute Summary collapse

Class Method 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(link_text: nil, url: nil) ⇒ Object

Your privacy policy. url is required by Meta.

Parameters:

  • link_text (String) (defaults to: nil)
  • url (String) (defaults to: nil)


# File 'lib/whop_sdk/models/ad_create_params.rb', line 322

Instance Attribute Details

#completionWhopSDK::Models::AdCreateParams::LeadForm::Completion?

Optional completion screen shown after submission; url sets the follow-up website button.



275
# File 'lib/whop_sdk/models/ad_create_params.rb', line 275

optional :completion, -> { WhopSDK::AdCreateParams::LeadForm::Completion }

#disclaimerWhopSDK::Models::AdCreateParams::LeadForm::Disclaimer?

Optional custom consent disclaimer with checkboxes.



281
# File 'lib/whop_sdk/models/ad_create_params.rb', line 281

optional :disclaimer, -> { WhopSDK::AdCreateParams::LeadForm::Disclaimer }

#form_typeSymbol, ...

more_volume (default) is quickest to submit; higher_intent adds a confirmation step.



288
# File 'lib/whop_sdk/models/ad_create_params.rb', line 288

optional :form_type, enum: -> { WhopSDK::AdCreateParams::LeadForm::FormType }

#introWhopSDK::Models::AdCreateParams::LeadForm::Intro?

Optional intro screen shown before the questions.



294
# File 'lib/whop_sdk/models/ad_create_params.rb', line 294

optional :intro, -> { WhopSDK::AdCreateParams::LeadForm::Intro }

#nameString?

Internal name for the form. Auto-generated if omitted.

Parameters:

  • (String)

Returns:

  • (String, nil)


300
# File 'lib/whop_sdk/models/ad_create_params.rb', line 300

optional :name, String

#phone_verificationBoolean?

Require SMS verification of the phone number (higher_intent forms).

Parameters:

  • (Boolean)

Returns:

  • (Boolean, nil)


306
# File 'lib/whop_sdk/models/ad_create_params.rb', line 306

optional :phone_verification, WhopSDK::Internal::Type::Boolean

#privacy_policyWhopSDK::Models::AdCreateParams::LeadForm::PrivacyPolicy?

Your privacy policy. url is required by Meta.



312
# File 'lib/whop_sdk/models/ad_create_params.rb', line 312

optional :privacy_policy, -> { WhopSDK::AdCreateParams::LeadForm::PrivacyPolicy }

#questionsArray<WhopSDK::Models::AdCreateParams::LeadForm::Question>?

The questions on the form. Standard prefill types need only a type; a custom question needs a label and a format (plus options for multiple_choice). Options carry an optional key and answer-routing logic.



320
# File 'lib/whop_sdk/models/ad_create_params.rb', line 320

optional :questions, -> { WhopSDK::Internal::Type::ArrayOf[WhopSDK::AdCreateParams::LeadForm::Question] }

Class Method Details

.valuesArray<Symbol>

Returns:

  • (Array<Symbol>)


# File 'lib/whop_sdk/models/ad_create_params.rb', line 443

Instance Method Details

#to_hash{

Returns:

  • ({)


350
# File 'sig/whop_sdk/models/ad_create_params.rbs', line 350

def to_hash: -> {