Sha256: 9efa19958e788a8ba1585e407eaa36ea738752d329dcde6ca7bd9d1b549cd7ba
Contents?: true
Size: 1015 Bytes
Versions: 14
Compression:
Stored size: 1015 Bytes
Contents
module TrackerApi module Resources class Webhook include Shared::Base attribute :client attribute :kind, String attribute :project_id, Integer attribute :webhook_url, String attribute :webhook_version, String attribute :created_at, DateTime attribute :updated_at, DateTime class UpdateRepresenter < Representable::Decorator include Representable::JSON property :project_id property :webhook_url property :webhook_version end def delete raise ArgumentError, 'Can not delete a webhook with an unknown project_id.' if project_id.nil? Endpoints::Webhook.new(client).delete(self) end # Save changes to an existing Webhook. def save raise ArgumentError, 'Can not update a webhook with an unknown project_id.' if project_id.nil? Endpoints::Webhook.new(client).update(self, UpdateRepresenter.new(Webhook.new(self.dirty_attributes))) end end end end
Version data entries
14 entries across 14 versions & 1 rubygems