Class: WhopSDK::Models::AdGroupUpdateParams::PlatformConfig::Meta::LeadFormConfig::Question

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

Defined Under Namespace

Classes: DependentConditionalQuestion, Option

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(type:, target_end_page_index: nil, target_question_index: nil) ⇒ Object

Conditional logic routing for this answer option.

Parameters:

  • type (String)

    Logic type: go_to_question, submit_form, or close_form.

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

    Index of the end page to route to (for submit_form type).

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

    Index of the question to route to (for go_to_question type).



1591
1592
1593
1594
1595
1596
1597
1598
1599
1600
1601
1602
1603
1604
1605
1606
1607
1608
1609
1610
1611
1612
1613
1614
1615
1616
1617
1618
1619
1620
1621
1622
1623
1624
1625
1626
1627
1628
1629
1630
1631
1632
1633
1634
1635
1636
1637
1638
1639
1640
1641
1642
1643
1644
1645
1646
1647
1648
1649
1650
1651
1652
1653
1654
1655
1656
1657
1658
1659
1660
1661
1662
1663
1664
1665
1666
1667
1668
1669
1670
1671
1672
1673
1674
1675
1676
1677
1678
1679
1680
1681
1682
1683
1684
1685
1686
1687
1688
1689
1690
1691
1692
1693
1694
1695
1696
1697
1698
1699
1700
1701
1702
1703
1704
1705
1706
1707
1708
1709
1710
1711
1712
1713
1714
1715
1716
1717
1718
1719
1720
1721
1722
1723
1724
1725
1726
1727
1728
1729
1730
1731
1732
1733
1734
1735
1736
1737
1738
1739
1740
1741
1742
1743
1744
1745
1746
1747
1748
1749
1750
1751
1752
1753
1754
1755
1756
1757
1758
1759
1760
1761
1762
1763
1764
1765
1766
1767
1768
1769
1770
1771
1772
1773
1774
1775
1776
1777
1778
1779
1780
1781
1782
1783
1784
1785
1786
1787
1788
1789
1790
1791
1792
1793
1794
1795
1796
1797
1798
1799
1800
1801
1802
1803
1804
1805
1806
1807
1808
1809
1810
1811
1812
1813
1814
1815
1816
1817
1818
1819
1820
1821
1822
1823
1824
1825
1826
1827
1828
1829
1830
1831
1832
1833
1834
1835
1836
1837
1838
1839
1840
1841
1842
1843
# File 'lib/whop_sdk/models/ad_group_update_params.rb', line 1591

class Question < WhopSDK::Internal::Type::BaseModel
  # @!attribute type
  #   Question type (EMAIL, FULL_NAME, PHONE, CUSTOM, DATE_TIME, etc.).
  #
  #   @return [String]
  required :type, String

  # @!attribute conditional_questions_group_id
  #   Group ID for conditional question routing.
  #
  #   @return [String, nil]
  optional :conditional_questions_group_id, String, nil?: true

  # @!attribute dependent_conditional_questions
  #   Questions shown conditionally based on this question's answer.
  #
  #   @return [Array<WhopSDK::Models::AdGroupUpdateParams::PlatformConfig::Meta::LeadFormConfig::Question::DependentConditionalQuestion>, nil]
  optional :dependent_conditional_questions,
           -> {
             WhopSDK::Internal::Type::ArrayOf[WhopSDK::AdGroupUpdateParams::PlatformConfig::Meta::LeadFormConfig::Question::DependentConditionalQuestion]
           },
           nil?: true

  # @!attribute inline_context
  #   Helper text shown below the question.
  #
  #   @return [String, nil]
  optional :inline_context, String, nil?: true

  # @!attribute key
  #   Unique key for this question.
  #
  #   @return [String, nil]
  optional :key, String, nil?: true

  # @!attribute label
  #   Custom label for CUSTOM questions.
  #
  #   @return [String, nil]
  optional :label, String, nil?: true

  # @!attribute options
  #   Answer options for multiple choice CUSTOM questions.
  #
  #   @return [Array<WhopSDK::Models::AdGroupUpdateParams::PlatformConfig::Meta::LeadFormConfig::Question::Option>, nil]
  optional :options,
           -> {
             WhopSDK::Internal::Type::ArrayOf[WhopSDK::AdGroupUpdateParams::PlatformConfig::Meta::LeadFormConfig::Question::Option]
           },
           nil?: true

  # @!attribute question_format
  #   UI hint: short_answer, multiple_choice, or appointment.
  #
  #   @return [String, nil]
  optional :question_format, String, nil?: true

  # @!method initialize(type:, conditional_questions_group_id: nil, dependent_conditional_questions: nil, inline_context: nil, key: nil, label: nil, options: nil, question_format: nil)
  #   A question on a Meta lead gen form.
  #
  #   @param type [String] Question type (EMAIL, FULL_NAME, PHONE, CUSTOM, DATE_TIME, etc.).
  #
  #   @param conditional_questions_group_id [String, nil] Group ID for conditional question routing.
  #
  #   @param dependent_conditional_questions [Array<WhopSDK::Models::AdGroupUpdateParams::PlatformConfig::Meta::LeadFormConfig::Question::DependentConditionalQuestion>, nil] Questions shown conditionally based on this question's answer.
  #
  #   @param inline_context [String, nil] Helper text shown below the question.
  #
  #   @param key [String, nil] Unique key for this question.
  #
  #   @param label [String, nil] Custom label for CUSTOM questions.
  #
  #   @param options [Array<WhopSDK::Models::AdGroupUpdateParams::PlatformConfig::Meta::LeadFormConfig::Question::Option>, nil] Answer options for multiple choice CUSTOM questions.
  #
  #   @param question_format [String, nil] UI hint: short_answer, multiple_choice, or appointment.

  class DependentConditionalQuestion < WhopSDK::Internal::Type::BaseModel
    # @!attribute type
    #   Question type (EMAIL, FULL_NAME, PHONE, CUSTOM, DATE_TIME, etc.).
    #
    #   @return [String]
    required :type, String

    # @!attribute inline_context
    #   Helper text shown below the question.
    #
    #   @return [String, nil]
    optional :inline_context, String, nil?: true

    # @!attribute key
    #   Unique key for this question.
    #
    #   @return [String, nil]
    optional :key, String, nil?: true

    # @!attribute label
    #   Custom label for CUSTOM questions.
    #
    #   @return [String, nil]
    optional :label, String, nil?: true

    # @!attribute options
    #   Answer options for multiple choice questions.
    #
    #   @return [Array<WhopSDK::Models::AdGroupUpdateParams::PlatformConfig::Meta::LeadFormConfig::Question::DependentConditionalQuestion::Option>, nil]
    optional :options,
             -> do
               WhopSDK::Internal::Type::ArrayOf[
                 WhopSDK::AdGroupUpdateParams::PlatformConfig::Meta::LeadFormConfig::Question::DependentConditionalQuestion::Option
               ]
             end,
             nil?: true

    # @!method initialize(type:, inline_context: nil, key: nil, label: nil, options: nil)
    #   A dependent conditional question (non-recursive to avoid schema recursion).
    #
    #   @param type [String] Question type (EMAIL, FULL_NAME, PHONE, CUSTOM, DATE_TIME, etc.).
    #
    #   @param inline_context [String, nil] Helper text shown below the question.
    #
    #   @param key [String, nil] Unique key for this question.
    #
    #   @param label [String, nil] Custom label for CUSTOM questions.
    #
    #   @param options [Array<WhopSDK::Models::AdGroupUpdateParams::PlatformConfig::Meta::LeadFormConfig::Question::DependentConditionalQuestion::Option>, nil] Answer options for multiple choice questions.

    class Option < WhopSDK::Internal::Type::BaseModel
      # @!attribute key
      #   Unique key for this option.
      #
      #   @return [String]
      required :key, String

      # @!attribute value
      #   Display text for this option.
      #
      #   @return [String]
      required :value, String

      # @!attribute logic
      #   Conditional logic routing for this answer option.
      #
      #   @return [WhopSDK::Models::AdGroupUpdateParams::PlatformConfig::Meta::LeadFormConfig::Question::DependentConditionalQuestion::Option::Logic, nil]
      optional :logic,
               -> {
                 WhopSDK::AdGroupUpdateParams::PlatformConfig::Meta::LeadFormConfig::Question::DependentConditionalQuestion::Option::Logic
               },
               nil?: true

      # @!method initialize(key:, value:, logic: nil)
      #   An answer option for a multiple choice lead form question.
      #
      #   @param key [String] Unique key for this option.
      #
      #   @param value [String] Display text for this option.
      #
      #   @param logic [WhopSDK::Models::AdGroupUpdateParams::PlatformConfig::Meta::LeadFormConfig::Question::DependentConditionalQuestion::Option::Logic, nil] Conditional logic routing for this answer option.

      # @see WhopSDK::Models::AdGroupUpdateParams::PlatformConfig::Meta::LeadFormConfig::Question::DependentConditionalQuestion::Option#logic
      class Logic < WhopSDK::Internal::Type::BaseModel
        # @!attribute type
        #   Logic type: go_to_question, submit_form, or close_form.
        #
        #   @return [String]
        required :type, String

        # @!attribute target_end_page_index
        #   Index of the end page to route to (for submit_form type).
        #
        #   @return [Integer, nil]
        optional :target_end_page_index, Integer, nil?: true

        # @!attribute target_question_index
        #   Index of the question to route to (for go_to_question type).
        #
        #   @return [Integer, nil]
        optional :target_question_index, Integer, nil?: true

        # @!method initialize(type:, target_end_page_index: nil, target_question_index: nil)
        #   Conditional logic routing for this answer option.
        #
        #   @param type [String] Logic type: go_to_question, submit_form, or close_form.
        #
        #   @param target_end_page_index [Integer, nil] Index of the end page to route to (for submit_form type).
        #
        #   @param target_question_index [Integer, nil] Index of the question to route to (for go_to_question type).
      end
    end
  end

  class Option < WhopSDK::Internal::Type::BaseModel
    # @!attribute key
    #   Unique key for this option.
    #
    #   @return [String]
    required :key, String

    # @!attribute value
    #   Display text for this option.
    #
    #   @return [String]
    required :value, String

    # @!attribute logic
    #   Conditional logic routing for this answer option.
    #
    #   @return [WhopSDK::Models::AdGroupUpdateParams::PlatformConfig::Meta::LeadFormConfig::Question::Option::Logic, nil]
    optional :logic,
             -> {
               WhopSDK::AdGroupUpdateParams::PlatformConfig::Meta::LeadFormConfig::Question::Option::Logic
             },
             nil?: true

    # @!method initialize(key:, value:, logic: nil)
    #   An answer option for a multiple choice lead form question.
    #
    #   @param key [String] Unique key for this option.
    #
    #   @param value [String] Display text for this option.
    #
    #   @param logic [WhopSDK::Models::AdGroupUpdateParams::PlatformConfig::Meta::LeadFormConfig::Question::Option::Logic, nil] Conditional logic routing for this answer option.

    # @see WhopSDK::Models::AdGroupUpdateParams::PlatformConfig::Meta::LeadFormConfig::Question::Option#logic
    class Logic < WhopSDK::Internal::Type::BaseModel
      # @!attribute type
      #   Logic type: go_to_question, submit_form, or close_form.
      #
      #   @return [String]
      required :type, String

      # @!attribute target_end_page_index
      #   Index of the end page to route to (for submit_form type).
      #
      #   @return [Integer, nil]
      optional :target_end_page_index, Integer, nil?: true

      # @!attribute target_question_index
      #   Index of the question to route to (for go_to_question type).
      #
      #   @return [Integer, nil]
      optional :target_question_index, Integer, nil?: true

      # @!method initialize(type:, target_end_page_index: nil, target_question_index: nil)
      #   Conditional logic routing for this answer option.
      #
      #   @param type [String] Logic type: go_to_question, submit_form, or close_form.
      #
      #   @param target_end_page_index [Integer, nil] Index of the end page to route to (for submit_form type).
      #
      #   @param target_question_index [Integer, nil] Index of the question to route to (for go_to_question type).
    end
  end
end

Instance Attribute Details

#conditional_questions_group_idString?

Group ID for conditional question routing.

Returns:

  • (String, nil)


1602
# File 'lib/whop_sdk/models/ad_group_update_params.rb', line 1602

optional :conditional_questions_group_id, String, nil?: true

#dependent_conditional_questionsArray<WhopSDK::Models::AdGroupUpdateParams::PlatformConfig::Meta::LeadFormConfig::Question::DependentConditionalQuestion>?

Questions shown conditionally based on this question’s answer.



1608
1609
1610
1611
1612
# File 'lib/whop_sdk/models/ad_group_update_params.rb', line 1608

optional :dependent_conditional_questions,
-> {
  WhopSDK::Internal::Type::ArrayOf[WhopSDK::AdGroupUpdateParams::PlatformConfig::Meta::LeadFormConfig::Question::DependentConditionalQuestion]
},
nil?: true

#inline_contextString?

Helper text shown below the question.

Returns:

  • (String, nil)


1618
# File 'lib/whop_sdk/models/ad_group_update_params.rb', line 1618

optional :inline_context, String, nil?: true

#keyString?

Unique key for this question.

Returns:

  • (String, nil)


1624
# File 'lib/whop_sdk/models/ad_group_update_params.rb', line 1624

optional :key, String, nil?: true

#labelString?

Custom label for CUSTOM questions.

Returns:

  • (String, nil)


1630
# File 'lib/whop_sdk/models/ad_group_update_params.rb', line 1630

optional :label, String, nil?: true

#optionsArray<WhopSDK::Models::AdGroupUpdateParams::PlatformConfig::Meta::LeadFormConfig::Question::Option>?

Answer options for multiple choice CUSTOM questions.



1636
1637
1638
1639
1640
# File 'lib/whop_sdk/models/ad_group_update_params.rb', line 1636

optional :options,
-> {
  WhopSDK::Internal::Type::ArrayOf[WhopSDK::AdGroupUpdateParams::PlatformConfig::Meta::LeadFormConfig::Question::Option]
},
nil?: true

#question_formatString?

UI hint: short_answer, multiple_choice, or appointment.

Returns:

  • (String, nil)


1646
# File 'lib/whop_sdk/models/ad_group_update_params.rb', line 1646

optional :question_format, String, nil?: true

#typeString

Question type (EMAIL, FULL_NAME, PHONE, CUSTOM, DATE_TIME, etc.).

Returns:

  • (String)


1596
# File 'lib/whop_sdk/models/ad_group_update_params.rb', line 1596

required :type, String