Sha256: e30c0680256afa9cc1830241fe8ee6abb61fe70be4ea36562f8847f82e829f41
Contents?: true
Size: 991 Bytes
Versions: 16
Compression:
Stored size: 991 Bytes
Contents
# frozen_string_literal: true module WorkOS # The OrganizationMembership class provides a lightweight wrapper around a WorkOS OrganizationMembership # resource. This class is not meant to be instantiated in a user space, # and is instantiated internally but exposed. class OrganizationMembership include HashProvider attr_accessor :id, :user_id, :organization_id, :status, :role, :created_at, :updated_at def initialize(json) hash = JSON.parse(json, symbolize_names: true) @id = hash[:id] @user_id = hash[:user_id] @organization_id = hash[:organization_id] @status = hash[:status] @role = hash[:role] @created_at = hash[:created_at] @updated_at = hash[:updated_at] end def to_json(*) { id: id, user_id: user_id, organization_id: organization_id, status: status, role: role, created_at: created_at, updated_at: updated_at, } end end end
Version data entries
16 entries across 16 versions & 1 rubygems