function (params, userId) {
      console.log('ecInterface.paymentmethod.add');

      return this.request({
          url: this._buildUri(this.uri, null, null, userId),
          method: corbel.request.method.POST,
          data: params
        })
        .then(function (res) {
          return corbel.Services.getLocationId(res);
        });
    }
function (params, userId) {
      console.log('ecInterface.paymentmethod.add');

      return this.request({
          url: this._buildUri(this.uri, null, null, userId),
          method: corbel.request.method.POST,
          data: params
        })
        .then(function (res) {
          return corbel.Services.getLocationId(res);
        });
    }
function ( params , userId ) { console . log ( 'ecInterface.paymentmethod.add' ) ; return this . request ( { url : this . _buildUri ( this . uri , null , null , userId ) , method : corbel . request . method . POST , data : params } ) . then ( function ( res ) { return corbel . Services . getLocationId ( res ) ; } ) ; }
Add a new payment method for the logged user.

@method
@memberOf corbel.Ec.PaymentMethodBuilder

@param {Object} params                 The params filter
@param {String} params.data            The card data encrypted
(@see https://github.com/adyenpayments/client-side-encryption)
@param {String} params.name            User identifier related with de payment method

@return {Promise}                      Q promise that resolves to a Payment {Object} or rejects with a
{@link SilkRoadError}
Add a new payment method for the logged user .