Sha256: 2dc1f920f5c479e192cb660cc06c96d23a02e7673bb4f980914c58686af196bb

Contents?: true

Size: 562 Bytes

Versions: 14

Compression:

Stored size: 562 Bytes

Contents

# frozen_string_literal: true

module EgovUtils
  module Iszr
    module Addresses
      class Fetch < ActiveInteraction::Base
        string :remote_id
        string :person_type

        def execute
          strategy_class.run!(remote_id: remote_id)
        end

        private

        def strategy_class
          case person_type
          when 'legal'
            EgovUtils::Iszr::Addresses::FetchForLegalPerson
          when 'natural'
            EgovUtils::Iszr::Addresses::FetchForNaturalPerson
          end
        end
      end
    end
  end
end

Version data entries

14 entries across 14 versions & 1 rubygems

Version Path
egov_utils-1.5.0.alpha14 app/services/egov_utils/iszr/addresses/fetch.rb
egov_utils-1.5.0.alpha13 app/services/egov_utils/iszr/addresses/fetch.rb
egov_utils-1.5.0.alpha12 app/services/egov_utils/iszr/addresses/fetch.rb
egov_utils-1.5.0.alpha11 app/services/egov_utils/iszr/addresses/fetch.rb
egov_utils-1.5.0.alpha10 app/services/egov_utils/iszr/addresses/fetch.rb
egov_utils-1.5.0.alpha9 app/services/egov_utils/iszr/addresses/fetch.rb
egov_utils-1.5.0.alpha8 app/services/egov_utils/iszr/addresses/fetch.rb
egov_utils-1.5.0.alpha7 app/services/egov_utils/iszr/addresses/fetch.rb
egov_utils-1.5.0.alpha6 app/services/egov_utils/iszr/addresses/fetch.rb
egov_utils-1.5.0.alpha5 app/services/egov_utils/iszr/addresses/fetch.rb
egov_utils-1.5.0.alpha4 app/services/egov_utils/iszr/addresses/fetch.rb
egov_utils-1.5.0.alpha3 app/services/egov_utils/iszr/addresses/fetch.rb
egov_utils-1.5.0.alpha2 app/services/egov_utils/iszr/addresses/fetch.rb
egov_utils-1.5.0.alpha1 app/services/egov_utils/iszr/addresses/fetch.rb