Sha256: 9971ad70bf177009e63c20776d59122d47dbd539032cab66b3a58106ffe3a697

Contents?: true

Size: 874 Bytes

Versions: 42

Compression:

Stored size: 874 Bytes

Contents

# frozen_string_literal: true

module FinApps
  module REST
    class Portfolios < FinAppsCore::REST::Resources
      include FinApps::Utils::QueryBuilder

      def list(params = nil)
        return super if params.nil?
        fail FinAppsCore::InvalidArgumentsError, 'Invalid argument: params' unless params.is_a? Hash

        super build_query_path(end_point, params)
      end

      def show(id)
        not_blank(id, :id)
        super
      end

      def create(params)
        not_blank(params, :params)
        super params
      end

      def update(id, params)
        not_blank(id, :id)
        not_blank(params, :params)

        path = "#{end_point}/#{ERB::Util.url_encode(id)}"

        super params, path
      end

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

        super
      end

      # need to populate build_filter method
    end
  end
end

Version data entries

42 entries across 42 versions & 1 rubygems

Version Path
finapps-6.3.1 lib/finapps/rest/portfolios.rb
finapps-6.3.0 lib/finapps/rest/portfolios.rb
finapps-6.2.0 lib/finapps/rest/portfolios.rb
finapps-6.1.0 lib/finapps/rest/portfolios.rb
finapps-6.0.0 lib/finapps/rest/portfolios.rb
finapps-5.4.1 lib/finapps/rest/portfolios.rb
finapps-5.4.0 lib/finapps/rest/portfolios.rb
finapps-5.3.0 lib/finapps/rest/portfolios.rb
finapps-5.2.1 lib/finapps/rest/portfolios.rb
finapps-5.2.0 lib/finapps/rest/portfolios.rb
finapps-5.1.0 lib/finapps/rest/portfolios.rb
finapps-5.0.47 lib/finapps/rest/portfolios.rb
finapps-5.0.46 lib/finapps/rest/portfolios.rb
finapps-5.0.45 lib/finapps/rest/portfolios.rb
finapps-5.0.44 lib/finapps/rest/portfolios.rb
finapps-5.0.43 lib/finapps/rest/portfolios.rb
finapps-5.0.41 lib/finapps/rest/portfolios.rb
finapps-5.0.38 lib/finapps/rest/portfolios.rb
finapps-5.0.36 lib/finapps/rest/portfolios.rb
finapps-5.0.35 lib/finapps/rest/portfolios.rb