       subscriptionType  : subscriptionType ? 'recurring'
       planCode          : createId()
       overageEnabled    : overageEnabled is 'on'
+      group
     }
 
     product.save (err) =>

{Module} = require 'jraphical'

module.exports = class JPaymentProduct extends Module



    else process.nextTick -> callback null

  @removeByCode = (planCode, callback) ->
    @one { planCode }, (err, product) ->
      return callback err  if err

      unless product?
        return callback { message: 'Unrecognized product code', planCode }

      product.remove callback

  @removeByCode$ = permit 'manage products',
    success: (client, planCode, callback) -> @removeByCode planCode, callback

  remove: (callback) ->
    { planCode: code, overageEnabled } = this
    super (err) ->
      if err
        callback err
      else if code? and overageEnabled
        recurly.deletePlan { code }, callback
      else
        callback null

  remove$: permit 'manage products',
    success: (client, callback) -> @remove callback