class Attune::Model::AnonymousResult
Result of creating an anonymous user.
@attr [String] id Id of the anonymous user.
Constants
- ATTRIBUTE_MAP
:internal => :external
Attributes
id[RW]
Public Class Methods
new(attributes = {})
click to toggle source
# File lib/attune/models/anonymous_result.rb, line 10 def initialize(attributes = {}) return if attributes.empty? # Workaround since JSON.parse has accessors as strings rather than symbols @id = attributes["id"] || attributes[:"id"] end
Public Instance Methods
to_body()
click to toggle source
# File lib/attune/models/anonymous_result.rb, line 18 def to_body Hash[ATTRIBUTE_MAP.map do |internal, external| next unless value = send(internal) [external, value] end.compact] end
to_json(options = {})
click to toggle source
# File lib/attune/models/anonymous_result.rb, line 25 def to_json(options = {}) to_body.to_json end