payservedb 8.6.8 → 8.7.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/index.js CHANGED
@@ -244,6 +244,7 @@ const models = {
244
244
  ZohoIntegration: require("./src/models/zohoIntegration"),
245
245
  ZohoItem: require("./src/models/zohoItem"),
246
246
  ZohoAccount: require("./src/models/zohoAccount"),
247
+ QuickBooksConfig: require("./src/models/quickbooks_config"),
247
248
  PrivacyPolicy: require("./src/models/privacy_policy"),
248
249
  TermsAndConditions: require("./src/models/terms_and_conditions"),
249
250
  CommunityGuidelines: require("./src/models/community_guidelines")
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "payservedb",
3
- "version": "8.6.8",
3
+ "version": "8.7.0",
4
4
  "main": "index.js",
5
5
  "scripts": {
6
6
  "test": "echo \"Error: no test specified\" && exit 1"
@@ -94,7 +94,7 @@ const cashPaymentSchema = new mongoose.Schema(
94
94
  },
95
95
  paymentMethod: {
96
96
  type: String,
97
- enum: ['cash', 'bank-transfer', 'cheque'],
97
+ enum: ['cash', 'bank-transfer', 'cheque','mpesa'],
98
98
  default: 'cash'
99
99
  },
100
100
  exchangeRate: {
@@ -0,0 +1,42 @@
1
+ const mongoose = require('mongoose');
2
+
3
+ const quickBooksConfigSchema = new mongoose.Schema({
4
+ facilityId: {
5
+ type: mongoose.Schema.Types.ObjectId,
6
+ ref: 'Facility',
7
+ required: true,
8
+ unique: true,
9
+ index: true
10
+ },
11
+ clientId: {
12
+ type: String,
13
+ required: true,
14
+ trim: true
15
+ },
16
+ clientSecret: {
17
+ type: String,
18
+ required: true,
19
+ trim: true
20
+ },
21
+ realmId: {
22
+ type: String,
23
+ required: true,
24
+ trim: true
25
+ },
26
+ environment: {
27
+ type: String,
28
+ enum: ['sandbox', 'production'],
29
+ default: 'sandbox',
30
+ required: true
31
+ },
32
+ isActive: {
33
+ type: Boolean,
34
+ default: true
35
+ }
36
+ }, {
37
+ timestamps: true
38
+ });
39
+
40
+ const QuickBooksConfig = mongoose.model('QuickBooksConfig', quickBooksConfigSchema);
41
+
42
+ module.exports = QuickBooksConfig;