@pax2pay/model-banking 0.1.610 → 0.1.611

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.
@@ -1,6 +1,8 @@
1
1
  import { gracely } from "gracely"
2
2
  import { isoly } from "isoly"
3
3
  import { http } from "cloudly-http"
4
+ import { Supplier } from "../Supplier"
5
+ import { Transaction } from "../Transaction"
4
6
  import { Treasury as TreasuryModel } from "../Treasury"
5
7
 
6
8
  export class Treasury {
@@ -16,6 +18,14 @@ export class Treasury {
16
18
  async listAccounts(): Promise<TreasuryModel.Account.Listable[] | gracely.Error> {
17
19
  return this.client.get<TreasuryModel.Account.Listable[]>(`/treasury/account`)
18
20
  }
21
+ async notify(
22
+ hour: isoly.DateTime,
23
+ supplier: Supplier,
24
+ currency: isoly.Currency,
25
+ note: Transaction.Note.Creatable
26
+ ): Promise<Transaction.Note[] | gracely.Error> {
27
+ return this.client.post<Transaction.Note[]>(`/treasury/snapshot/${hour}/${supplier}/${currency}/note`, note)
28
+ }
19
29
  async report(start: isoly.Date, end: isoly.Date, supplier: string): Promise<string | gracely.Error> {
20
30
  return this.client.get<string>(`/treasury/${supplier}/report?start=${start}&end=${end}`)
21
31
  }
@@ -1,6 +1,8 @@
1
1
  import { gracely } from "gracely";
2
2
  import { isoly } from "isoly";
3
3
  import { http } from "cloudly-http";
4
+ import { Supplier } from "../Supplier";
5
+ import { Transaction } from "../Transaction";
4
6
  import { Treasury as TreasuryModel } from "../Treasury";
5
7
  export declare class Treasury {
6
8
  private readonly client;
@@ -8,5 +10,6 @@ export declare class Treasury {
8
10
  fetch(hour?: isoly.DateTime): Promise<TreasuryModel.Snapshot[] | gracely.Error>;
9
11
  listTransactions(accountId: string): Promise<TreasuryModel.Transaction[] | gracely.Error>;
10
12
  listAccounts(): Promise<TreasuryModel.Account.Listable[] | gracely.Error>;
13
+ notify(hour: isoly.DateTime, supplier: Supplier, currency: isoly.Currency, note: Transaction.Note.Creatable): Promise<Transaction.Note[] | gracely.Error>;
11
14
  report(start: isoly.Date, end: isoly.Date, supplier: string): Promise<string | gracely.Error>;
12
15
  }
@@ -16,6 +16,9 @@ class Treasury {
16
16
  async listAccounts() {
17
17
  return this.client.get(`/treasury/account`);
18
18
  }
19
+ async notify(hour, supplier, currency, note) {
20
+ return this.client.post(`/treasury/snapshot/${hour}/${supplier}/${currency}/note`, note);
21
+ }
19
22
  async report(start, end, supplier) {
20
23
  return this.client.get(`/treasury/${supplier}/report?start=${start}&end=${end}`);
21
24
  }
@@ -1 +1 @@
1
- {"version":3,"file":"Treasury.js","sourceRoot":"","sources":["../../../Client/Treasury.ts"],"names":[],"mappings":";;;AACA,iCAA6B;AAI7B,MAAa,QAAQ;IACS;IAA7B,YAA6B,MAAmB;QAAnB,WAAM,GAAN,MAAM,CAAa;IAAG,CAAC;IACpD,KAAK,CAAC,KAAK,CAAC,IAAqB;QAChC,OAAO,IAAI,CAAC,MAAM,CAAC,GAAG,CACrB,wBAAwB,IAAI,CAAC,CAAC,CAAC,IAAI,aAAK,CAAC,QAAQ,CAAC,QAAQ,CAAC,IAAI,EAAE,OAAO,CAAC,EAAE,CAAC,CAAC,CAAC,EAAE,EAAE,CAClF,CAAA;IACF,CAAC;IACD,KAAK,CAAC,gBAAgB,CAAC,SAAiB;QACvC,OAAO,IAAI,CAAC,MAAM,CAAC,GAAG,CAA8B,qBAAqB,SAAS,cAAc,CAAC,CAAA;IAClG,CAAC;IACD,KAAK,CAAC,YAAY;QACjB,OAAO,IAAI,CAAC,MAAM,CAAC,GAAG,CAAmC,mBAAmB,CAAC,CAAA;IAC9E,CAAC;IACD,KAAK,CAAC,MAAM,CAAC,KAAiB,EAAE,GAAe,EAAE,QAAgB;QAChE,OAAO,IAAI,CAAC,MAAM,CAAC,GAAG,CAAS,aAAa,QAAQ,iBAAiB,KAAK,QAAQ,GAAG,EAAE,CAAC,CAAA;IACzF,CAAC;CACD;AAhBD,4BAgBC"}
1
+ {"version":3,"file":"Treasury.js","sourceRoot":"","sources":["../../../Client/Treasury.ts"],"names":[],"mappings":";;;AACA,iCAA6B;AAM7B,MAAa,QAAQ;IACS;IAA7B,YAA6B,MAAmB;QAAnB,WAAM,GAAN,MAAM,CAAa;IAAG,CAAC;IACpD,KAAK,CAAC,KAAK,CAAC,IAAqB;QAChC,OAAO,IAAI,CAAC,MAAM,CAAC,GAAG,CACrB,wBAAwB,IAAI,CAAC,CAAC,CAAC,IAAI,aAAK,CAAC,QAAQ,CAAC,QAAQ,CAAC,IAAI,EAAE,OAAO,CAAC,EAAE,CAAC,CAAC,CAAC,EAAE,EAAE,CAClF,CAAA;IACF,CAAC;IACD,KAAK,CAAC,gBAAgB,CAAC,SAAiB;QACvC,OAAO,IAAI,CAAC,MAAM,CAAC,GAAG,CAA8B,qBAAqB,SAAS,cAAc,CAAC,CAAA;IAClG,CAAC;IACD,KAAK,CAAC,YAAY;QACjB,OAAO,IAAI,CAAC,MAAM,CAAC,GAAG,CAAmC,mBAAmB,CAAC,CAAA;IAC9E,CAAC;IACD,KAAK,CAAC,MAAM,CACX,IAAoB,EACpB,QAAkB,EAClB,QAAwB,EACxB,IAAgC;QAEhC,OAAO,IAAI,CAAC,MAAM,CAAC,IAAI,CAAqB,sBAAsB,IAAI,IAAI,QAAQ,IAAI,QAAQ,OAAO,EAAE,IAAI,CAAC,CAAA;IAC7G,CAAC;IACD,KAAK,CAAC,MAAM,CAAC,KAAiB,EAAE,GAAe,EAAE,QAAgB;QAChE,OAAO,IAAI,CAAC,MAAM,CAAC,GAAG,CAAS,aAAa,QAAQ,iBAAiB,KAAK,QAAQ,GAAG,EAAE,CAAC,CAAA;IACzF,CAAC;CACD;AAxBD,4BAwBC"}
@@ -1,6 +1,8 @@
1
1
  import { gracely } from "gracely";
2
2
  import { isoly } from "isoly";
3
3
  import { http } from "cloudly-http";
4
+ import { Supplier } from "../Supplier";
5
+ import { Transaction } from "../Transaction";
4
6
  import { Treasury as TreasuryModel } from "../Treasury";
5
7
  export declare class Treasury {
6
8
  private readonly client;
@@ -8,5 +10,6 @@ export declare class Treasury {
8
10
  fetch(hour?: isoly.DateTime): Promise<TreasuryModel.Snapshot[] | gracely.Error>;
9
11
  listTransactions(accountId: string): Promise<TreasuryModel.Transaction[] | gracely.Error>;
10
12
  listAccounts(): Promise<TreasuryModel.Account.Listable[] | gracely.Error>;
13
+ notify(hour: isoly.DateTime, supplier: Supplier, currency: isoly.Currency, note: Transaction.Note.Creatable): Promise<Transaction.Note[] | gracely.Error>;
11
14
  report(start: isoly.Date, end: isoly.Date, supplier: string): Promise<string | gracely.Error>;
12
15
  }
@@ -13,6 +13,9 @@ export class Treasury {
13
13
  async listAccounts() {
14
14
  return this.client.get(`/treasury/account`);
15
15
  }
16
+ async notify(hour, supplier, currency, note) {
17
+ return this.client.post(`/treasury/snapshot/${hour}/${supplier}/${currency}/note`, note);
18
+ }
16
19
  async report(start, end, supplier) {
17
20
  return this.client.get(`/treasury/${supplier}/report?start=${start}&end=${end}`);
18
21
  }
@@ -1 +1 @@
1
- {"version":3,"file":"Treasury.js","sourceRoot":"","sources":["../../../Client/Treasury.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,KAAK,EAAE,MAAM,OAAO,CAAA;AAI7B,MAAM,OAAO,QAAQ;IACS;IAA7B,YAA6B,MAAmB;QAAnB,WAAM,GAAN,MAAM,CAAa;IAAG,CAAC;IACpD,KAAK,CAAC,KAAK,CAAC,IAAqB;QAChC,OAAO,IAAI,CAAC,MAAM,CAAC,GAAG,CACrB,wBAAwB,IAAI,CAAC,CAAC,CAAC,IAAI,KAAK,CAAC,QAAQ,CAAC,QAAQ,CAAC,IAAI,EAAE,OAAO,CAAC,EAAE,CAAC,CAAC,CAAC,EAAE,EAAE,CAClF,CAAA;IACF,CAAC;IACD,KAAK,CAAC,gBAAgB,CAAC,SAAiB;QACvC,OAAO,IAAI,CAAC,MAAM,CAAC,GAAG,CAA8B,qBAAqB,SAAS,cAAc,CAAC,CAAA;IAClG,CAAC;IACD,KAAK,C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GAAe,EAAE,QAAgB;QAChE,OAAO,IAAI,CAAC,MAAM,CAAC,GAAG,CAAS,aAAa,QAAQ,iBAAiB,KAAK,QAAQ,GAAG,EAAE,CAAC,CAAA;IACzF,CAAC;CACD"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@pax2pay/model-banking",
3
- "version": "0.1.610",
3
+ "version": "0.1.611",
4
4
  "description": "Library containing data model types and functions for the Pax2Pay Banking API.",
5
5
  "author": "Pax2Pay Ltd",
6
6
  "license": "MIT",