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

Methods included from Core::JsonObjectSupport

#to_json

Methods included from Core::Hashable

process_value, #to_h

Constructor Details

#initialize(**args) ⇒ AdSize

Returns a new instance of AdSize



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

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)


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

def height
  @height
end

#size_typeString

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

Returns:

  • (String)


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

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)


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

def width
  @width
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



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

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