class Attune::Model::Blacklist

@attr [String] id @attr [Array<String>] ids @attr [String] consumer @attr [String] entity_type @attr [String] start_date @attr [String] end_date @attr [String] scope @attr [Boolean] disabled @attr [String] created_date @attr [String] updated_date

Constants

ATTRIBUTE_MAP

:internal => :external

Attributes

consumer[RW]
created_date[RW]
disabled[RW]
end_date[RW]
entity_type[RW]
id[RW]
ids[RW]
scope[RW]
start_date[RW]
updated_date[RW]

Public Class Methods

new(attributes = {}) click to toggle source
# File lib/attune/models/blacklist.rb, line 46
def initialize(attributes = {})
  return if attributes.empty?
  # Workaround since JSON.parse has accessors as strings rather than symbols
  @id = attributes["id"] || attributes[:"id"]
  value = attributes["ids"] || attributes[:"ids"]
  if value.is_a?(Array)
    @ids = value

  end
  # Workaround since JSON.parse has accessors as strings rather than symbols
  @consumer = attributes["consumer"] || attributes[:"consumer"]
  # Workaround since JSON.parse has accessors as strings rather than symbols
  @entity_type = attributes["entityType"] || attributes[:"entity_type"]
  # Workaround since JSON.parse has accessors as strings rather than symbols
  @start_date = attributes["startDate"] || attributes[:"start_date"]
  # Workaround since JSON.parse has accessors as strings rather than symbols
  @end_date = attributes["endDate"] || attributes[:"end_date"]
  # Workaround since JSON.parse has accessors as strings rather than symbols
  @scope = attributes["scope"] || attributes[:"scope"]
  # Workaround since JSON.parse has accessors as strings rather than symbols
  @disabled = attributes["disabled"] || attributes[:"disabled"]
  # Workaround since JSON.parse has accessors as strings rather than symbols
  @created_date = attributes["createdDate"] || attributes[:"created_date"]
  # Workaround since JSON.parse has accessors as strings rather than symbols
  @updated_date = attributes["updatedDate"] || attributes[:"updated_date"]
  

end

Public Instance Methods

to_body() click to toggle source
# File lib/attune/models/blacklist.rb, line 75
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/blacklist.rb, line 82
def to_json(options = {})
  to_body.to_json
end