 
   @set
     indexes:
-      uuid         : 'unique'
-    sharedMethods  :
-      static       : [
+      uuid            : 'unique'
+    sharedMethods     :
+      static          : [
         # TODO: this is a really big WTF, and needs to be removed:
-        'all', 'one', 'some',
-        'getToken', 'charge', 'getCharges'
+        'all'
+        'one'
+        'some'
+        'charge'
+        'fetchToken'
+        'fetchCharges'
       ]
-      instance     : ['cancel']
-    schema         :
-      uuid         : String
-      userCode     : String
-      amount       : Number
-      status       : String
-      lastUpdate   : Number
+      instance        : [
+        'cancel'
+      ]
+    schema            :
+      uuid            : String
+      paymentMethodId : String
+      amount          : Number
+      status          : String
+      lastUpdate      : Number
 
-  @getCharges = secure (client, callback)->
-    {delegate} = client.connection
-    selector = userCode : "user_#{delegate._id}"
-
-    JPayment.invalidateCacheAndLoad this, selector, {forceRefresh, forceInterval}, callback
+  @fetchCharges = secure (client, callback)->
+    callback { message: 'Not implemented!' }
 
   @updateCache = (selector, callback)->
     JPayment.updateCache

    #       console.log 'transaction created', arguments
    #       callback err, unless err then pay

  cancel: secure ({connection:{client}}, callback)->
    userCode = "user_#{delegate._id}"
    recurly.deleteTransaction userCode, {@uuid, @amount}, (err, charge)=>
      return callback err  if err

      @status = charge.status
      @save (err)-> callback err, this

        charge.save stackCb
    , callback

  @fetchToken = secure (client, data, callback)->
    callback { message: 'Not implemented!' }

  @charge = secure (client, data, callback)->
    { connection: { delegate } } = client
    
    { paymentMethodId, description, feeAmount } = data

    (require './method').one { paymentMethodId }, (err, method) =>
      return callback err  if err
      return callback {
        message: "Unknown payment method! #{paymentMethodId}"
      }  unless method?

      delegate.hasTarget method, 'payment method', (err, hasTarget) =>
        return callback err  if err
        return callback {
          message: 'You are not authorized to use this payment method!'
        }  unless hasTarget

        recurly.createTransaction paymentMethodId,
          amount  : feeAmount
          desc    : description
        , (err, transaction) =>
          return callback err  if err

          charge = new this {
            uuid: transaction.uuid
            paymentMethodId
            amount: feeAmount
            status: transaction.status
          }
          charge.save (err) ->
            return callback err  if err

            callback null, charge
    # {delegate} = client.connection
    # userCode = "user_#{delegate._id}"

