Class: Google::Apis::CustomsearchV1::Promotion

Inherits:
Object
  • Object
show all
Includes:
Google::Apis::Core::Hashable, Google::Apis::Core::JsonObjectSupport
Defined in:
generated/google/apis/customsearch_v1/classes.rb,
generated/google/apis/customsearch_v1/representations.rb,
generated/google/apis/customsearch_v1/representations.rb

Overview

Promotion result.

Defined Under Namespace

Classes: BodyLine, Image

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods included from Google::Apis::Core::JsonObjectSupport

#to_json

Methods included from Google::Apis::Core::Hashable

process_value, #to_h

Constructor Details

#initialize(**args) ⇒ Promotion

Returns a new instance of Promotion.



62
63
64
# File 'generated/google/apis/customsearch_v1/classes.rb', line 62

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

Instance Attribute Details

#body_linesArray<Google::Apis::CustomsearchV1::Promotion::BodyLine>

An array of block objects for this promotion. See Google WebSearch Protocol reference for more information. Corresponds to the JSON property bodyLines



35
36
37
# File 'generated/google/apis/customsearch_v1/classes.rb', line 35

def body_lines
  @body_lines
end

An abridged version of this search's result URL, e.g. www.example.com. Corresponds to the JSON property displayLink

Returns:

  • (String)


40
41
42
# File 'generated/google/apis/customsearch_v1/classes.rb', line 40

def display_link
  @display_link
end

#html_titleString

The title of the promotion, in HTML. Corresponds to the JSON property htmlTitle

Returns:

  • (String)


45
46
47
# File 'generated/google/apis/customsearch_v1/classes.rb', line 45

def html_title
  @html_title
end

#imageGoogle::Apis::CustomsearchV1::Promotion::Image

Image belonging to a promotion. Corresponds to the JSON property image



50
51
52
# File 'generated/google/apis/customsearch_v1/classes.rb', line 50

def image
  @image
end

The URL of the promotion. Corresponds to the JSON property link

Returns:

  • (String)


55
56
57
# File 'generated/google/apis/customsearch_v1/classes.rb', line 55

def link
  @link
end

#titleString

The title of the promotion. Corresponds to the JSON property title

Returns:

  • (String)


60
61
62
# File 'generated/google/apis/customsearch_v1/classes.rb', line 60

def title
  @title
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



67
68
69
70
71
72
73
74
# File 'generated/google/apis/customsearch_v1/classes.rb', line 67

def update!(**args)
  @body_lines = args[:body_lines] if args.key?(:body_lines)
  @display_link = args[:display_link] if args.key?(:display_link)
  @html_title = args[:html_title] if args.key?(:html_title)
  @image = args[:image] if args.key?(:image)
  @link = args[:link] if args.key?(:link)
  @title = args[:title] if args.key?(:title)
end