files.com
Version:
Files.com SDK for JavaScript
45 lines (32 loc) • 1.05 kB
JavaScript
/* eslint-disable no-unused-vars */
import Api from '../Api'
import * as errors from '../Errors'
import {
getType, isArray, isInt, isObject, isString,
} from '../utils'
/* eslint-enable no-unused-vars */
/**
* Class ShareGroupMember
*/
class ShareGroupMember {
attributes = {}
options = {}
constructor(attributes = {}, options = {}) {
Object.entries(attributes).forEach(([key, value]) => {
const normalizedKey = key.replace('?', '')
this.attributes[normalizedKey] = value
Object.defineProperty(this, normalizedKey, { value, writable: false })
})
this.options = { ...options }
}
isLoaded = () => !!this.attributes.id
// string # Name of the share group member
getName = () => this.attributes.name
// string # Company of the share group member
getCompany = () => this.attributes.company
// string # Email of the share group member
getEmail = () => this.attributes.email
}
export default ShareGroupMember
module.exports = ShareGroupMember
module.exports.default = ShareGroupMember