swissfintechinnovations / ca-payment

Common APIs for AIS and PIS
https://www.common-api.ch
Apache License 2.0
0 stars 3 forks source link

Change of type for properties 'amount' and 'exchangeRate' #93

Closed svenbiellmann closed 4 months ago

svenbiellmann commented 4 months ago

The type of the properties 'amount' and 'exchangeRate' shall be changed from 'number' to 'string' in order to be more precise what format/pattern is expected.

IS situation

amount: type: number minimum: 0.00000 maximum: 999999999999.99999 description: The payment amount. example: 10.25

exchangeRate: type: number minimum: 0.000 maximum: 99999999.999 description: The applied exchange rate if source currency is not equal to target currency. example: 0.957

TO-BE situation

amount: type: string pattern: '[0-9]{1,12}([.][0-9]{1,5})?' maxLength: 18 description: The payment amount. example: 10.25

exchangeRate: type: string pattern: '^\d{1,11}$|^(?=\d+[.]\d+$).{3,12}$' maxLength: 12 description: The applied exchange rate if source currency is not equal to target currency. example: 0.957

svenbiellmann commented 4 months ago

Issue is no longer relevant. Won't be discussed an implemented.