lib/attune/models/blacklist.rb in attune-1.0.9 vs lib/attune/models/blacklist.rb in attune-1.0.10
- old
+ new
@@ -1,72 +1,78 @@
module Attune
module Model
#
#
# @attr [String] id
- # @attr [Boolean] disabled
- # @attr [String] consumer
# @attr [String] entity_type
- # @attr [String] start_date
+ # @attr [String] consumer
# @attr [String] end_date
+ # @attr [Boolean] disabled
# @attr [String] created_at
- # @attr [Array<String>] ids
+ # @attr [String] start_date
# @attr [Array<String>] scope
+ # @attr [Array<String>] ids
+ # @attr [Boolean] active
class Blacklist
attr_accessor :id
- attr_accessor :disabled
+ attr_accessor :entity_type
attr_accessor :consumer
- attr_accessor :entity_type
+ attr_accessor :end_date
- attr_accessor :start_date
+ attr_accessor :disabled
- attr_accessor :end_date
+ attr_accessor :created_at
- attr_accessor :created_at
+ attr_accessor :start_date
+ attr_accessor :scope
+
+
attr_accessor :ids
- attr_accessor :scope
+ attr_accessor :active
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
- @disabled = attributes["disabled"] || attributes[:"disabled"]
+ @entity_type = attributes["entityType"] || attributes[:"entity_type"]
# 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
+ @disabled = attributes["disabled"] || attributes[:"disabled"]
+ # Workaround since JSON.parse has accessors as strings rather than symbols
@created_at = attributes["createdAt"] || attributes[:"created_at"]
- value = attributes["ids"] || attributes[:"ids"]
+ # Workaround since JSON.parse has accessors as strings rather than symbols
+ @start_date = attributes["startDate"] || attributes[:"start_date"]
+ value = attributes["scope"] || attributes[:"scope"]
if value.is_a?(Array)
- @ids = value
+ @scope = value
end
- value = attributes["scope"] || attributes[:"scope"]
+ value = attributes["ids"] || attributes[:"ids"]
if value.is_a?(Array)
- @scope = value
+ @ids = value
end
+ # Workaround since JSON.parse has accessors as strings rather than symbols
+ @active = attributes["active"] || attributes[:"active"]
end
def to_body
@@ -82,17 +88,18 @@
private
# :internal => :external
ATTRIBUTE_MAP = {
:id => :id,
- :disabled => :disabled,
- :consumer => :consumer,
:entity_type => :entityType,
- :start_date => :startDate,
+ :consumer => :consumer,
:end_date => :endDate,
+ :disabled => :disabled,
:created_at => :createdAt,
+ :start_date => :startDate,
+ :scope => :scope,
:ids => :ids,
- :scope => :scope
+ :active => :active
}
end
end
end