Class: Google::Apis::DfareportingV2_1::Report::Schedule

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

Overview

The report's schedule. Can only be set if the report's 'dateRange' is a relative date range and the relative date range is not "TODAY".

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods included from Core::Hashable

process_value, #to_h

Constructor Details

#initialize(**args) ⇒ Schedule

Returns a new instance of Schedule



9446
9447
9448
# File 'generated/google/apis/dfareporting_v2_1/classes.rb', line 9446

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

Instance Attribute Details

#activeBoolean Also known as: active?

Whether the schedule is active or not. Must be set to either true or false. Corresponds to the JSON property active

Returns:

  • (Boolean)


9404
9405
9406
# File 'generated/google/apis/dfareporting_v2_1/classes.rb', line 9404

def active
  @active
end

#everyFixnum

Defines every how many days, weeks or months the report should be run. Needs to be set when "repeats" is either "DAILY", "WEEKLY" or "MONTHLY". Corresponds to the JSON property every

Returns:

  • (Fixnum)


9411
9412
9413
# File 'generated/google/apis/dfareporting_v2_1/classes.rb', line 9411

def every
  @every
end

#expiration_dateDate

The expiration date when the scheduled report stops running. Corresponds to the JSON property expirationDate

Returns:

  • (Date)


9416
9417
9418
# File 'generated/google/apis/dfareporting_v2_1/classes.rb', line 9416

def expiration_date
  @expiration_date
end

#repeatsString

The interval for which the report is repeated. Note:

  • "DAILY" also requires field "every" to be set.
  • "WEEKLY" also requires fields "every" and "repeatsOnWeekDays" to be set.
  • "MONTHLY" also requires fields "every" and "runsOnDayOfMonth" to be set. Corresponds to the JSON property repeats

Returns:

  • (String)


9424
9425
9426
# File 'generated/google/apis/dfareporting_v2_1/classes.rb', line 9424

def repeats
  @repeats
end

#repeats_on_week_daysArray<String>

List of week days "WEEKLY" on which scheduled reports should run. Corresponds to the JSON property repeatsOnWeekDays

Returns:

  • (Array<String>)


9429
9430
9431
# File 'generated/google/apis/dfareporting_v2_1/classes.rb', line 9429

def repeats_on_week_days
  @repeats_on_week_days
end

#runs_on_day_of_monthString

Enum to define for "MONTHLY" scheduled reports whether reports should be repeated on the same day of the month as "startDate" or the same day of the week of the month. Example: If 'startDate' is Monday, April 2nd 2012 (2012-04-02), "DAY_OF_MONTH" would run subsequent reports on the 2nd of every Month, and "WEEK_OF_MONTH" would run subsequent reports on the first Monday of the month. Corresponds to the JSON property runsOnDayOfMonth

Returns:

  • (String)


9439
9440
9441
# File 'generated/google/apis/dfareporting_v2_1/classes.rb', line 9439

def runs_on_day_of_month
  @runs_on_day_of_month
end

#start_dateDate

Start date of date range for which scheduled reports should be run. Corresponds to the JSON property startDate

Returns:

  • (Date)


9444
9445
9446
# File 'generated/google/apis/dfareporting_v2_1/classes.rb', line 9444

def start_date
  @start_date
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



9451
9452
9453
9454
9455
9456
9457
9458
9459
# File 'generated/google/apis/dfareporting_v2_1/classes.rb', line 9451

def update!(**args)
  @active = args[:active] unless args[:active].nil?
  @every = args[:every] unless args[:every].nil?
  @expiration_date = args[:expiration_date] unless args[:expiration_date].nil?
  @repeats = args[:repeats] unless args[:repeats].nil?
  @repeats_on_week_days = args[:repeats_on_week_days] unless args[:repeats_on_week_days].nil?
  @runs_on_day_of_month = args[:runs_on_day_of_month] unless args[:runs_on_day_of_month].nil?
  @start_date = args[:start_date] unless args[:start_date].nil?
end