@fiado/api-invoker 1.1.53 → 1.1.54

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.
@@ -28,8 +28,15 @@ let StpSpeiApi = class StpSpeiApi {
28
28
  return await this.httpRequest.post(url, request, headers);
29
29
  }
30
30
  async getBusinessAccountBalance(businessName) {
31
- const url = `${this.baseUrl}accounts/${businessName}/balance`;
32
- return await this.httpRequest.get(url);
31
+ const url = `${this.baseUrl}`;
32
+ const request = {
33
+ business: businessName
34
+ };
35
+ const headers = {
36
+ 'Content-Type': 'application/json',
37
+ operationName: "getBusinessAccountBalance"
38
+ };
39
+ return await this.httpRequest.post(url, request, headers);
33
40
  }
34
41
  };
35
42
  exports.StpSpeiApi = StpSpeiApi;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@fiado/api-invoker",
3
- "version": "1.1.53",
3
+ "version": "1.1.54",
4
4
  "description": "Sirve como un puente entre diferentes funciones lambda, facilitando la comunicación entre ellas a traves de invocaciones http",
5
5
  "main": "bin/index.js",
6
6
  "types": "bin/index.d.ts",
@@ -20,7 +20,14 @@ export class StpSpeiApi implements IStpSpeiApi {
20
20
  }
21
21
 
22
22
  async getBusinessAccountBalance(businessName: BusinessNameEnum): Promise<any> {
23
- const url = `${this.baseUrl}accounts/${businessName}/balance`;
24
- return await this.httpRequest.get(url);
23
+ const url: string = `${this.baseUrl}`;
24
+ const request = {
25
+ business: businessName
26
+ }
27
+ const headers = {
28
+ 'Content-Type': 'application/json',
29
+ operationName: "getBusinessAccountBalance"
30
+ }
31
+ return await this.httpRequest.post(url, request, headers);
25
32
  }
26
33
  }