Sha256: 86931867d806aac41647f6ebb3511550fce4658bea82d0d994534f1cc2728be4
Contents?: true
Size: 881 Bytes
Versions: 18
Compression:
Stored size: 881 Bytes
Contents
# frozen_string_literal: true module WorkOS # The Factor class provides a lightweight wrapper around # a WorkOS DirectoryUser resource. This class is not meant to be instantiated # in DirectoryUser space, and is instantiated internally but exposed. class Factor include HashProvider attr_accessor :id, :object, :type, :sms, :totp, :updated_at, :created_at def initialize(json) hash = JSON.parse(json, symbolize_names: true) @id = hash[:id] @object = hash[:object] @type = hash[:type] @created_at = hash[:created_at] @updated_at = hash[:updated_at] @totp = hash[:totp] @sms = hash[:sms] end def to_json(*) { id: id, object: object, type: type, totp: totp, sms: sms, created_at: created_at, updated_at: updated_at, } end end end
Version data entries
18 entries across 18 versions & 1 rubygems