Sha256: 1d0924d6460b98d6b7efbe014dce2506830adf06c04e0c9c18b0ffdf5f849fa6

Contents?: true

Size: 1.71 KB

Versions: 5

Compression:

Stored size: 1.71 KB

Contents

# frozen_string_literal: true

module Shark
  module AssetService
    module Resource
      mattr_accessor :site
    end
  end

  module ContactService
    module Resource
      mattr_accessor :site
    end
  end

  module DoubleOptIn
    class ExceededNumberOfVerificationRequestsError < Error; end
    class RequestedUnverifiedExecutionError < Error; end
    class VerificationExpiredError < Error; end

    module Resource
      mattr_accessor :site
    end
  end

  module NotificationService
    module Resource
      mattr_accessor :site
    end
  end

  module SubscriptionService
    module Resource
      mattr_accessor :site
    end
  end

  module SurveyService
    module Resource
      mattr_accessor :site
    end
  end

  class Configuration
    class Service
      attr_accessor :site
      attr_reader :headers

      def initialize
        @headers = {}
      end

      def headers=(value)
        @headers.merge!(value)
      end
    end

    #
    # Shark Configuration
    #
    attr_accessor :cache, :logger
    attr_reader :contact_service
    attr_reader :consent_service
    attr_reader :double_opt_in
    attr_reader :form_service
    attr_reader :survey_service
    attr_reader :notification_service
    attr_reader :subscription_service
    attr_reader :asset_service
    attr_reader :mailing_service

    def initialize
      @asset_service = AssetService::Resource
      @contact_service = ContactService::Resource
      @double_opt_in = DoubleOptIn::Resource
      @form_service = Service.new
      @mailing_service = Service.new
      @notification_service = NotificationService::Resource
      @subscription_service = SubscriptionService::Resource
      @survey_service = SurveyService::Resource
    end
  end
end

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
bima-shark-sdk-2.4.4 lib/shark/configuration.rb
bima-shark-sdk-2.4.3 lib/shark/configuration.rb
bima-shark-sdk-2.4.2 lib/shark/configuration.rb
bima-shark-sdk-2.4.1 lib/shark/configuration.rb
bima-shark-sdk-2.4.0 lib/shark/configuration.rb