Sha256: 73856e85dd16f5ff6312386ceb48bbb0a8cfe5525390d404cd7fced407fbc4f7

Contents?: true

Size: 519 Bytes

Versions: 3

Compression:

Stored size: 519 Bytes

Contents

module Northern911Api
  class Configuration
    attr_accessor :vendor_code, :soap_passcode, :sandbox, :wsdl

    def initialize(params = {})
      @vendor_code = params[:vendor_code]
      @soap_passcode = params[:soap_passcode]
      @sandbox = params[:sandbox] || true
      @wsdl = @sandbox ? sandbox_url : live_url
    end

    def sandbox_url
      'https://soapdev.northern911.com/soap/Service.svc?wsdl'
    end

    def live_url
      'https://addressinfo.northern911.com/soap/Service.svc?wsdl'
    end
  end
end

Version data entries

3 entries across 3 versions & 2 rubygems

Version Path
northern911-client-0.1.2 lib/Northern911Api/configuration.rb
Northern911ApiClient-0.1.1 lib/Northern911Api/configuration.rb
northern911-client-0.1.1 lib/Northern911Api/configuration.rb