Class: Google::Apis::ContentV2_1::RecommendationCallToAction

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

Call to action (CTA) that explains how a merchant can implement this recommendation

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(**args) ⇒ RecommendationCallToAction

Returns a new instance of RecommendationCallToAction.



11716
11717
11718
# File 'lib/google/apis/content_v2_1/classes.rb', line 11716

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

Instance Attribute Details

#intentString

Output only. Intent of the action. This value describes the intent (for example, OPEN_CREATE_EMAIL_CAMPAIGN_FLOW) and can vary from recommendation to recommendation. This value can change over time for the same recommendation. Currently available intent values: - OPEN_CREATE_EMAIL_CAMPAIGN_FLOW: Opens a user journey where they can create a marketing email campaign. (No default URL)

  • OPEN_CREATE_COLLECTION_TAB: Opens a user journey where they can create a collection for their Merchant account. (No default URL) Corresponds to the JSON property intent

Returns:

  • (String)


11701
11702
11703
# File 'lib/google/apis/content_v2_1/classes.rb', line 11701

def intent
  @intent
end

#localized_textString

Output only. Localized text of the CTA. Optional. Corresponds to the JSON property localizedText

Returns:

  • (String)


11706
11707
11708
# File 'lib/google/apis/content_v2_1/classes.rb', line 11706

def localized_text
  @localized_text
end

#uriString

Optional. URL of the CTA. This field will only be set for some recommendations where there is a suggested landing URL. Otherwise it will be set to an empty string. We recommend developers to use their own custom landing page according to the description of the intent field above when this uri field is empty. Corresponds to the JSON property uri

Returns:

  • (String)


11714
11715
11716
# File 'lib/google/apis/content_v2_1/classes.rb', line 11714

def uri
  @uri
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



11721
11722
11723
11724
11725
# File 'lib/google/apis/content_v2_1/classes.rb', line 11721

def update!(**args)
  @intent = args[:intent] if args.key?(:intent)
  @localized_text = args[:localized_text] if args.key?(:localized_text)
  @uri = args[:uri] if args.key?(:uri)
end