bkper-js 2.45.0 → 2.45.1

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.
@@ -96,7 +96,9 @@ export class Billing extends Resource {
96
96
  * @returns The number of total transactions this month
97
97
  */
98
98
  getTotalTransactionsThisMonth() {
99
- return this.payload.totalTransactionsThisMonth;
99
+ const total = this.payload.totalTransactionsThisMonth;
100
+ // int64 totals arrive as JSON strings
101
+ return total != null ? +total : undefined;
100
102
  }
101
103
  /**
102
104
  * Gets the number of total transactions this year for the User's billing account.
@@ -104,7 +106,9 @@ export class Billing extends Resource {
104
106
  * @returns The number of total transactions this year
105
107
  */
106
108
  getTotalTransactionsThisYear() {
107
- return this.payload.totalTransactionsThisYear;
109
+ const total = this.payload.totalTransactionsThisYear;
110
+ // int64 totals arrive as JSON strings
111
+ return total != null ? +total : undefined;
108
112
  }
109
113
  /**
110
114
  * Gets the authoritative rolling monthly average of posted transactions.
package/lib/model/Book.js CHANGED
@@ -1174,7 +1174,8 @@ export class Book extends ResourceProperty {
1174
1174
  countTransactions(query) {
1175
1175
  return __awaiter(this, void 0, void 0, function* () {
1176
1176
  const count = yield TransactionService.countTransactions(this.getId(), query, this.getConfig());
1177
- return count.total;
1177
+ // int64 totals arrive as JSON strings
1178
+ return count.total != null ? +count.total : undefined;
1178
1179
  });
1179
1180
  }
1180
1181
  listEvents(optionsOrAfterDate, beforeDate, onError, resourceId, limit, cursor) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "bkper-js",
3
- "version": "2.45.0",
3
+ "version": "2.45.1",
4
4
  "description": "Javascript client for Bkper REST API",
5
5
  "main": "./lib/index.js",
6
6
  "module": "./lib/index.js",