MCPcopy Create free account
hub / github.com/codecombat/codecombat / convertToProduct

Method convertToProduct

app/models/Prepaid.js:128–138  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

126 }
127
128 convertToProduct () {
129 return {
130 product: 'course',
131 startDate: this.get('startDate'),
132 endDate: this.get('endDate'),
133 prepaid: this.get('_id'),
134 productOptions: {
135 includedCourseIDs: this.get('includedCourseIDs')
136 }
137 }
138 }
139
140 hasBeenUsedByTeacher (userID) {
141 if ((this.get('creator') === userID) && _.detect(this.get('redeemers'), { teacherID: undefined })) {

Callers 3

makeUserFunction · 0.80
makeUserFunction · 0.80
redeemUsersMethod · 0.80

Calls 1

getMethod · 0.45

Tested by

no test coverage detected