@dhyasama/totem-models 7.53.5 → 7.54.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.
Files changed (2) hide show
  1. package/lib/Financials.js +16 -0
  2. package/package.json +1 -1
package/lib/Financials.js CHANGED
@@ -230,6 +230,22 @@ module.exports = function(mongoose, config) {
230
230
 
231
231
  };
232
232
 
233
+ Financials.statics.getByPostmarkMessageId = function getByPostmarkMessageId(postmarkMessageId, cb) {
234
+
235
+ var self = this;
236
+
237
+ var query = self.findOne({
238
+ $or: [
239
+ { 'snapshots.notifications.company.initial.postmarkMessageId': postmarkMessageId },
240
+ { 'snapshots.notifications.company.reminders.postmarkMessageId': postmarkMessageId },
241
+ { 'snapshots.notifications.company.rejections.postmarkMessageId': postmarkMessageId },
242
+ ]
243
+ });
244
+
245
+ query.exec(cb);
246
+
247
+ };
248
+
233
249
  Financials.statics.getInitialUUIDsToSend = function getInitialUUIDsToSend(cb) {
234
250
 
235
251
  var self = this;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@dhyasama/totem-models",
3
- "version": "7.53.5",
3
+ "version": "7.54.0",
4
4
  "author": "Jason Reynolds",
5
5
  "license": "UNLICENSED",
6
6
  "description": "Models for Totem platform",