@pax2pay/model-banking 0.1.127 → 0.1.128
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/Client/Treasury.ts
CHANGED
|
@@ -14,8 +14,8 @@ export class Treasury extends rest.Collection<gracely.Error> {
|
|
|
14
14
|
return this.client.patch(`/treasury/${currency}/fiat`, changes)
|
|
15
15
|
}
|
|
16
16
|
async fetch(hour?: isoly.DateTime): Promise<TreasuryModel | gracely.Error> {
|
|
17
|
-
const
|
|
18
|
-
return this.client.get<TreasuryModel>(`/treasury${
|
|
17
|
+
const path = hour ? `/${isoly.DateTime.truncate(hour, "hours")}` : ""
|
|
18
|
+
return this.client.get<TreasuryModel>(`/treasury${path}`)
|
|
19
19
|
}
|
|
20
20
|
async listTransactions(accountId: string): Promise<TreasuryModel.Transaction[] | gracely.Error> {
|
|
21
21
|
return this.client.get<TreasuryModel.Transaction[]>(`/treasury/account/${accountId}/transaction`)
|
package/dist/Client/Treasury.js
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { isoly } from "isoly";
|
|
1
2
|
import * as rest from "cloudly-rest";
|
|
2
3
|
export class Treasury extends rest.Collection {
|
|
3
4
|
constructor(client) {
|
|
@@ -7,8 +8,8 @@ export class Treasury extends rest.Collection {
|
|
|
7
8
|
return this.client.patch(`/treasury/${currency}/fiat`, changes);
|
|
8
9
|
}
|
|
9
10
|
async fetch(hour) {
|
|
10
|
-
const
|
|
11
|
-
return this.client.get(`/treasury${
|
|
11
|
+
const path = hour ? `/${isoly.DateTime.truncate(hour, "hours")}` : "";
|
|
12
|
+
return this.client.get(`/treasury${path}`);
|
|
12
13
|
}
|
|
13
14
|
async listTransactions(accountId) {
|
|
14
15
|
return this.client.get(`/treasury/account/${accountId}/transaction`);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Treasury.js","sourceRoot":"../","sources":["Client/Treasury.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"Treasury.js","sourceRoot":"../","sources":["Client/Treasury.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,KAAK,EAAE,MAAM,OAAO,CAAA;AAE7B,OAAO,KAAK,IAAI,MAAM,cAAc,CAAA;AAIpC,MAAM,OAAO,QAAS,SAAQ,IAAI,CAAC,UAAyB;IAC3D,YAAY,MAAmB;QAC9B,KAAK,CAAC,MAAM,CAAC,CAAA;IACd,CAAC;IAED,KAAK,CAAC,MAAM,CAAC,QAAwB,EAAE,OAAiB;QACvD,OAAO,IAAI,CAAC,MAAM,CAAC,KAAK,CAAC,aAAa,QAAQ,OAAO,EAAE,OAAO,CAAC,CAAA;IAChE,CAAC;IACD,KAAK,CAAC,KAAK,CAAC,IAAqB;QAChC,MAAM,IAAI,GAAG,IAAI,CAAC,CAAC,CAAC,IAAI,KAAK,CAAC,QAAQ,CAAC,QAAQ,CAAC,IAAI,EAAE,OAAO,CAAC,EAAE,CAAC,CAAC,CAAC,EAAE,CAAA;QACrE,OAAO,IAAI,CAAC,MAAM,CAAC,GAAG,CAAgB,YAAY,IAAI,EAAE,CAAC,CAAA;IAC1D,CAAC;IACD,KAAK,CAAC,gBAAgB,CAAC,SAAiB;QACvC,OAAO,IAAI,CAAC,MAAM,CAAC,GAAG,CAA8B,qBAAqB,SAAS,cAAc,CAAC,CAAA;IAClG,CAAC;CACD"}
|