backend-manager 2.5.79 → 2.5.81

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "backend-manager",
3
- "version": "2.5.79",
3
+ "version": "2.5.81",
4
4
  "description": "Quick tools for developing Firebase functions",
5
5
  "main": "src/manager/index.js",
6
6
  "bin": {
@@ -51,7 +51,7 @@
51
51
  "node-fetch": "^2.6.9",
52
52
  "node-powertools": "^0.0.23",
53
53
  "npm-api": "^1.0.1",
54
- "paypal-server-api": "^1.0.1",
54
+ "paypal-server-api": "^1.0.2",
55
55
  "pushid": "^1.0.0",
56
56
  "semver": "^7.3.8",
57
57
  "shortid": "^2.2.16",
@@ -194,11 +194,13 @@ SubscriptionResolver.prototype.resolve = function (options) {
194
194
  ) * 1000
195
195
  )
196
196
 
197
- // Set last payment @@@ TODO
198
- // if (resource.billing_info && resource.billing_info.last_payment) {
199
- // resolved.lastPayment.amount = parseFloat(resource.billing_info.last_payment.amount.value);
200
- // resolved.lastPayment.date.timestamp = moment(resource.billing_info.last_payment.time);
201
- // }
197
+ // Set last payment
198
+ if (resource.total_dues) {
199
+ resolved.lastPayment.amount = resource.total_dues / 100;
200
+ resolved.lastPayment.date.timestamp = moment(
201
+ (resource.due_since || 0) * 1000
202
+ );
203
+ }
202
204
 
203
205
  // Get trial
204
206
  if (resource.status === 'in_trial') {