Class: Google::Apis::ContentV2_1::Action
- Inherits:
-
Object
- Object
- Google::Apis::ContentV2_1::Action
- 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
An actionable step that can be executed to solve the issue.
Instance Attribute Summary collapse
-
#builtin_simple_action ⇒ Google::Apis::ContentV2_1::BuiltInSimpleAction
Action that is implemented and performed in (your) third-party application.
-
#builtin_user_input_action ⇒ Google::Apis::ContentV2_1::BuiltInUserInputAction
Action that is implemented and performed in (your) third-party application.
-
#button_label ⇒ String
Label of the action button.
-
#external_action ⇒ Google::Apis::ContentV2_1::ExternalAction
Action that is implemented and performed outside of the third-party application.
-
#is_available ⇒ Boolean
(also: #is_available?)
Controlling whether the button is active or disabled.
-
#reasons ⇒ Array<Google::Apis::ContentV2_1::ActionReason>
List of reasons why the action is not available.
Instance Method Summary collapse
-
#initialize(**args) ⇒ Action
constructor
A new instance of Action.
-
#update!(**args) ⇒ Object
Update properties of this object.
Constructor Details
#initialize(**args) ⇒ Action
Returns a new instance of Action.
2223 2224 2225 |
# File 'lib/google/apis/content_v2_1/classes.rb', line 2223 def initialize(**args) update!(**args) end |
Instance Attribute Details
#builtin_simple_action ⇒ Google::Apis::ContentV2_1::BuiltInSimpleAction
Action that is implemented and performed in (your) third-party application.
Represents various functionality that is expected to be available to merchant
and will help them with resolving the issue. The application should point the
merchant to the place, where they can access the corresponding functionality.
If the functionality is not supported, it is recommended to explain the
situation to merchant and provide them with instructions how to solve the
issue.
Corresponds to the JSON property builtinSimpleAction
2180 2181 2182 |
# File 'lib/google/apis/content_v2_1/classes.rb', line 2180 def builtin_simple_action @builtin_simple_action end |
#builtin_user_input_action ⇒ Google::Apis::ContentV2_1::BuiltInUserInputAction
Action that is implemented and performed in (your) third-party application.
The application needs to show an additional content and input form to the
merchant. They can start the action only when they provided all required
inputs. The application will request processing of the action by calling the
triggeraction method.
Corresponds to the JSON property builtinUserInputAction
2190 2191 2192 |
# File 'lib/google/apis/content_v2_1/classes.rb', line 2190 def builtin_user_input_action @builtin_user_input_action end |
#button_label ⇒ String
Label of the action button.
Corresponds to the JSON property buttonLabel
2195 2196 2197 |
# File 'lib/google/apis/content_v2_1/classes.rb', line 2195 def @button_label end |
#external_action ⇒ Google::Apis::ContentV2_1::ExternalAction
Action that is implemented and performed outside of the third-party
application. It should redirect the merchant to the provided URL of an
external system where they can perform the action. For example to request a
review in the Merchant Center.
Corresponds to the JSON property externalAction
2203 2204 2205 |
# File 'lib/google/apis/content_v2_1/classes.rb', line 2203 def external_action @external_action end |
#is_available ⇒ Boolean Also known as: is_available?
Controlling whether the button is active or disabled. The value is 'false'
when the action was already requested or is not available. If the action is
not available then a reason will be present. If (your) third-party application
shows a disabled button for action that is not available, then it should also
show reasons.
Corresponds to the JSON property isAvailable
2212 2213 2214 |
# File 'lib/google/apis/content_v2_1/classes.rb', line 2212 def is_available @is_available end |
#reasons ⇒ Array<Google::Apis::ContentV2_1::ActionReason>
List of reasons why the action is not available. The list of reasons is empty
if the action is available. If there is only one reason, it can be displayed
next to the disabled button. If there are more reasons, all of them should be
displayed, for example in a pop-up dialog.
Corresponds to the JSON property reasons
2221 2222 2223 |
# File 'lib/google/apis/content_v2_1/classes.rb', line 2221 def reasons @reasons end |
Instance Method Details
#update!(**args) ⇒ Object
Update properties of this object
2228 2229 2230 2231 2232 2233 2234 2235 |
# File 'lib/google/apis/content_v2_1/classes.rb', line 2228 def update!(**args) @builtin_simple_action = args[:builtin_simple_action] if args.key?(:builtin_simple_action) @builtin_user_input_action = args[:builtin_user_input_action] if args.key?(:builtin_user_input_action) @button_label = args[:button_label] if args.key?(:button_label) @external_action = args[:external_action] if args.key?(:external_action) @is_available = args[:is_available] if args.key?(:is_available) @reasons = args[:reasons] if args.key?(:reasons) end |