-
Notifications
You must be signed in to change notification settings - Fork 10
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #60 from koshilife/feature/#59_support_activity_log
support Activity Log API
- Loading branch information
Showing
9 changed files
with
334 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,50 @@ | ||
# frozen_string_literal: true | ||
|
||
module Calendly | ||
# Calendly's activity log entry model. | ||
class ActivityLogEntry | ||
include ModelUtils | ||
UUID_RE = %r{\A#{Client::API_HOST}/activity_log_entries/(#{UUID_FORMAT})\z}.freeze | ||
TIME_FIELDS = %i[occurred_at].freeze | ||
|
||
def self.association | ||
{ | ||
organization: Organization | ||
} | ||
end | ||
|
||
# @return [String] | ||
# unique id of the ActivityLogEntry object. | ||
attr_accessor :uuid | ||
|
||
# @return [String] | ||
# Canonical reference (unique identifier) for the activity log entry. | ||
attr_accessor :uri | ||
|
||
# @return [Time] | ||
# The date and time of the entry. | ||
attr_accessor :occurred_at | ||
|
||
# @return [Hash] | ||
# The Calendly actor that took the action creating the activity log entry. | ||
attr_accessor :actor | ||
|
||
# @return [Hash] | ||
attr_accessor :details | ||
|
||
# @return [String] | ||
attr_accessor :fully_qualified_name | ||
|
||
# @return [String] | ||
# The category associated with the entry. | ||
attr_accessor :namespace | ||
|
||
# @return [String] | ||
# The action associated with the entry. | ||
attr_accessor :action | ||
|
||
# @return [Organization] | ||
# The organization associated with the entry. | ||
attr_accessor :organization | ||
end | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
# frozen_string_literal: true | ||
|
||
module Calendly | ||
VERSION = '0.13.0' | ||
VERSION = '0.14.0' | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,61 @@ | ||
{ | ||
"collection": [ | ||
{ | ||
"occurred_at": "2022-10-07T14:21:42.104549Z", | ||
"actor": { | ||
"uri": "https://api.calendly.com/users/U001", | ||
"type": "User", | ||
"organization": { | ||
"uri": "https://api.calendly.com/organizations/ORG001", | ||
"role": "owner" | ||
}, | ||
"group": { | ||
"uri": "https://api.calendly.com/groups/GROUP001", | ||
"name": "Development", | ||
"role": "member" | ||
}, | ||
"display_name": "Sam Smith", | ||
"alternative_identifier": "sam.smith@gmail.com" | ||
}, | ||
"details": { | ||
"name": "test token" | ||
}, | ||
"organization": "https://api.calendly.com/organizations/ORG001", | ||
"fully_qualified_name": "API.Token_Created", | ||
"namespace": "API", | ||
"action": "Token_Created", | ||
"uri": "https://api.calendly.com/activity_log_entries/ACTIVITY_LOG_ENTRY002" | ||
}, | ||
{ | ||
"occurred_at": "2022-09-26T13:41:43.915498Z", | ||
"actor": { | ||
"type": "System", | ||
"display_name": "Calendly System" | ||
}, | ||
"details": { | ||
"type": "Invitee list", | ||
"id": "893c514a-b6f7-4599-86f9-4273d16bfe43", | ||
"emails": [ | ||
"alex.smith@gmail.com" | ||
], | ||
"requested_by": "Sam Smith", | ||
"uri": "https://api.calendly.com/users/LOG001" | ||
}, | ||
"organization": "https://api.calendly.com/organizations/ORG001", | ||
"fully_qualified_name": "Compliance.Data_Deletion_Completed", | ||
"namespace": "Compliance", | ||
"action": "Data_Deletion_Completed", | ||
"uri": "https://api.calendly.com/activity_log_entries/ACTIVITY_LOG_ENTRY001" | ||
} | ||
], | ||
"pagination": { | ||
"count": 20, | ||
"next_page": null, | ||
"next_page_token": null, | ||
"previous_page": null, | ||
"previous_page_token": null | ||
}, | ||
"total_count": 2, | ||
"exceeds_max_total_count": false, | ||
"last_event_time": "2022-10-07T14:21:42Z" | ||
} |