-
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.
Browse files
Browse the repository at this point in the history
support no show apis
- Loading branch information
Showing
31 changed files
with
428 additions
and
100 deletions.
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
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
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
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,54 @@ | ||
# frozen_string_literal: true | ||
|
||
module Calendly | ||
# Calendly's invitee no show model. | ||
class InviteeNoShow | ||
include ModelUtils | ||
UUID_RE = %r{\A#{Client::API_HOST}/invitee_no_shows/(#{UUID_FORMAT})\z}.freeze | ||
TIME_FIELDS = %i[created_at].freeze | ||
|
||
def self.association | ||
{ | ||
invitee: Invitee | ||
} | ||
end | ||
|
||
# @return [String] | ||
# unique id of the InviteeNoShow object. | ||
attr_accessor :uuid | ||
|
||
# @return [String] | ||
# Canonical reference (unique identifier) for the no show. | ||
attr_accessor :uri | ||
|
||
# @return [Time] | ||
# The moment when the no show was created. | ||
attr_accessor :created_at | ||
|
||
# @return [Invitee, nil] | ||
# The associated Invitee. | ||
attr_accessor :invitee | ||
|
||
# | ||
# Get Invitee No Show associated with self. | ||
# | ||
# @return [Calendly::InviteeNoShow] | ||
# @raise [Calendly::Error] if the uuid is empty. | ||
# @raise [Calendly::ApiError] if the api returns error code. | ||
# @since 0.9.0 | ||
def fetch | ||
client.invitee_no_show uuid | ||
end | ||
|
||
# | ||
# Unmarks as a No Show. | ||
# | ||
# @return [true] | ||
# @raise [Calendly::Error] if the uuid is empty. | ||
# @raise [Calendly::ApiError] if the api returns error code. | ||
# @since 0.9.0 | ||
def delete | ||
client.delete_invitee_no_show uuid | ||
end | ||
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
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
Oops, something went wrong.