Class: VAProfile::Models::Message
- Defined in:
- lib/va_profile/models/message.rb
Constant Summary collapse
- SEVERITY_LEVELS =
%w[ INFO WARN ERROR FATAL ].freeze
Constants inherited from Base
Class Method Summary collapse
-
.build_from(body) ⇒ VAProfile::Models::Message
Converts a decoded JSON response from VAProfile to an instance of the Message model.
Class Method Details
.build_from(body) ⇒ VAProfile::Models::Message
Converts a decoded JSON response from VAProfile to an instance of the Message model
30 31 32 33 34 35 36 37 38 |
# File 'lib/va_profile/models/message.rb', line 30 def self.build_from(body) VAProfile::Models::Message.new( code: body['code'], key: body['key'], retryable: body['potentially_self_correcting_on_retry'], severity: body['severity'], text: body['text'] ) end |