Sha256: 89af10c05899e484f35abb50dfbd5286fb8523e5950f5d4c4bbf4d54287af89e
Contents?: true
Size: 1.5 KB
Versions: 14
Compression:
Stored size: 1.5 KB
Contents
# bandwidth # # This file was automatically generated by APIMATIC v2.0 # ( https://apimatic.io ). module Bandwidth # DeferredResult Model. class DeferredResult < BaseModel SKIP = Object.new private_constant :SKIP # TODO: Write general description for this method # @return [Object] attr_accessor :result # TODO: Write general description for this method # @return [Boolean] attr_accessor :set_or_expired # A mapping from model property names to API property names. def self.names @_hash = {} if @_hash.nil? @_hash['result'] = 'result' @_hash['set_or_expired'] = 'setOrExpired' @_hash end # An array for optional fields def optionals %w[ result set_or_expired ] end # An array for nullable fields def nullables [] end def initialize(result = nil, set_or_expired = nil) @result = result unless result == SKIP @set_or_expired = set_or_expired unless set_or_expired == 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. result = hash.key?('result') ? hash['result'] : SKIP set_or_expired = hash.key?('setOrExpired') ? hash['setOrExpired'] : SKIP # Create object from extracted values. DeferredResult.new(result, set_or_expired) end end end
Version data entries
14 entries across 14 versions & 1 rubygems