Sha256: 97de0a2be77d2706445d74e876923ac7c90aa831a20a66f62f83e7a4fbb9612a

Contents?: true

Size: 850 Bytes

Versions: 23

Compression:

Stored size: 850 Bytes

Contents

module Eco
  module API
    class MicroCases
      # @param person [Ecoportal::API::V1::Person] the person we want to update, carrying the changes to be done.
      # @param options [Hash] the options.
      # @return [Array<String>] the account parameters that should not be included.
      def account_excluded(person, options)
        [].tap do |account_excluded|
          unless person.new?
            if options.dig(:exclude, :policy_groups)
              account_excluded.push("policy_group_ids")
            end

            if options.dig(:exclude, :default_tag)
              account_excluded.push("default_tag")
            end

            if options.dig(:exclude, :login_providers)
              account_excluded.push("login_provider_ids")
            end
          end
        end
      end
    end
  end
end

Version data entries

23 entries across 23 versions & 1 rubygems

Version Path
eco-helpers-3.0.21 lib/eco/api/microcases/account_excluded.rb
eco-helpers-3.0.20 lib/eco/api/microcases/account_excluded.rb
eco-helpers-3.0.19 lib/eco/api/microcases/account_excluded.rb
eco-helpers-3.0.18 lib/eco/api/microcases/account_excluded.rb
eco-helpers-3.0.17 lib/eco/api/microcases/account_excluded.rb
eco-helpers-3.0.16 lib/eco/api/microcases/account_excluded.rb
eco-helpers-3.0.15 lib/eco/api/microcases/account_excluded.rb
eco-helpers-3.0.14 lib/eco/api/microcases/account_excluded.rb
eco-helpers-3.0.13 lib/eco/api/microcases/account_excluded.rb
eco-helpers-3.0.12 lib/eco/api/microcases/account_excluded.rb
eco-helpers-3.0.11 lib/eco/api/microcases/account_excluded.rb
eco-helpers-3.0.10 lib/eco/api/microcases/account_excluded.rb
eco-helpers-3.0.9 lib/eco/api/microcases/account_excluded.rb
eco-helpers-3.0.8 lib/eco/api/microcases/account_excluded.rb
eco-helpers-3.0.7 lib/eco/api/microcases/account_excluded.rb
eco-helpers-3.0.6 lib/eco/api/microcases/account_excluded.rb
eco-helpers-3.0.5 lib/eco/api/microcases/account_excluded.rb
eco-helpers-3.0.4 lib/eco/api/microcases/account_excluded.rb
eco-helpers-3.0.3 lib/eco/api/microcases/account_excluded.rb
eco-helpers-3.0.2 lib/eco/api/microcases/account_excluded.rb