Class: Calendly::OrganizationInvitation
- Inherits:
-
Object
- Object
- Calendly::OrganizationInvitation
- Includes:
- ModelUtils
- Defined in:
- lib/calendly/models/organization_invitation.rb
Overview
Calendly’s organization invitation model.
Constant Summary collapse
- UUID_RE =
%r{\A#{Client::API_HOST}/organizations/\w+/invitations/(\w+)\z}.freeze
- TIME_FIELDS =
%i[created_at updated_at last_sent_at].freeze
- ASSOCIATION =
{user: User, organization: Organization}.freeze
Instance Attribute Summary collapse
-
#created_at ⇒ Time
Moment when user record was first created.
-
#email ⇒ String
Invited person’s email.
-
#last_sent_at ⇒ Time
Moment when the last invitation was sent.
-
#organization ⇒ Organization
Reference to Organization associated with this invitation.
-
#status ⇒ String
Invitation status.
-
#updated_at ⇒ Time
Moment when user record was last updated.
-
#uri ⇒ String
Canonical resource reference.
-
#user ⇒ User
If a person accepted the invitation, a reference to their User.
-
#uuid ⇒ String
unique id of the OrganizationInvitation object.
Instance Method Summary collapse
-
#delete ⇒ true
Revoke self Invitation.
-
#fetch ⇒ Calendly::OrganizationInvitation
Get Organization Invitation associated with self.
Methods included from ModelUtils
#client, #id, included, #initialize, #inspect
Instance Attribute Details
#created_at ⇒ Time
Moment when user record was first created.
30 31 32 |
# File 'lib/calendly/models/organization_invitation.rb', line 30 def created_at @created_at end |
#email ⇒ String
Invited person’s email.
24 25 26 |
# File 'lib/calendly/models/organization_invitation.rb', line 24 def email @email end |
#last_sent_at ⇒ Time
Moment when the last invitation was sent.
36 37 38 |
# File 'lib/calendly/models/organization_invitation.rb', line 36 def last_sent_at @last_sent_at end |
#organization ⇒ Organization
Reference to Organization associated with this invitation.
40 41 42 |
# File 'lib/calendly/models/organization_invitation.rb', line 40 def organization @organization end |
#status ⇒ String
Invitation status.
27 28 29 |
# File 'lib/calendly/models/organization_invitation.rb', line 27 def status @status end |
#updated_at ⇒ Time
Moment when user record was last updated.
33 34 35 |
# File 'lib/calendly/models/organization_invitation.rb', line 33 def updated_at @updated_at end |
#uri ⇒ String
Canonical resource reference.
21 22 23 |
# File 'lib/calendly/models/organization_invitation.rb', line 21 def uri @uri end |
#user ⇒ User
If a person accepted the invitation, a reference to their User.
44 45 46 |
# File 'lib/calendly/models/organization_invitation.rb', line 44 def user @user end |
#uuid ⇒ String
unique id of the OrganizationInvitation object.
18 19 20 |
# File 'lib/calendly/models/organization_invitation.rb', line 18 def uuid @uuid end |
Instance Method Details
#delete ⇒ true
Revoke self Invitation.
67 68 69 70 |
# File 'lib/calendly/models/organization_invitation.rb', line 67 def delete org_uuid = organization.uuid if organization client.delete_invitation org_uuid, uuid end |
#fetch ⇒ Calendly::OrganizationInvitation
Get Organization Invitation associated with self.
54 55 56 57 |
# File 'lib/calendly/models/organization_invitation.rb', line 54 def fetch org_uuid = organization.uuid if organization client.invitation org_uuid, uuid end |