Class: Attune::Model::BlacklistGetResponse

Inherits:
Object
  • Object
show all
Defined in:
lib/attune/models/blacklist_get_response.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(attributes = {}) ⇒ BlacklistGetResponse

Returns a new instance of BlacklistGetResponse.



10
11
12
13
14
15
16
17
18
19
# File 'lib/attune/models/blacklist_get_response.rb', line 10

def initialize(attributes = {})
  return if attributes.empty?
  value = attributes["blacklists"] || attributes[:"blacklists"]
  if value.is_a?(Array)
    @blacklists = value.map{ |v| Blacklist.new(v) }

  end
  

end

Instance Attribute Details

#blacklistsArray<Attune::Model::Blacklist>

Returns the current value of blacklists.

Returns:



6
7
8
# File 'lib/attune/models/blacklist_get_response.rb', line 6

def blacklists
  @blacklists
end

Instance Method Details

#to_bodyObject



21
22
23
24
25
26
# File 'lib/attune/models/blacklist_get_response.rb', line 21

def to_body
  Hash[ATTRIBUTE_MAP.map do |internal, external|
    next unless value = send(internal)
    [external, value]
  end.compact]
end

#to_json(options = {}) ⇒ Object



28
29
30
# File 'lib/attune/models/blacklist_get_response.rb', line 28

def to_json(options = {})
  to_body.to_json
end