Sha256: 22716d24909787f598b40edb653804050fad26ed15653dc45ba771115efbd188

Contents?: true

Size: 526 Bytes

Versions: 32

Compression:

Stored size: 526 Bytes

Contents

module Ecoportal
  module API
    class Internal
      class Person

        def new?(doc = :initial)
          ref_doc = (doc == :original) ? original_doc : initial_doc
          !ref_doc["details"] && !ref_doc["account"]
        end

        # @return [Boolean] if the account has been added, compared to `doc`
        def account_added?(doc = :initial)
          ref_doc = (doc == :original) ? original_doc : initial_doc
          account && !ref_doc["account"]
        end

      end
    end
  end
end

Version data entries

32 entries across 32 versions & 1 rubygems

Version Path
eco-helpers-2.0.57 lib/eco/api/common/version_patches/ecoportal_api/internal_person.rb
eco-helpers-2.0.56 lib/eco/api/common/version_patches/ecoportal_api/internal_person.rb
eco-helpers-2.0.55 lib/eco/api/common/version_patches/ecoportal_api/internal_person.rb
eco-helpers-2.0.54 lib/eco/api/common/version_patches/ecoportal_api/internal_person.rb
eco-helpers-2.0.53 lib/eco/api/common/version_patches/ecoportal_api/internal_person.rb
eco-helpers-2.0.52 lib/eco/api/common/version_patches/ecoportal_api/internal_person.rb
eco-helpers-2.0.51 lib/eco/api/common/version_patches/ecoportal_api/internal_person.rb
eco-helpers-2.0.50 lib/eco/api/common/version_patches/ecoportal_api/internal_person.rb
eco-helpers-2.0.49 lib/eco/api/common/version_patches/ecoportal_api/internal_person.rb
eco-helpers-2.0.48 lib/eco/api/common/version_patches/ecoportal_api/internal_person.rb
eco-helpers-2.0.47 lib/eco/api/common/version_patches/ecoportal_api/internal_person.rb
eco-helpers-2.0.46 lib/eco/api/common/version_patches/ecoportal_api/internal_person.rb
eco-helpers-2.0.45 lib/eco/api/common/version_patches/ecoportal_api/internal_person.rb
eco-helpers-2.0.44 lib/eco/api/common/version_patches/ecoportal_api/internal_person.rb
eco-helpers-2.0.43 lib/eco/api/common/version_patches/ecoportal_api/internal_person.rb
eco-helpers-2.0.42 lib/eco/api/common/version_patches/ecoportal_api/internal_person.rb
eco-helpers-2.0.41 lib/eco/api/common/version_patches/ecoportal_api/internal_person.rb
eco-helpers-2.0.40 lib/eco/api/common/version_patches/ecoportal_api/internal_person.rb
eco-helpers-2.0.39 lib/eco/api/common/version_patches/ecoportal_api/internal_person.rb
eco-helpers-2.0.38 lib/eco/api/common/version_patches/ecoportal_api/internal_person.rb