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/#{UUID_FORMAT}/invitations/(#{UUID_FORMAT})\z}.freeze
- TIME_FIELDS =
%i[created_at updated_at last_sent_at].freeze
Constants included from ModelUtils
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 ⇒ Calendly::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 ⇒ Calendly::User
If a person accepted the invitation, a reference to their User.
-
#uuid ⇒ String
unique id of the OrganizationInvitation object.
Class Method Summary collapse
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.
35 36 37 |
# File 'lib/calendly/models/organization_invitation.rb', line 35 def created_at @created_at end |
#email ⇒ String
Invited person’s email.
27 28 29 |
# File 'lib/calendly/models/organization_invitation.rb', line 27 def email @email end |
#last_sent_at ⇒ Time
Moment when the last invitation was sent.
43 44 45 |
# File 'lib/calendly/models/organization_invitation.rb', line 43 def last_sent_at @last_sent_at end |
#organization ⇒ Calendly::Organization
Reference to Organization associated with this invitation.
47 48 49 |
# File 'lib/calendly/models/organization_invitation.rb', line 47 def organization @organization end |
#status ⇒ String
Invitation status.
31 32 33 |
# File 'lib/calendly/models/organization_invitation.rb', line 31 def status @status end |
#updated_at ⇒ Time
Moment when user record was last updated.
39 40 41 |
# File 'lib/calendly/models/organization_invitation.rb', line 39 def updated_at @updated_at end |
#uri ⇒ String
Canonical resource reference.
23 24 25 |
# File 'lib/calendly/models/organization_invitation.rb', line 23 def uri @uri end |
#user ⇒ Calendly::User
If a person accepted the invitation, a reference to their User.
51 52 53 |
# File 'lib/calendly/models/organization_invitation.rb', line 51 def user @user end |
#uuid ⇒ String
unique id of the OrganizationInvitation object.
19 20 21 |
# File 'lib/calendly/models/organization_invitation.rb', line 19 def uuid @uuid end |
Class Method Details
.association ⇒ Object
10 11 12 13 14 15 |
# File 'lib/calendly/models/organization_invitation.rb', line 10 def self.association { user: User, organization: Organization } end |
Instance Method Details
#delete ⇒ true
Revoke self Invitation.
73 74 75 |
# File 'lib/calendly/models/organization_invitation.rb', line 73 def delete client.delete_invitation organization&.uuid, uuid end |
#fetch ⇒ Calendly::OrganizationInvitation
Get Organization Invitation associated with self.
61 62 63 |
# File 'lib/calendly/models/organization_invitation.rb', line 61 def fetch client.invitation organization&.uuid, uuid end |