Class: Google::Apis::ContentV2_1::InputField
- Inherits:
-
Object
- Object
- Google::Apis::ContentV2_1::InputField
- Includes:
- Google::Apis::Core::Hashable, Google::Apis::Core::JsonObjectSupport
- Defined in:
- lib/google/apis/content_v2_1/classes.rb,
lib/google/apis/content_v2_1/representations.rb,
lib/google/apis/content_v2_1/representations.rb
Overview
Input field that needs to be available to the merchant. If the field is marked as required, then a value needs to be provided for a successful processing of the request.
Instance Attribute Summary collapse
-
#checkbox_input ⇒ Google::Apis::ContentV2_1::InputFieldCheckboxInput
Checkbox input allows merchants to provide a boolean value.
-
#choice_input ⇒ Google::Apis::ContentV2_1::InputFieldChoiceInput
Choice input allows merchants to select one of the offered choices.
-
#id ⇒ String
Not for display but need to be sent back for the given input field.
-
#label ⇒ Google::Apis::ContentV2_1::TextWithTooltip
Block of text that may contain a tooltip with more information.
-
#required ⇒ Boolean
(also: #required?)
Whether the field is required.
-
#text_input ⇒ Google::Apis::ContentV2_1::InputFieldTextInput
Text input allows merchants to provide a text value.
Instance Method Summary collapse
-
#initialize(**args) ⇒ InputField
constructor
A new instance of InputField.
-
#update!(**args) ⇒ Object
Update properties of this object.
Constructor Details
#initialize(**args) ⇒ InputField
Returns a new instance of InputField.
5320 5321 5322 |
# File 'lib/google/apis/content_v2_1/classes.rb', line 5320 def initialize(**args) update!(**args) end |
Instance Attribute Details
#checkbox_input ⇒ Google::Apis::ContentV2_1::InputFieldCheckboxInput
Checkbox input allows merchants to provide a boolean value. Corresponds to the
html input type=checkbox. If merchant checks the box, the input
value for the field is true, otherwise it is false. This type of input is
often used as a confirmation that the merchant completed required steps before
they are allowed to start the action. In such a case, the input field is
marked as required and the button to trigger the action should stay disabled
until the merchant checks the box.
Corresponds to the JSON property checkboxInput
5286 5287 5288 |
# File 'lib/google/apis/content_v2_1/classes.rb', line 5286 def checkbox_input @checkbox_input end |
#choice_input ⇒ Google::Apis::ContentV2_1::InputFieldChoiceInput
Choice input allows merchants to select one of the offered choices. Some
choices may be linked to additional input fields that should be displayed
under or next to the choice option. The value for the additional input field
needs to be provided only when the specific choice is selected by the merchant.
For example, additional input field can be hidden or disabled until the
merchant selects the specific choice.
Corresponds to the JSON property choiceInput
5296 5297 5298 |
# File 'lib/google/apis/content_v2_1/classes.rb', line 5296 def choice_input @choice_input end |
#id ⇒ String
Not for display but need to be sent back for the given input field.
Corresponds to the JSON property id
5301 5302 5303 |
# File 'lib/google/apis/content_v2_1/classes.rb', line 5301 def id @id end |
#label ⇒ Google::Apis::ContentV2_1::TextWithTooltip
Block of text that may contain a tooltip with more information.
Corresponds to the JSON property label
5306 5307 5308 |
# File 'lib/google/apis/content_v2_1/classes.rb', line 5306 def label @label end |
#required ⇒ Boolean Also known as: required?
Whether the field is required. The action button needs to stay disabled till
values for all required fields are provided.
Corresponds to the JSON property required
5312 5313 5314 |
# File 'lib/google/apis/content_v2_1/classes.rb', line 5312 def required @required end |
#text_input ⇒ Google::Apis::ContentV2_1::InputFieldTextInput
Text input allows merchants to provide a text value.
Corresponds to the JSON property textInput
5318 5319 5320 |
# File 'lib/google/apis/content_v2_1/classes.rb', line 5318 def text_input @text_input end |
Instance Method Details
#update!(**args) ⇒ Object
Update properties of this object
5325 5326 5327 5328 5329 5330 5331 5332 |
# File 'lib/google/apis/content_v2_1/classes.rb', line 5325 def update!(**args) @checkbox_input = args[:checkbox_input] if args.key?(:checkbox_input) @choice_input = args[:choice_input] if args.key?(:choice_input) @id = args[:id] if args.key?(:id) @label = args[:label] if args.key?(:label) @required = args[:required] if args.key?(:required) @text_input = args[:text_input] if args.key?(:text_input) end |