Class: Google::Apis::DfareportingV5::Report::Schedule

Inherits:
Object
  • Object
show all
Includes:
Core::Hashable, Core::JsonObjectSupport
Defined in:
lib/google/apis/dfareporting_v5/classes.rb,
lib/google/apis/dfareporting_v5/representations.rb,
lib/google/apis/dfareporting_v5/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

Constructor Details

#initialize(**args) ⇒ Schedule

Returns a new instance of Schedule.



11447
11448
11449
# File 'lib/google/apis/dfareporting_v5/classes.rb', line 11447

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)


11400
11401
11402
# File 'lib/google/apis/dfareporting_v5/classes.rb', line 11400

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)


11407
11408
11409
# File 'lib/google/apis/dfareporting_v5/classes.rb', line 11407

def every
  @every
end

#expiration_dateDate

Corresponds to the JSON property expirationDate

Returns:

  • (Date)


11412
11413
11414
# File 'lib/google/apis/dfareporting_v5/classes.rb', line 11412

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)


11420
11421
11422
# File 'lib/google/apis/dfareporting_v5/classes.rb', line 11420

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>)


11425
11426
11427
# File 'lib/google/apis/dfareporting_v5/classes.rb', line 11425

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)


11435
11436
11437
# File 'lib/google/apis/dfareporting_v5/classes.rb', line 11435

def runs_on_day_of_month
  @runs_on_day_of_month
end

#start_dateDate

Corresponds to the JSON property startDate

Returns:

  • (Date)


11440
11441
11442
# File 'lib/google/apis/dfareporting_v5/classes.rb', line 11440

def start_date
  @start_date
end

#timezoneString

The timezone when the report will run. Corresponds to the JSON property timezone

Returns:

  • (String)


11445
11446
11447
# File 'lib/google/apis/dfareporting_v5/classes.rb', line 11445

def timezone
  @timezone
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



11452
11453
11454
11455
11456
11457
11458
11459
11460
11461
# File 'lib/google/apis/dfareporting_v5/classes.rb', line 11452

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