MCPcopy Index your code
hub / github.com/codecombat/codecombat / redeem

Method redeem

app/models/Prepaid.js:90–97  ·  view source on GitHub ↗
(user, options)

Source from the content-addressed store, hash-verified

88 }
89
90 redeem (user, options) {
91 if (options == null) { options = {} }
92 options.url = _.result(this, 'url') + '/redeemers'
93 options.type = 'POST'
94 if (options.data == null) { options.data = {} }
95 options.data.userID = user.id || user
96 return this.fetch(options)
97 }
98
99 includesCourse (course) {
100 const courseID = (typeof course.get === 'function' ? course.get('name') : undefined) || course

Callers 7

applySpecificLicensesFunction · 0.95
assignCourseFunction · 0.80
applyLicensesFunction · 0.80
assignCourseMethod · 0.80
redeemUsersMethod · 0.80
redeemUsersMethod · 0.80

Calls 1

fetchMethod · 0.45

Tested by

no test coverage detected