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

Method unsubscribe

app/models/User.js:1260–1267  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

1258 }
1259
1260 unsubscribe () {
1261 let left
1262 const stripe = _.clone((left = this.get('stripe')) != null ? left : {})
1263 if (!stripe.planID) { return }
1264 delete stripe.planID
1265 this.set({ stripe })
1266 return this.patch({ headers: { 'X-Change-Plan': 'true' } })
1267 }
1268
1269 unsubscribeRecipient (id, options = {}) {
1270 options.url = _.result(this, 'url') + `/stripe/recipients/${id}`

Callers 3

CocoModel.spec.jsFile · 0.45
destroyMethod · 0.45

Calls 4

getMethod · 0.95
patchMethod · 0.80
cloneMethod · 0.45
setMethod · 0.45

Tested by

no test coverage detected