Class: PkiExpress::TrustServiceSessionResult

Inherits:
Object
  • Object
show all
Defined in:
lib/pki_express/trust_service_session_result.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(model) ⇒ TrustServiceSessionResult

Returns a new instance of TrustServiceSessionResult.



9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
# File 'lib/pki_express/trust_service_session_result.rb', line 9

def initialize(model)
  @session = nil
  @custom_state = nil
  @service = nil
  @session_type = nil
  @expires_on = nil
  
  unless model.nil?
    @session = model.fetch(:session)
    @custom_state = model.fetch(:customState)
    @service = model.fetch(:service)
    @session_type = model.fetch(:type)

    expires_on = model.fetch(:expiresOn)
    if expires_on
      @expires_on = DateTime.iso8601(expires_on)
    end
  end
end

Instance Attribute Details

#custom_stateObject

Returns the value of attribute custom_state.



7
8
9
# File 'lib/pki_express/trust_service_session_result.rb', line 7

def custom_state
  @custom_state
end

#expires_onObject

Returns the value of attribute expires_on.



7
8
9
# File 'lib/pki_express/trust_service_session_result.rb', line 7

def expires_on
  @expires_on
end

#serviceObject

Returns the value of attribute service.



7
8
9
# File 'lib/pki_express/trust_service_session_result.rb', line 7

def service
  @service
end

#sessionObject

Returns the value of attribute session.



7
8
9
# File 'lib/pki_express/trust_service_session_result.rb', line 7

def session
  @session
end

#session_typeObject

Returns the value of attribute session_type.



7
8
9
# File 'lib/pki_express/trust_service_session_result.rb', line 7

def session_type
  @session_type
end