   checkUsage: (product, multiplyFactor, callback) ->
     [callback, multiplyFactor] = [multiplyFactor, callback]  unless callback
     multiplyFactor ?= 1
-    {quantities} = product
+    { quantities } = product
 
     unless quantities?
       quantities = {}
       quantities[product.planCode] = 1
 
     spend = quantities
-    @checkQuota {@usage, @couponCode, spend, multiplyFactor}, callback
+    @checkQuota { @usage, @couponCode, spend, multiplyFactor }, callback
 
   checkQuota: (options, callback) ->
-    {usage, spend, couponCode, multiplyFactor} = options
+    { usage, spend, couponCode, multiplyFactor } = options
     multiplyFactor ?= 1
     spend ?= {}
 

          else
            @upgrade transitionOptions, callback

  debitPack: ({tag, multiplyFactor}, callback) ->
    multiplyFactor ?= 1
    JPaymentPack = require './pack'
    JPaymentPack.one tags: $in: [tag], {}, (err, pack) =>
      return callback err  if err
      return callback new KodingError "pack not found"  unless pack
      @debit {pack, multiplyFactor}, callback

  creditPack: ({tag, multiplyFactor}, callback) ->
    multiplyFactor ?= 1
    multiplyFactor *= -1
    @debitPack {tag, multiplyFactor}, callback

  @createFreeSubscription = (account, callback) ->
    JPaymentPlan = require './plan'
    JPaymentPlan.one tags: "nosync", (err, plan) ->
      return \
        if err then callback err
        else if not plan then callback new KodingError "nosync plan not found"

      {planCode, quantities, tags} = plan
      freePlanSubscription = new JPaymentSubscription
        planCode   : planCode
        quantity   : 1
        status     : "active"
        feeAmount  : 0
        quantities : quantities
        tags       : tags

# coffeelint: disable=no_implicit_braces
jraphical   = require 'jraphical'
payment     = require 'koding-payment'
KodingError = require '../../error'
