Class: Google::Apis::Searchads360V0::GoogleAdsSearchads360V0CommonAdScheduleInfo

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

Overview

Represents an AdSchedule criterion. AdSchedule is specified as the day of the week and a time interval within which ads will be shown. No more than six AdSchedules can be added for the same day.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(**args) ⇒ GoogleAdsSearchads360V0CommonAdScheduleInfo

Returns a new instance of GoogleAdsSearchads360V0CommonAdScheduleInfo.



64
65
66
# File 'lib/google/apis/searchads360_v0/classes.rb', line 64

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

Instance Attribute Details

#day_of_weekString

Day of the week the schedule applies to. This field is required for CREATE operations and is prohibited on UPDATE operations. Corresponds to the JSON property dayOfWeek

Returns:

  • (String)


35
36
37
# File 'lib/google/apis/searchads360_v0/classes.rb', line 35

def day_of_week
  @day_of_week
end

#end_hourFixnum

Ending hour in 24 hour time; 24 signifies end of the day. This field must be between 0 and 24, inclusive. This field is required for CREATE operations and is prohibited on UPDATE operations. Corresponds to the JSON property endHour

Returns:

  • (Fixnum)


42
43
44
# File 'lib/google/apis/searchads360_v0/classes.rb', line 42

def end_hour
  @end_hour
end

#end_minuteString

Minutes after the end hour at which this schedule ends. The schedule is exclusive of the end minute. This field is required for CREATE operations and is prohibited on UPDATE operations. Corresponds to the JSON property endMinute

Returns:

  • (String)


49
50
51
# File 'lib/google/apis/searchads360_v0/classes.rb', line 49

def end_minute
  @end_minute
end

#start_hourFixnum

Starting hour in 24 hour time. This field must be between 0 and 23, inclusive. This field is required for CREATE operations and is prohibited on UPDATE operations. Corresponds to the JSON property startHour

Returns:

  • (Fixnum)


56
57
58
# File 'lib/google/apis/searchads360_v0/classes.rb', line 56

def start_hour
  @start_hour
end

#start_minuteString

Minutes after the start hour at which this schedule starts. This field is required for CREATE operations and is prohibited on UPDATE operations. Corresponds to the JSON property startMinute

Returns:

  • (String)


62
63
64
# File 'lib/google/apis/searchads360_v0/classes.rb', line 62

def start_minute
  @start_minute
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



69
70
71
72
73
74
75
# File 'lib/google/apis/searchads360_v0/classes.rb', line 69

def update!(**args)
  @day_of_week = args[:day_of_week] if args.key?(:day_of_week)
  @end_hour = args[:end_hour] if args.key?(:end_hour)
  @end_minute = args[:end_minute] if args.key?(:end_minute)
  @start_hour = args[:start_hour] if args.key?(:start_hour)
  @start_minute = args[:start_minute] if args.key?(:start_minute)
end