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.
- package/dist/bkper.min.js +1 -1
- package/dist/bkper.min.js.map +3 -3
- package/lib/model/Billing.js +6 -2
- package/lib/model/Book.js +2 -1
- package/package.json +1 -1
package/lib/model/Billing.js
CHANGED
|
@@ -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
|
-
|
|
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
|
-
|
|
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
|
-
|
|
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) {
|