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.



11549
11550
11551
# File 'lib/google/apis/content_v2_1/classes.rb', line 11549

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)


11534
11535
11536
# File 'lib/google/apis/content_v2_1/classes.rb', line 11534

def intent
  @intent
end

#localized_textString

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

Returns:

  • (String)


11539
11540
11541
# File 'lib/google/apis/content_v2_1/classes.rb', line 11539

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)


11547
11548
11549
# File 'lib/google/apis/content_v2_1/classes.rb', line 11547

def uri
  @uri
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



11554
11555
11556
11557
11558
# File 'lib/google/apis/content_v2_1/classes.rb', line 11554

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