Skip to content

Commit c861819

Browse files
committed
Add transaction parameters section to README with usage examples
1 parent 336d7ab commit c861819

1 file changed

Lines changed: 41 additions & 0 deletions

File tree

README.md

Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -215,6 +215,47 @@ For each account-specific transaction, the client provides corresponding `can*`
215215
| `canGetPortfolio(accountNumber?)` | Checks if portfolio information fetching is supported |
216216
| `canGetCreditCardStatements(accountNumber?)` | Checks if credit card statements fetching is supported |
217217

218+
### Transaction Parameters
219+
220+
The configuration object provides methods to access transaction-specific parameters and capabilities provided by the bank:
221+
222+
#### `config.getTransactionParameters<T>(transId: string): T | undefined`
223+
224+
Returns the bank-specific parameters for a transaction type, if available. These parameters contain transaction limits, supported formats, and other bank-specific constraints.
225+
226+
```typescript
227+
// Get parameters for account statements (MT940)
228+
const mt940Params = config.getTransactionParameters<HIKAZSParameter>('HKKAZ');
229+
230+
// Get parameters for account statements (CAMT)
231+
const camtParams = config.getTransactionParameters<HICAZSParameter>('HKCAZ');
232+
233+
// Get parameters for SEPA transactions
234+
const sepaParams = config.getTransactionParameters<HISPASParameter>('HKSPA');
235+
```
236+
237+
#### `config.isTransactionSupported(transId: string): boolean`
238+
239+
Checks whether a specific transaction type is supported by the bank.
240+
241+
```typescript
242+
if (config.isTransactionSupported('HKWPD')) {
243+
console.log('Bank supports portfolio requests');
244+
}
245+
```
246+
247+
#### `config.isAccountTransactionSupported(accountNumber: string, transId: string): boolean`
248+
249+
Checks whether a specific transaction type is supported for a particular account.
250+
251+
```typescript
252+
if (config.isAccountTransactionSupported('1234567890', 'HKWPD')) {
253+
console.log('Account supports portfolio requests');
254+
}
255+
```
256+
257+
**Note**: Transaction IDs correspond to the FinTS segment names (e.g., 'HKKAZ' for account statements, 'HKWPD' for portfolio, 'HKSAL' for balance).
258+
218259
### TAN Continuation Methods
219260

220261
Every transaction that supports TAN authentication has a corresponding `*WithTan` method for continuing the transaction after TAN entry:

0 commit comments

Comments
 (0)