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

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

Overview

Image belonging to a promotion.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(**args) ⇒ Image

Returns a new instance of Image.



129
130
131
# File 'lib/google/apis/customsearch_v1/classes.rb', line 129

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

Instance Attribute Details

#heightFixnum

Image height in pixels. Corresponds to the JSON property height

Returns:

  • (Fixnum)


117
118
119
# File 'lib/google/apis/customsearch_v1/classes.rb', line 117

def height
  @height
end

#sourceString

URL of the image for this promotion link. Corresponds to the JSON property source

Returns:

  • (String)


122
123
124
# File 'lib/google/apis/customsearch_v1/classes.rb', line 122

def source
  @source
end

#widthFixnum

Image width in pixels. Corresponds to the JSON property width

Returns:

  • (Fixnum)


127
128
129
# File 'lib/google/apis/customsearch_v1/classes.rb', line 127

def width
  @width
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



134
135
136
137
138
# File 'lib/google/apis/customsearch_v1/classes.rb', line 134

def update!(**args)
  @height = args[:height] if args.key?(:height)
  @source = args[:source] if args.key?(:source)
  @width = args[:width] if args.key?(:width)
end