Class: Google::Apis::ContentV2_1::Recommendation

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

Recommendations are suggested ways to improve your merchant account's performance. For example, to engage with a feature, or start using a new Google product.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(**args) ⇒ Recommendation

Returns a new instance of Recommendation.



11671
11672
11673
# File 'lib/google/apis/content_v2_1/classes.rb', line 11671

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

Instance Attribute Details

#additional_call_to_actionArray<Google::Apis::ContentV2_1::RecommendationCallToAction>

Output only. CTAs of this recommendation. Repeated. Corresponds to the JSON property additionalCallToAction



11601
11602
11603
# File 'lib/google/apis/content_v2_1/classes.rb', line 11601

def additional_call_to_action
  @additional_call_to_action
end

#additional_descriptionsArray<Google::Apis::ContentV2_1::RecommendationDescription>

Output only. List of additional localized descriptions for a recommendation. Localication uses the languageCode field in GenerateRecommendations requests. Not all description types are guaranteed to be present and we recommend to rely on default description. Corresponds to the JSON property additionalDescriptions



11609
11610
11611
# File 'lib/google/apis/content_v2_1/classes.rb', line 11609

def additional_descriptions
  @additional_descriptions
end

#creativeArray<Google::Apis::ContentV2_1::RecommendationCreative>

Output only. Any creatives attached to the recommendation. Repeated. Corresponds to the JSON property creative



11614
11615
11616
# File 'lib/google/apis/content_v2_1/classes.rb', line 11614

def creative
  @creative
end

#default_call_to_actionGoogle::Apis::ContentV2_1::RecommendationCallToAction

Call to action (CTA) that explains how a merchant can implement this recommendation Corresponds to the JSON property defaultCallToAction



11620
11621
11622
# File 'lib/google/apis/content_v2_1/classes.rb', line 11620

def default_call_to_action
  @default_call_to_action
end

#default_descriptionString

Optional. Localized recommendation description. The localization the @link GenerateRecommendationsRequest.language_codefield in `@link ` GenerateRecommendationsRequest requests. Corresponds to the JSON property defaultDescription

Returns:

  • (String)


11627
11628
11629
# File 'lib/google/apis/content_v2_1/classes.rb', line 11627

def default_description
  @default_description
end

#numerical_impactFixnum

Optional. A numerical score of the impact from the recommendation's description. For example, a recommendation might suggest an upward trend in sales for a certain product. Higher number means larger impact. Corresponds to the JSON property numericalImpact

Returns:

  • (Fixnum)


11634
11635
11636
# File 'lib/google/apis/content_v2_1/classes.rb', line 11634

def numerical_impact
  @numerical_impact
end

Optional. Indicates whether a user needs to pay when they complete the user journey suggested by the recommendation. Corresponds to the JSON property paid

Returns:

  • (Boolean)


11640
11641
11642
# File 'lib/google/apis/content_v2_1/classes.rb', line 11640

def paid
  @paid
end

#recommendation_nameString

Optional. Localized recommendation name. The localization uses the @link GenerateRecommendationsRequest.language_codefield in `@link ` GenerateRecommendationsRequest requests. Corresponds to the JSON property recommendationName

Returns:

  • (String)


11648
11649
11650
# File 'lib/google/apis/content_v2_1/classes.rb', line 11648

def recommendation_name
  @recommendation_name
end

#sub_typeString

Optional. Subtype of the recommendations. Only applicable when multiple recommendations can be generated per type, and is used as an identifier of recommendation under the same recommendation type. Corresponds to the JSON property subType

Returns:

  • (String)


11655
11656
11657
# File 'lib/google/apis/content_v2_1/classes.rb', line 11655

def sub_type
  @sub_type
end

#titleString

Optional. Localized Recommendation Title. Localization uses the @link GenerateRecommendationsRequest.language_codefield in `@link ` GenerateRecommendationsRequest requests. Corresponds to the JSON property title

Returns:

  • (String)


11662
11663
11664
# File 'lib/google/apis/content_v2_1/classes.rb', line 11662

def title
  @title
end

#typeString

Output only. Type of the recommendation. List of currently available recommendation types: - OPPORTUNITY_CREATE_NEW_COLLECTION - OPPORTUNITY_CREATE_EMAIL_CAMPAIGN Corresponds to the JSON property type

Returns:

  • (String)


11669
11670
11671
# File 'lib/google/apis/content_v2_1/classes.rb', line 11669

def type
  @type
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



11676
11677
11678
11679
11680
11681
11682
11683
11684
11685
11686
11687
11688
# File 'lib/google/apis/content_v2_1/classes.rb', line 11676

def update!(**args)
  @additional_call_to_action = args[:additional_call_to_action] if args.key?(:additional_call_to_action)
  @additional_descriptions = args[:additional_descriptions] if args.key?(:additional_descriptions)
  @creative = args[:creative] if args.key?(:creative)
  @default_call_to_action = args[:default_call_to_action] if args.key?(:default_call_to_action)
  @default_description = args[:default_description] if args.key?(:default_description)
  @numerical_impact = args[:numerical_impact] if args.key?(:numerical_impact)
  @paid = args[:paid] if args.key?(:paid)
  @recommendation_name = args[:recommendation_name] if args.key?(:recommendation_name)
  @sub_type = args[:sub_type] if args.key?(:sub_type)
  @title = args[:title] if args.key?(:title)
  @type = args[:type] if args.key?(:type)
end