Class: HealthVault::WCData::Methods::Response::CreateAuthenticatedSessionToken::Info

Inherits:
ComplexType
  • Object
show all
Defined in:
lib/wc_data/generated/methods/response/create_authenticated_session_token/info.rb

Instance Attribute Summary

Attributes inherited from ComplexType

#tag_name

Instance Method Summary collapse

Methods inherited from ComplexType

#add_new_to_children, #element, #method_missing, #optional_elements, #parse_element, #query_elements, #required_elements, #to_s, #valid?

Constructor Details

#initializeInfo

Returns a new instance of Info.



59
60
61
62
63
64
65
66
67
68
69
70
71
# File 'lib/wc_data/generated/methods/response/create_authenticated_session_token/info.rb', line 59

def initialize
  super
  self.tag_name = 'info'

  
  @children['token'] = {:name => 'token', :class => HealthVault::WCData::Auth::Token, :value => Array.new, :min => 1, :max => 999999, :order => 1, :place => :element, :choice => 435188185 }
  

  
  @children['token-absence-reason'] = {:name => 'token-absence-reason', :class => HealthVault::WCData::Methods::Response::CreateAuthenticatedSessionToken::AppAuthTokenAbsenceReason, :value => Array.new, :min => 1, :max => 999999, :order => 2, :place => :element, :choice => 435188185 }
  

end

Dynamic Method Handling

This class handles dynamic methods through the method_missing method in the class HealthVault::WCData::ComplexType

Instance Method Details

#add_token(value) ⇒ Object

value is a HealthVault::WCData::Auth::Token



20
21
22
# File 'lib/wc_data/generated/methods/response/create_authenticated_session_token/info.rb', line 20

def add_token(value)
  @children['token'][:value] << value
end

#add_token_absence_reason(value) ⇒ Object

value is a HealthVault::WCData::Methods::Response::CreateAuthenticatedSessionToken::AppAuthTokenAbsenceReason



40
41
42
# File 'lib/wc_data/generated/methods/response/create_authenticated_session_token/info.rb', line 40

def add_token_absence_reason(value)
  @children['token-absence-reason'][:value] << value
end

#remove_token(value) ⇒ Object

value is a #HealthVault::WCData::Auth::Token



25
26
27
# File 'lib/wc_data/generated/methods/response/create_authenticated_session_token/info.rb', line 25

def remove_token(value)
    @children['token'][:value].delete(value)
end

#remove_token_absence_reason(value) ⇒ Object

value is a #HealthVault::WCData::Methods::Response::CreateAuthenticatedSessionToken::AppAuthTokenAbsenceReason



45
46
47
# File 'lib/wc_data/generated/methods/response/create_authenticated_session_token/info.rb', line 45

def remove_token_absence_reason(value)
    @children['token-absence-reason'][:value].delete(value)
end

#tokenObject

remarks: The token has a limited time-to-live. When the token expires, requests will fail with access denied. If there is no token, then there must be an absence reason. returns: a HealthVault::WCData::Auth::Token Array



33
34
35
# File 'lib/wc_data/generated/methods/response/create_authenticated_session_token/info.rb', line 33

def token
  return @children['token'][:value]
end

#token_absence_reasonObject

remarks: If the token can be created, then there will be no absence reason. returns: a HealthVault::WCData::Methods::Response::CreateAuthenticatedSessionToken::AppAuthTokenAbsenceReason Array



53
54
55
# File 'lib/wc_data/generated/methods/response/create_authenticated_session_token/info.rb', line 53

def token_absence_reason
  return @children['token-absence-reason'][:value]
end