Sha256: 967f48efc08d356a83759f0ef2baf299dc4ba72192eda1ac49c85c71e2684a78

Contents?: true

Size: 1.25 KB

Versions: 4

Compression:

Stored size: 1.25 KB

Contents

# 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

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
calendly-0.11.1 lib/calendly/models/invitee_no_show.rb
calendly-0.11.0 lib/calendly/models/invitee_no_show.rb
calendly-0.10.0 lib/calendly/models/invitee_no_show.rb
calendly-0.9.0 lib/calendly/models/invitee_no_show.rb