Module: AgentClientProtocol::Schema::RequestPermissionOutcome

Defined in:
lib/agent_client_protocol/schema/types.rb

Constant Summary collapse

CANCELLED =
"cancelled".freeze
SELECTED =
"selected".freeze

Class Method Summary collapse

Class Method Details

.parse(hash) ⇒ Object



97
98
99
100
101
102
103
104
105
106
107
108
109
# File 'lib/agent_client_protocol/schema/types.rb', line 97

def self.parse(hash)
  return nil if hash.nil?
  disc = hash["outcome"]
  case disc
  when "cancelled"
    hash
  when "selected"
    obj = SelectedPermissionOutcome.from_hash(hash)
    obj
  else
    hash
  end
end