Sha256: 11994ce791bd1e4d6c4eecd2aff1de48a6d1744809f5d6492cad7f54c12b3a06
Contents?: true
Size: 890 Bytes
Versions: 13
Compression:
Stored size: 890 Bytes
Contents
=begin #SnapTrade #Connect brokerage accounts to your app for live positions and trading The version of the OpenAPI document: 1.0.0 Contact: api@snaptrade.com =end require 'date' require 'time' module SnapTrade class OrderClass SIMPLE = "SIMPLE".freeze BRACKET = "BRACKET".freeze def self.all_vars @all_vars ||= [SIMPLE, BRACKET].freeze end # Builds the enum from string # @param [String] The enum value in the form of the string # @return [String] The enum value def self.build_from_hash(value) new.build_from_hash(value) end # Builds the enum from string # @param [String] The enum value in the form of the string # @return [String] The enum value def build_from_hash(value) return value if OrderClass.all_vars.include?(value) raise "Invalid ENUM value #{value} for class #OrderClass" end end end
Version data entries
13 entries across 13 versions & 1 rubygems