Class: Google::Apis::ContentV2_1::Action

Inherits:
Object
  • Object
show all
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

Instance Method Summary collapse

Constructor Details

#initialize(**args) ⇒ Action

Returns a new instance of Action.



2175
2176
2177
# File 'lib/google/apis/content_v2_1/classes.rb', line 2175

def initialize(**args)
   update!(**args)
end

Instance Attribute Details

#builtin_simple_actionGoogle::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



2132
2133
2134
# File 'lib/google/apis/content_v2_1/classes.rb', line 2132

def builtin_simple_action
  @builtin_simple_action
end

#builtin_user_input_actionGoogle::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



2142
2143
2144
# File 'lib/google/apis/content_v2_1/classes.rb', line 2142

def builtin_user_input_action
  @builtin_user_input_action
end

#button_labelString

Label of the action button. Corresponds to the JSON property buttonLabel

Returns:

  • (String)


2147
2148
2149
# File 'lib/google/apis/content_v2_1/classes.rb', line 2147

def button_label
  @button_label
end

#external_actionGoogle::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



2155
2156
2157
# File 'lib/google/apis/content_v2_1/classes.rb', line 2155

def external_action
  @external_action
end

#is_availableBoolean 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

Returns:

  • (Boolean)


2164
2165
2166
# File 'lib/google/apis/content_v2_1/classes.rb', line 2164

def is_available
  @is_available
end

#reasonsArray<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



2173
2174
2175
# File 'lib/google/apis/content_v2_1/classes.rb', line 2173

def reasons
  @reasons
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



2180
2181
2182
2183
2184
2185
2186
2187
# File 'lib/google/apis/content_v2_1/classes.rb', line 2180

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