Class: Google::Apis::Adexchangebuyer2V2beta1::AdSize

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

Overview

Represents size of a single ad slot, or a creative.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(**args) ⇒ AdSize

Returns a new instance of AdSize.



107
108
109
# File 'generated/google/apis/adexchangebuyer2_v2beta1/classes.rb', line 107

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

Instance Attribute Details

#heightFixnum

The height of the ad slot in pixels. This field will be present only when size type is PIXEL. Corresponds to the JSON property height

Returns:

  • (Fixnum)


94
95
96
# File 'generated/google/apis/adexchangebuyer2_v2beta1/classes.rb', line 94

def height
  @height
end

#size_typeString

The size type of the ad slot. Corresponds to the JSON property sizeType

Returns:

  • (String)


99
100
101
# File 'generated/google/apis/adexchangebuyer2_v2beta1/classes.rb', line 99

def size_type
  @size_type
end

#widthFixnum

The width of the ad slot in pixels. This field will be present only when size type is PIXEL. Corresponds to the JSON property width

Returns:

  • (Fixnum)


105
106
107
# File 'generated/google/apis/adexchangebuyer2_v2beta1/classes.rb', line 105

def width
  @width
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



112
113
114
115
116
# File 'generated/google/apis/adexchangebuyer2_v2beta1/classes.rb', line 112

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