Sha256: 5670ac0a14f74d5ce7758cd8aca4b8fe8451e68692bd26d3aaf52e4cca43de80

Contents?: true

Size: 817 Bytes

Versions: 1

Compression:

Stored size: 817 Bytes

Contents

module Attune
  module Model
    # 
    #
    # @attr [Array<Attune::Model::Blacklist>] blacklists
    class BlacklistGetResponse
      attr_accessor :blacklists
      

      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

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

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

      private
      # :internal => :external
      ATTRIBUTE_MAP = {
          :blacklists => :blacklists

        }
    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
attune-1.0.6 lib/attune/models/blacklist_get_response.rb