Class: RubyPsigate::Credential

Inherits:
Object
  • Object
show all
Defined in:
lib/ruby_psigate/credential.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(options) ⇒ Credential

Returns a new instance of Credential.



6
7
8
9
10
11
12
13
14
15
16
17
# File 'lib/ruby_psigate/credential.rb', line 6

def initialize(options)
  @cid      = options[:CID]
  @userid   = options[:UserID]
  @password = options[:password]
  @mode     = options[:mode] || :test
  
  if @mode == :test
    @endpoint = "https://dev.psigate.com:8645/Messenger/AMMessenger"
  else
    @endpoint = "https://dev.psigate.com:8645/Messenger/AMMessenger"
  end
end

Instance Attribute Details

#cidObject (readonly)

Returns the value of attribute cid.



4
5
6
# File 'lib/ruby_psigate/credential.rb', line 4

def cid
  @cid
end

#endpointObject (readonly)

Returns the value of attribute endpoint.



4
5
6
# File 'lib/ruby_psigate/credential.rb', line 4

def endpoint
  @endpoint
end

#modeObject (readonly)

Returns the value of attribute mode.



4
5
6
# File 'lib/ruby_psigate/credential.rb', line 4

def mode
  @mode
end

#passwordObject (readonly)

Returns the value of attribute password.



4
5
6
# File 'lib/ruby_psigate/credential.rb', line 4

def password
  @password
end

#useridObject (readonly)

Returns the value of attribute userid.



4
5
6
# File 'lib/ruby_psigate/credential.rb', line 4

def userid
  @userid
end