Class: Attune::Model::BlacklistSaveResponse
- Inherits:
-
Object
- Object
- Attune::Model::BlacklistSaveResponse
- Defined in:
- lib/attune/models/blacklist_save_response.rb
Instance Attribute Summary collapse
-
#id ⇒ String
The current value of id.
-
#result ⇒ String
The current value of result.
Instance Method Summary collapse
-
#initialize(attributes = {}) ⇒ BlacklistSaveResponse
constructor
A new instance of BlacklistSaveResponse.
- #to_body ⇒ Object
- #to_json(options = {}) ⇒ Object
Constructor Details
#initialize(attributes = {}) ⇒ BlacklistSaveResponse
Returns a new instance of BlacklistSaveResponse.
14 15 16 17 18 19 20 21 22 |
# File 'lib/attune/models/blacklist_save_response.rb', line 14 def initialize(attributes = {}) return if attributes.empty? # Workaround since JSON.parse has accessors as strings rather than symbols @id = attributes["id"] || attributes[:"id"] # Workaround since JSON.parse has accessors as strings rather than symbols @result = attributes["result"] || attributes[:"result"] end |
Instance Attribute Details
#id ⇒ String
Returns the current value of id.
7 8 9 |
# File 'lib/attune/models/blacklist_save_response.rb', line 7 def id @id end |
#result ⇒ String
Returns the current value of result.
7 8 9 |
# File 'lib/attune/models/blacklist_save_response.rb', line 7 def result @result end |
Instance Method Details
#to_body ⇒ Object
24 25 26 27 28 29 |
# File 'lib/attune/models/blacklist_save_response.rb', line 24 def to_body Hash[ATTRIBUTE_MAP.map do |internal, external| next unless value = send(internal) [external, value] end.compact] end |
#to_json(options = {}) ⇒ Object
31 32 33 |
# File 'lib/attune/models/blacklist_save_response.rb', line 31 def to_json( = {}) to_body.to_json end |