Class: Basecamp::Types::OutOfOfficePayload

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

Overview

OutOfOfficePayload

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(data = {}) ⇒ OutOfOfficePayload

Returns a new instance of OutOfOfficePayload.



2430
2431
2432
2433
# File 'lib/basecamp/generated/types.rb', line 2430

def initialize(data = {})
  @end_date = data["end_date"]
  @start_date = data["start_date"]
end

Instance Attribute Details

#end_dateObject

Returns the value of attribute end_date.



2423
2424
2425
# File 'lib/basecamp/generated/types.rb', line 2423

def end_date
  @end_date
end

#start_dateObject

Returns the value of attribute start_date.



2423
2424
2425
# File 'lib/basecamp/generated/types.rb', line 2423

def start_date
  @start_date
end

Class Method Details

.required_fieldsArray<Symbol>

Returns:

  • (Array<Symbol>)


2426
2427
2428
# File 'lib/basecamp/generated/types.rb', line 2426

def self.required_fields
  %i[end_date start_date].freeze
end

Instance Method Details

#to_hObject



2435
2436
2437
2438
2439
2440
# File 'lib/basecamp/generated/types.rb', line 2435

def to_h
  {
    "end_date" => @end_date,
    "start_date" => @start_date,
  }.compact
end

#to_json(*args) ⇒ Object



2442
2443
2444
# File 'lib/basecamp/generated/types.rb', line 2442

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