class Calendly::EventTypeProfile

Calendly's event type profile model.

Attributes

name[RW]

@return [String] Human-readable name for the profile of the user that's associated with the event type

owner[RW]

@return [String] The unique reference to the user associated with the profile

owner_team[RW]

@return [Team] The owner team if the profile belongs to a “team”.

owner_user[RW]

@return [User] The owner user if the profile belongs to a “user” (individual).

type[RW]

@return [String] Indicates if the profile belongs to a “user” (individual) or “team”

Public Instance Methods

type_team?() click to toggle source

whether type is team or not. @return [Boolean] @since 0.6.0

# File lib/calendly/models/event_type_profile.rb, line 40
def type_team?
  type&.downcase == 'team'
end
type_user?() click to toggle source

whether type is user or not. @return [Boolean] @since 0.6.0

# File lib/calendly/models/event_type_profile.rb, line 33
def type_user?
  type&.downcase == 'user'
end

Private Instance Methods

after_set_attributes(attrs) click to toggle source
# File lib/calendly/models/event_type_profile.rb, line 46
def after_set_attributes(attrs)
  super attrs
  if owner # rubocop:disable Style/GuardClause
    @owner_user = User.new({uri: owner}, @client) if type_user?
    @owner_team = Team.new({uri: owner}, @client) if type_team?
  end
end