@pax2pay/client 0.9.19 → 0.9.21

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.
@@ -8,8 +8,14 @@ export class Configuration {
8
8
  static create(connection: Connection) {
9
9
  return new Configuration(connection)
10
10
  }
11
- async getAvailableCurrency(providerCode: ProviderCode = "modulr"): Promise<Currency[] | model.ErrorResponse> {
12
- return await this.connection.get<Currency[]>(`${this.folder}/currencies`, { provider: providerCode })
11
+ async getAvailableCurrencies(
12
+ providerCode: ProviderCode[] | ProviderCode = "modulr"
13
+ ): Promise<Currency[] | model.ErrorResponse> {
14
+ const provider = Array.isArray(providerCode) ? providerCode.join(",") : providerCode
15
+ return await this.connection.get<Currency[]>(`${this.folder}/currencies`, { provider: provider })
16
+ }
17
+ async getAllCurrencies() {
18
+ return await this.connection.get<Currency[]>(`${this.folder}/currencies/all`)
13
19
  }
14
20
  async getOrganisation(code?: string): Promise<model.Config.Organisation | model.ErrorResponse> {
15
21
  return await this.connection.get<model.Config.Organisation>(`${this.folder}/organisation${code ? `/${code}` : ""}`)
@@ -7,7 +7,11 @@ export declare class Configuration {
7
7
  protected readonly folder = "config";
8
8
  constructor(connection: Connection);
9
9
  static create(connection: Connection): Configuration;
10
- getAvailableCurrency(providerCode?: ProviderCode): Promise<Currency[] | model.ErrorResponse>;
10
+ getAvailableCurrencies(providerCode?: ProviderCode[] | ProviderCode): Promise<Currency[] | model.ErrorResponse>;
11
+ getAllCurrencies(): Promise<("BTN" | "MKD" | "CHE" | "AED" | "AFN" | "ALL" | "AMD" | "ANG" | "AOA" | "ARS" | "AUD" | "AWG" | "AZN" | "BAM" | "BBD" | "BDT" | "BGN" | "BHD" | "BIF" | "BMD" | "BND" | "BOB" | "BOV" | "BRL" | "BSD" | "BWP" | "BYN" | "BZD" | "CAD" | "CDF" | "CHF" | "CHW" | "CLF" | "CLP" | "CNY" | "COP" | "COU" | "CRC" | "CUC" | "CUP" | "CVE" | "CZK" | "DJF" | "DKK" | "DOP" | "DZD" | "EGP" | "ERN" | "ETB" | "EUR" | "FJD" | "FKP" | "GBP" | "GEL" | "GHS" | "GIP" | "GMD" | "GNF" | "GTQ" | "GYD" | "HKD" | "HNL" | "HRK" | "HTG" | "HUF" | "IDR" | "ILS" | "INR" | "IQD" | "IRR" | "ISK" | "JMD" | "JOD" | "JPY" | "KES" | "KGS" | "KHR" | "KMF" | "KPW" | "KRW" | "KWD" | "KYD" | "KZT" | "LAK" | "LBP" | "LKR" | "LRD" | "LSL" | "LYD" | "MAD" | "MDL" | "MGA" | "MMK" | "MNT" | "MOP" | "MRU" | "MUR" | "MVR" | "MWK" | "MXN" | "MXV" | "MYR" | "MZN" | "NAD" | "NGN" | "NIO" | "NOK" | "NPR" | "NZD" | "OMR" | "PAB" | "PEN" | "PGK" | "PHP" | "PKR" | "PLN" | "PYG" | "QAR" | "RON" | "RSD" | "RUB" | "RWF" | "SAR" | "SBD" | "SCR" | "SDG" | "SEK" | "SGD" | "SHP" | "SLL" | "SOS" | "SRD" | "SSP" | "STN" | "SVC" | "SYP" | "SZL" | "THB" | "TJS" | "TMT" | "TND" | "TOP" | "TRY" | "TTD" | "TWD" | "TZS" | "UAH" | "UGX" | "USD" | "USN" | "UYI" | "UYU" | "UYW" | "UZS" | "VES" | "VND" | "VUV" | "WST" | "XAF" | "XAG" | "XAU" | "XBA" | "XBB" | "XBC" | "XBD" | "XCD" | "XDR" | "XOF" | "XPD" | "XPF" | "XPT" | "XSU" | "XTS" | "XUA" | "XXX" | "YER" | "ZAR" | "ZMW" | "ZWL")[] | (model.ErrorResponse & {
12
+ status?: number;
13
+ value?: string;
14
+ })>;
11
15
  getOrganisation(code?: string): Promise<model.Config.Organisation | model.ErrorResponse>;
12
16
  updateOrganisation(request: model.Config.Organisation, code?: string): Promise<model.Config.Organisation | model.ErrorResponse>;
13
17
  getInternalOrganisation(code?: string): Promise<model.Config.InternalOrganisation | model.ErrorResponse>;
@@ -6,8 +6,12 @@ export class Configuration {
6
6
  static create(connection) {
7
7
  return new Configuration(connection);
8
8
  }
9
- async getAvailableCurrency(providerCode = "modulr") {
10
- return await this.connection.get(`${this.folder}/currencies`, { provider: providerCode });
9
+ async getAvailableCurrencies(providerCode = "modulr") {
10
+ const provider = Array.isArray(providerCode) ? providerCode.join(",") : providerCode;
11
+ return await this.connection.get(`${this.folder}/currencies`, { provider: provider });
12
+ }
13
+ async getAllCurrencies() {
14
+ return await this.connection.get(`${this.folder}/currencies/all`);
11
15
  }
12
16
  async getOrganisation(code) {
13
17
  return await this.connection.get(`${this.folder}/organisation${code ? `/${code}` : ""}`);
@@ -1 +1 @@
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;QADhC,WAAM,GAAG,QAAQ,CAAA;IACkB,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,OAAO,MAAM,IAAI,CAAC,UAAU,CAAC,GAAG,CAAa,GAAG,IAAI,CAAC,MAAM,aAAa,EAAE,EAAE,QAAQ,EAAE,YAAY,EAAE,CAAC,CAAA;IACtG,CAAC;IACD,KAAK,CAAC,eAAe,CAAC,IAAa;QAClC,OAAO,MAAM,IAAI,CAAC,UAAU,CAAC,GAAG,CAA4B,GAAG,IAAI,CAAC,MAAM,gBAAgB,IAAI,CAAC,CAAC,CAAC,IAAI,IAAI,EAAE,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAA;IACpH,CAAC;IACD,KAAK,CAAC,kBAAkB,CACvB,OAAkC,EAClC,IAAa;QAEb,OAAO,MAAM,IAAI,CAAC,UAAU,CAAC,IAAI,CAChC,GAAG,IAAI,CAAC,MAAM,gBAAgB,I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I,CAAC,MAAM,QAAQ,QAAQ,CAAC,CAAC,CAAC,IAAI,QAAQ,EAAE,CAAC,CAAC,CAAC,EAAE,EAAE,EACtD,OAAO,CACP,CAAA;IACF,CAAC;IACD,KAAK,CAAC,iBAAiB;QACtB,OAAO,MAAM,IAAI,CAAC,UAAU,CAAC,GAAG,CAAwB,GAAG,IAAI,CAAC,MAAM,SAAS,CAAC,CAAA;IACjF,CAAC;IACD,KAAK,CAAC,qBAAqB,CAAC,QAAgB,EAAE,GAAW;QACxD,OAAO,MAAM,IAAI,CAAC,UAAU,CAAC,GAAG,CAAM,GAAG,IAAI,CAAC,MAAM,QAAQ,QAAQ,IAAI,GAAG,EAAE,CAAC,CAAA;IAC/E,CAAC;IACD,KAAK,CAAC,WAAW;QAChB,OAAO,MAAM,IAAI,CAAC,UAAU,CAAC,GAAG,CAAuB,GAAG,IAAI,CAAC,MAAM,QAAQ,CAAC,CAAA;IAC/E,CAAC;IACD,KAAK,CAAC,WAAW,CAAC,EAAU;QAC3B,OAAO,MAAM,IAAI,CAAC,UAAU,CAAC,GAAG,CAAqB,GAAG,IAAI,CAAC,MAAM,UAAU,EAAE,EAAE,CAAC,CAAA;IACnF,CAAC;CACD"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@pax2pay/client",
3
- "version": "0.9.19",
3
+ "version": "0.9.21",
4
4
  "description": "Client library for the Pax2Pay API",
5
5
  "author": "Pax2Pay Ltd.",
6
6
  "license": "MIT",