class Updox::Models::Calendar
Constants
- LIST_ENDPOINT
- LIST_NAME
- LIST_TYPE
- SYNC_ENDPOINT
Public Class Methods
find(calendar_id, account_id: , cached_query: nil)
click to toggle source
# File lib/updox/models/calendar.rb, line 31 def self.find(calendar_id, account_id: , cached_query: nil) obj = cached_query || self.query(account_id: account_id) obj.calendars.find {|calendar| calendar_id.to_s == calendar.external_id.to_s } end
query(account_id: , active_only: false)
click to toggle source
# File lib/updox/models/calendar.rb, line 37 def self.query(account_id: , active_only: false) request(endpoint: LIST_ENDPOINT, body: { activeOnly: active_only }, auth: {accountId: account_id}, required_auths: Updox::Models::Auth::AUTH_ACCT) end
Public Instance Methods
create(account_id: )
click to toggle source
# File lib/updox/models/calendar.rb, line 27 def create(account_id: ) self.class.request(endpoint: SYNC_ENDPOINT, body: self.to_h, auth: {accountId: account_id}, required_auths: Updox::Models::Auth::AUTH_ACCT) end