Sha256: a24d2b20128a21fcd708d3ac8641de88d91c08cb3bc608fe63f747f588bd825f

Contents?: true

Size: 878 Bytes

Versions: 4

Compression:

Stored size: 878 Bytes

Contents

# frozen_string_literal: true

module HubSpot
  class Configuration
    ATTRIBUTES = %i[api_host client_id client_secret redirect_uri refresh_token logger].freeze

    class << self
      attr_accessor(*ATTRIBUTES)

      def client_id=(value)
        raise ArgumentError, "client_id cannot be blank" if value.nil? || value.empty?
        @client_id = value
      end

      def client_secret=(value)
        raise ArgumentError, "client_secret cannot be blank" if value.nil? || value.empty?
        @client_secret = value
      end

      def redirect_uri=(value)
        raise ArgumentError, "redirect_uri cannot be blank" if value.nil? || value.empty?
        @redirect_uri = value
      end

      def refresh_token=(value)
        raise ArgumentError, "refresh_token cannot be blank" if value.nil? || value.empty?
        @refresh_token = value
      end
    end
  end
end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
hub_spot-0.3.1 lib/hub_spot/configuration.rb
hub_spot-0.3.0 lib/hub_spot/configuration.rb
hub_spot-0.2.1 lib/hub_spot/configuration.rb
hub_spot-0.2.0 lib/hub_spot/configuration.rb