Sha256: c5a99c0b5c43bb67326cb8aaeb5ed28788298dd639e3092417f14c8c1768870b

Contents?: true

Size: 819 Bytes

Versions: 1

Compression:

Stored size: 819 Bytes

Contents

# frozen_string_literal: true

module FinApps
  module REST
    class ScreeningMetadatas < FinAppsCore::REST::Resources # :nodoc:
      def show(id, key)
        not_blank(id, :session_id)
        not_blank(key, :key)

        path = "screenings/#{ERB::Util.url_encode(id)}/meta/#{ERB::Util.url_encode(key)}"
        super(nil, path)
      end

      def create(id, key, value)
        not_blank(id, :session_id)
        not_blank(key, :key)
        not_blank(value, :value)

        path = "screenings/#{ERB::Util.url_encode(id)}/meta"
        super({key => value}, path)
      end

      def destroy(id, key)
        not_blank(id, :session_id)
        not_blank(key, :key)

        path = "screenings/#{ERB::Util.url_encode(id)}/meta/#{ERB::Util.url_encode(key)}"
        super(nil, path)
      end
    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
finapps-6.7.0 lib/finapps/rest/screening_metadatas.rb