class Calendly::OrganizationInvitation

Calendly's organization invitation model.

Constants

ASSOCIATION
TIME_FIELDS
UUID_RE

Attributes

created_at[RW]

@return [Time] Moment when user record was first created.

email[RW]

@return [String] Invited person's email.

last_sent_at[RW]

@return [Time] Moment when the last invitation was sent.

organization[RW]

@return [Organization] Reference to Organization associated with this invitation.

status[RW]

@return [String] Invitation status.

updated_at[RW]

@return [Time] Moment when user record was last updated.

uri[RW]

@return [String] Canonical resource reference.

user[RW]

@return [User] If a person accepted the invitation, a reference to their User.

uuid[RW]

@return [String] unique id of the OrganizationInvitation object.

Public Instance Methods

delete() click to toggle source

Revoke self Invitation.

@return [true] @raise [Calendly::Error] if the organization.uuid is empty. @raise [Calendly::Error] if the uuid is empty. @raise [Calendly::ApiError] if the api returns error code. @since 0.1.0

# File lib/calendly/models/organization_invitation.rb, line 73
def delete
  org_uuid = organization.uuid if organization
  client.delete_invitation org_uuid, uuid
end
fetch() click to toggle source

Get Organization Invitation associated with self.

@return [Calendly::OrganizationInvitation] @raise [Calendly::Error] if the organization.uuid is empty. @raise [Calendly::Error] if the uuid is empty. @raise [Calendly::ApiError] if the api returns error code. @since 0.1.0

# File lib/calendly/models/organization_invitation.rb, line 60
def fetch
  org_uuid = organization.uuid if organization
  client.invitation org_uuid, uuid
end