Sha256: d10b1e1c2e70cfd424a5f251155fa42bd69d22f3170e4fe245322dfa432f6fb5

Contents?: true

Size: 789 Bytes

Versions: 2

Compression:

Stored size: 789 Bytes

Contents

# frozen_string_literal: true

module Shark
  class Consent < Base
    extend ConsentService::Resource

    def self.all
      raise Shark::ActionNotSupportedError,
            'Shark::ConsentService::Consent.all is not supported'
    end

    def update_attributes(_attributes = {})
      raise Shark::ActionNotSupportedError,
            'Shark::ConsentService::Consent#update_attributes is not supported'
    end

    def destroy
      raise Shark::ActionNotSupportedError,
            'Shark::ConsentService::Consent#destroy is not supported'
    end

    def save
      if self['id'].present?
        raise Shark::ActionNotSupportedError,
              'Shark::ConsentService::Consent#save is not supported for persisted consents'
      else
        super
      end
    end
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
bima-shark-sdk-2.3.1 lib/shark/consent.rb
bima-shark-sdk-2.3.0 lib/shark/consent.rb