Class: Basecamp::Types::QuestionSchedule

Inherits:
Object
  • Object
show all
Includes:
TypeHelpers
Defined in:
lib/basecamp/generated/types.rb

Overview

QuestionSchedule

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(data = {}) ⇒ QuestionSchedule

Returns a new instance of QuestionSchedule.



3519
3520
3521
3522
3523
3524
3525
3526
3527
3528
3529
# File 'lib/basecamp/generated/types.rb', line 3519

def initialize(data = {})
  @days = data["days"]
  @end_date = data["end_date"]
  @frequency = data["frequency"]
  @hour = parse_integer(data["hour"])
  @minute = parse_integer(data["minute"])
  @month_interval = parse_integer(data["month_interval"])
  @start_date = data["start_date"]
  @week_instance = parse_integer(data["week_instance"])
  @week_interval = parse_integer(data["week_interval"])
end

Instance Attribute Details

#daysObject

Returns the value of attribute days.



3517
3518
3519
# File 'lib/basecamp/generated/types.rb', line 3517

def days
  @days
end

#end_dateObject

Returns the value of attribute end_date.



3517
3518
3519
# File 'lib/basecamp/generated/types.rb', line 3517

def end_date
  @end_date
end

#frequencyObject

Returns the value of attribute frequency.



3517
3518
3519
# File 'lib/basecamp/generated/types.rb', line 3517

def frequency
  @frequency
end

#hourObject

Returns the value of attribute hour.



3517
3518
3519
# File 'lib/basecamp/generated/types.rb', line 3517

def hour
  @hour
end

#minuteObject

Returns the value of attribute minute.



3517
3518
3519
# File 'lib/basecamp/generated/types.rb', line 3517

def minute
  @minute
end

#month_intervalObject

Returns the value of attribute month_interval.



3517
3518
3519
# File 'lib/basecamp/generated/types.rb', line 3517

def month_interval
  @month_interval
end

#start_dateObject

Returns the value of attribute start_date.



3517
3518
3519
# File 'lib/basecamp/generated/types.rb', line 3517

def start_date
  @start_date
end

#week_instanceObject

Returns the value of attribute week_instance.



3517
3518
3519
# File 'lib/basecamp/generated/types.rb', line 3517

def week_instance
  @week_instance
end

#week_intervalObject

Returns the value of attribute week_interval.



3517
3518
3519
# File 'lib/basecamp/generated/types.rb', line 3517

def week_interval
  @week_interval
end

Instance Method Details

#to_hObject



3531
3532
3533
3534
3535
3536
3537
3538
3539
3540
3541
3542
3543
# File 'lib/basecamp/generated/types.rb', line 3531

def to_h
  {
    "days" => @days,
    "end_date" => @end_date,
    "frequency" => @frequency,
    "hour" => @hour,
    "minute" => @minute,
    "month_interval" => @month_interval,
    "start_date" => @start_date,
    "week_instance" => @week_instance,
    "week_interval" => @week_interval,
  }.compact
end

#to_json(*args) ⇒ Object



3545
3546
3547
# File 'lib/basecamp/generated/types.rb', line 3545

def to_json(*args)
  to_h.to_json(*args)
end