Sha256: 548f2ddd3e15d84706591bdf9ed217d9827f081ad0ef99df9c8e2c1224f643a3
Contents?: true
Size: 1.28 KB
Versions: 14
Compression:
Stored size: 1.28 KB
Contents
# bandwidth # # This file was automatically generated by APIMATIC v2.0 # ( https://apimatic.io ). module Bandwidth # A session object class Session < BaseModel SKIP = Object.new private_constant :SKIP # Unique id of the session # @return [String] attr_accessor :id # User defined tag to associate with the session # @return [String] attr_accessor :tag # A mapping from model property names to API property names. def self.names @_hash = {} if @_hash.nil? @_hash['id'] = 'id' @_hash['tag'] = 'tag' @_hash end # An array for optional fields def optionals %w[ id tag ] end # An array for nullable fields def nullables [] end def initialize(id = nil, tag = nil) @id = id unless id == SKIP @tag = tag unless tag == SKIP end # Creates an instance of the object from a hash. def self.from_hash(hash) return nil unless hash # Extract variables from the hash. id = hash.key?('id') ? hash['id'] : SKIP tag = hash.key?('tag') ? hash['tag'] : SKIP # Create object from extracted values. Session.new(id, tag) end end end
Version data entries
14 entries across 14 versions & 1 rubygems