@pax2pay/client 0.1.33 → 0.1.35

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,5 +1,6 @@
1
1
  import { Currency } from "isoly"
2
2
  import * as model from "../../model"
3
+ import { ProviderCode } from "../../model/ProviderCode"
3
4
  import { Connection } from "../Connection"
4
5
  export class Configuration {
5
6
  protected folder = "config"
@@ -7,8 +8,8 @@ export class Configuration {
7
8
  static create(connection: Connection) {
8
9
  return new Configuration(connection)
9
10
  }
10
- async getAvailableCurrency(): Promise<Currency[] | model.ErrorResponse> {
11
- const result = await this.connection.get<Currency[]>(`config/currencies`)
11
+ async getAvailableCurrency(providerCode: ProviderCode = "modulr"): Promise<Currency[] | model.ErrorResponse> {
12
+ const result = await this.connection.get<Currency[]>(`config/currencies`, { provider: providerCode })
12
13
  return result
13
14
  }
14
15
  async getOrganisationConfig(): Promise<model.OrganisationConfig | model.ErrorResponse> {
@@ -1,12 +1,13 @@
1
1
  import { Currency } from "isoly";
2
2
  import * as model from "../../model";
3
+ import { ProviderCode } from "../../model/ProviderCode";
3
4
  import { Connection } from "../Connection";
4
5
  export declare class Configuration {
5
6
  private readonly connection;
6
7
  protected folder: string;
7
8
  constructor(connection: Connection);
8
9
  static create(connection: Connection): Configuration;
9
- getAvailableCurrency(): Promise<Currency[] | model.ErrorResponse>;
10
+ getAvailableCurrency(providerCode?: ProviderCode): Promise<Currency[] | model.ErrorResponse>;
10
11
  getOrganisationConfig(): Promise<model.OrganisationConfig | model.ErrorResponse>;
11
12
  getUserConfig(): Promise<model.UserConfig | model.ErrorResponse>;
12
13
  }
@@ -6,8 +6,8 @@ export class Configuration {
6
6
  static create(connection) {
7
7
  return new Configuration(connection);
8
8
  }
9
- async getAvailableCurrency() {
10
- const result = await this.connection.get(`config/currencies`);
9
+ async getAvailableCurrency(providerCode = "modulr") {
10
+ const result = await this.connection.get(`config/currencies`, { provider: providerCode });
11
11
  return result;
12
12
  }
13
13
  async getOrganisationConfig() {
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"../","sources":["Client/Configuration/index.ts"],"names":[],"mappings":"AAGA,MAAM,OAAO,aAAa;IAEzB,YAA6B,UAAsB;QAAtB,eAAU,GAAV,UAAU,CAAY;QADzC,WAAM,GAAG,QAAQ,CAAA;IAC2B,CAAC;IACvD,MAAM,CAAC,MAAM,CAAC,UAAsB;QACnC,OAAO,IAAI,aAAa,CAAC,UAAU,CAAC,CAAA;IACrC,CAAC;IACD,KAAK,CAAC,oBAAoB;QACzB,MAAM,MAAM,GAAG,MAAM,IAAI,CAAC,UAAU,CAAC,GAAG,CAAa,mBAAmB,CAAC,CAAA;QACzE,OAAO,MAAM,CAAA;IACd,CAAC;IACD,KAAK,CAAC,qBAAqB;QAC1B,MAAM,MAAM,GAAG,MAAM,IAAI,CAAC,UAAU,CAAC,GAAG,CAA2B,qBAAqB,CAAC,CAAA;QACzF,OAAO,MAAM,CAAA;IACd,CAAC;IACD,KAAK,CAAC,aAAa;QAClB,MAAM,MAAM,GAAG,MAAM,IAAI,CAAC,UAAU,CAAC,GAAG,CAAmB,aAAa,CAAC,CAAA;QACzE,OAAO,MAAM,CAAA;IACd,CAAC;CACD"}
1
+ {"version":3,"file":"index.js","sourceRoot":"../","sources":["Client/Configuration/index.ts"],"names":[],"mappings":"AAIA,MAAM,OAAO,aAAa;IAEzB,YAA6B,UAAsB;QAAtB,eAAU,GAAV,UAAU,CAAY;QADzC,WAAM,GAAG,QAAQ,CAAA;IAC2B,CAAC;IACvD,MAAM,CAAC,MAAM,CAAC,UAAsB;QACnC,OAAO,IAAI,aAAa,CAAC,UAAU,CAAC,CAAA;IACrC,CAAC;IACD,KAAK,CAAC,oBAAoB,CAAC,eAA6B,QAAQ;QAC/D,MAAM,MAAM,GAAG,MAAM,IAAI,CAAC,UAAU,CAAC,GAAG,CAAa,mBAAmB,EAAE,EAAE,QAAQ,EAAE,YAAY,EAAE,CAAC,CAAA;QACrG,OAAO,MAAM,CAAA;IACd,CAAC;IACD,KAAK,CAAC,qBAAqB;QAC1B,MAAM,MAAM,GAAG,MAAM,IAAI,CAAC,UAAU,CAAC,GAAG,CAA2B,qBAAqB,CAAC,CAAA;QACzF,OAAO,MAAM,CAAA;IACd,CAAC;IACD,KAAK,CAAC,aAAa;QAClB,MAAM,MAAM,GAAG,MAAM,IAAI,CAAC,UAAU,CAAC,GAAG,CAAmB,aAAa,CAAC,CAAA;QACzE,OAAO,MAAM,CAAA;IACd,CAAC;CACD"}
@@ -24,5 +24,5 @@ export interface CardSearchRequest {
24
24
  createdOn?: Range<DateTime>;
25
25
  usage?: CardUsage;
26
26
  bookingInfoText?: string;
27
- bookingInfoType?: BookingInfoType[];
27
+ bookingInfoType?: (BookingInfoType | "NONE")[];
28
28
  }
@@ -24,5 +24,5 @@ export interface CardSearchRequest {
24
24
  createdOn?: Range<DateTime>
25
25
  usage?: CardUsage
26
26
  bookingInfoText?: string
27
- bookingInfoType?: BookingInfoType[]
27
+ bookingInfoType?: (BookingInfoType | "NONE")[]
28
28
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@pax2pay/client",
3
- "version": "0.1.33",
3
+ "version": "0.1.35",
4
4
  "description": "Client library for the Pax2Pay API",
5
5
  "author": "Pax2Pay Ltd.",
6
6
  "license": "MIT",