docs: function () {
  
          let paramsConstraints = {
              productName: function (value) {
  
                  if (validate.isEmpty(value)) {
                      return {
                          presence: {
                              message: 'is required'
                          }
                      };
                  }
                  if (!(/\S/).test(value)) {
                      return {
                          format: 'must not contain invalid productName - eg. Space'
                      };
                  }
  
                  return null;
              },
              recipients: {
                  presence: true,
                  length: function (value, attributes, attributeName, options, constraints) {
                      if (validate.isArray(value)) {
                          return value.length >= 1 && value.length <= 10;
                      }
                      return false;
                  }
              }
          };
  
          let recipientsConstraints = {
              phoneNumber: function (value) {
  
                  if (validate.isEmpty(value)) {
                      return {
                          presence: {
                              message: 'is required'
                          }
                      };
                  }
                  if (!(/^\+?\d+$/).test(value)) {
                      return {
                          format: 'must not contain invalid phone number'
                      };
                  }
  
                  return null;
              },
  
              currencyCode: function (value) {
  
                  if (validate.isEmpty(value)) {
                      return {
                          presence: {
                              message: 'is required'
                          }
                      };
                  }
  
                  return null;
              },
  
              metadata: function (value) {
                  if (value && !validate.isObject(value)) {
                      return {
                          format: 'metadata need to be a string map; i.e. {"key":"value", "otherKey":"otherValue"}'
                      };
                  }
                  return null;
              },
  
              reason: function (value) {
  
                  if (value) {
                      switch (value) {
                          case _self.REASON.SALARY:
                          case _self.REASON.SALARY_WITH_CHARGE:
                          case _self.REASON.BUSINESS_WITH_CHARGE:
                          case _self.REASON.BUSINESS:
                          case _self.REASON.PROMOTION:
                              break;
                          default:
                              return {
                                  format: 'reason has to be one of payments.REASON.*'
                              }
                      }
                  }
  
                  return null;
              },
  
              amount: function (value) {
  
                  if (validate.isEmpty(value)) {
                      return {
                          presence: {
                              message: 'is required'
                          }
                      };
                  }
                  if (!validate.isNumber(value)) {
                      return {
                          format: 'must not contain invalid amount. Must be a number.'
                      };
                  }
  
                  return null;
              }
          };
  
          let error = validate(options, paramsConstraints);
          let makeErrorMessage = function (error) {
              let msg = "";
              for (let k in error) {
                  msg += error[k] + "; ";
              }
              validationError = new Error(msg);
          };
          if (!error) {
              // Validate each recipient
              for (let i = 0; i < options.recipients.length; i++) {
                  error = validate(options.recipients[i], recipientsConstraints);
                  if (error) {
                      makeErrorMessage(error);
                      break;
                  }
              }
          }
  
      }