Class: GolfSwitch::Configuration

Inherits:
Object
  • Object
show all
Defined in:
lib/golf_switch/configuration.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(mode = "development") ⇒ Configuration

Returns a new instance of Configuration.



4
5
6
7
8
9
# File 'lib/golf_switch/configuration.rb', line 4

def initialize(mode="development")
  @reseller_id,@partner_id,@source_cd,@lang,@user_ip,@user_session_id,@access_key,@gs_source,@agent=nil
  @gs_debug= true
  @mode = mode
  get_golf_switch_wsdl
end

Instance Attribute Details

#access_keyObject

Returns the value of attribute access_key.



3
4
5
# File 'lib/golf_switch/configuration.rb', line 3

def access_key
  @access_key
end

#agentObject

Returns the value of attribute agent.



3
4
5
# File 'lib/golf_switch/configuration.rb', line 3

def agent
  @agent
end

#golf_switch_wsdlObject

Returns the value of attribute golf_switch_wsdl.



3
4
5
# File 'lib/golf_switch/configuration.rb', line 3

def golf_switch_wsdl
  @golf_switch_wsdl
end

#gs_debugObject

Returns the value of attribute gs_debug.



3
4
5
# File 'lib/golf_switch/configuration.rb', line 3

def gs_debug
  @gs_debug
end

#gs_sourceObject

Returns the value of attribute gs_source.



3
4
5
# File 'lib/golf_switch/configuration.rb', line 3

def gs_source
  @gs_source
end

#langObject

Returns the value of attribute lang.



3
4
5
# File 'lib/golf_switch/configuration.rb', line 3

def lang
  @lang
end

#modeObject

Returns the value of attribute mode.



3
4
5
# File 'lib/golf_switch/configuration.rb', line 3

def mode
  @mode
end

#partner_idObject

Returns the value of attribute partner_id.



3
4
5
# File 'lib/golf_switch/configuration.rb', line 3

def partner_id
  @partner_id
end

#reseller_idObject

Returns the value of attribute reseller_id.



3
4
5
# File 'lib/golf_switch/configuration.rb', line 3

def reseller_id
  @reseller_id
end

#source_cdObject

Returns the value of attribute source_cd.



3
4
5
# File 'lib/golf_switch/configuration.rb', line 3

def source_cd
  @source_cd
end

#user_ipObject

Returns the value of attribute user_ip.



3
4
5
# File 'lib/golf_switch/configuration.rb', line 3

def user_ip
  @user_ip
end

#user_session_idObject

Returns the value of attribute user_session_id.



3
4
5
# File 'lib/golf_switch/configuration.rb', line 3

def user_session_id
  @user_session_id
end

Instance Method Details

#get_golf_switch_wsdlObject



11
12
13
14
15
16
17
18
# File 'lib/golf_switch/configuration.rb', line 11

def get_golf_switch_wsdl
  if @mode=="development"
    @golf_switch_wsdl = "https://devxml.golfswitch.com/golfservice.asmx?WSDL"
  elsif @mode=="production"
    @golf_switch_wsdl="https://xml.golfswitch.com/golfService.asmx?WSDL"
  end

end