Sha256: 35fa795e2cad87a1663a1d4a94218737db790f629b117640d82826fbfb1e959b

Contents?: true

Size: 630 Bytes

Versions: 9

Compression:

Stored size: 630 Bytes

Contents

# frozen_string_literal: true

module Shark
  class Consent < Base
    extend ContactService::Resource

    belongs_to :contact

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

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

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

Version data entries

9 entries across 9 versions & 1 rubygems

Version Path
bima-shark-sdk-3.1.1 lib/shark/consent.rb
bima-shark-sdk-2.5.0 lib/shark/consent.rb
bima-shark-sdk-3.1.0 lib/shark/consent.rb
bima-shark-sdk-3.0.0 lib/shark/consent.rb
bima-shark-sdk-2.4.4 lib/shark/consent.rb
bima-shark-sdk-2.4.3 lib/shark/consent.rb
bima-shark-sdk-2.4.2 lib/shark/consent.rb
bima-shark-sdk-2.4.1 lib/shark/consent.rb
bima-shark-sdk-2.4.0 lib/shark/consent.rb