class NexosisApi::CalendarJoinTarget

Specifies the details of a calendar data source to join to @see docs.nexosis.com/guides/calendars @since 1.2.3

Attributes

name[RW]

The name of a well-known Nexosis calendar. @return [String] @see docs.nexosis.com/guides/datasources

timezone[RW]

tz-db string name of the timezone of the calendar @return [String] @see en.wikipedia.org/wiki/List_of_tz_database_time_zones

url[RW]

The location of a public iCal to download as the datasource @return [String]

Public Class Methods

new(cal_join_hash) click to toggle source
# File lib/nexosis_api/calendar_jointarget.rb, line 6
def initialize(cal_join_hash)
  @url = cal_join_hash['url'] unless cal_join_hash.nil?
  @name = cal_join_hash['name'] unless cal_join_hash.nil?
  @timezone = cal_join_hash['timeZone'] unless cal_join_hash.nil?
end

Public Instance Methods

to_hash() click to toggle source

custom hash to match with api requests

# File lib/nexosis_api/calendar_jointarget.rb, line 27
def to_hash
  hash = { 'calendar' => {} }
  hash['calendar'].store 'url', url unless url.nil?
  hash['calendar'].store 'name', name unless name.nil?
  hash['calendar'].store 'timeZone', name unless timezone.nil?
  hash
end