nordlet 0.5.4 → 0.5.6

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.
Files changed (106) hide show
  1. checksums.yaml +4 -4
  2. data/lib/nordlet/account/client.rb +125 -0
  3. data/lib/nordlet/account/types/login_link_request_account_request.rb +2 -0
  4. data/lib/nordlet/account/types/login_link_request_account_request_app.rb +13 -0
  5. data/lib/nordlet/agreements/client.rb +49 -0
  6. data/lib/nordlet/assets/client.rb +42 -0
  7. data/lib/nordlet/audit/client.rb +4 -0
  8. data/lib/nordlet/bank/client.rb +218 -0
  9. data/lib/nordlet/billing/client.rb +45 -0
  10. data/lib/nordlet/calendar/client.rb +18 -0
  11. data/lib/nordlet/capture/client.rb +33 -0
  12. data/lib/nordlet/cash/client.rb +36 -0
  13. data/lib/nordlet/catalog/client.rb +77 -0
  14. data/lib/nordlet/consolidation/client.rb +29 -0
  15. data/lib/nordlet/declarations/client.rb +209 -0
  16. data/lib/nordlet/document_series/client.rb +20 -0
  17. data/lib/nordlet/ecommerce/client.rb +41 -0
  18. data/lib/nordlet/files/client.rb +10 -0
  19. data/lib/nordlet/fleet/client.rb +26 -0
  20. data/lib/nordlet/hr/client.rb +93 -0
  21. data/lib/nordlet/inventory/client.rb +91 -0
  22. data/lib/nordlet/leads/client.rb +49 -0
  23. data/lib/nordlet/ledger/client.rb +74 -0
  24. data/lib/nordlet/officers/client.rb +8 -0
  25. data/lib/nordlet/operation_types/client.rb +20 -0
  26. data/lib/nordlet/partners/client.rb +239 -0
  27. data/lib/nordlet/partners/types/debt_reminders_list_partners_response_rows_item.rb +2 -0
  28. data/lib/nordlet/partners/types/debt_reminders_list_partners_response_rows_item_kind.rb +14 -0
  29. data/lib/nordlet/partners/types/debt_reminders_settings_get_partners_request.rb +9 -0
  30. data/lib/nordlet/partners/types/debt_reminders_settings_get_partners_response.rb +13 -0
  31. data/lib/nordlet/partners/types/debt_reminders_settings_update_partners_request.rb +13 -0
  32. data/lib/nordlet/partners/types/debt_reminders_settings_update_partners_response.rb +13 -0
  33. data/lib/nordlet/partners/types/debt_reminders_upcoming_partners_request.rb +9 -0
  34. data/lib/nordlet/partners/types/debt_reminders_upcoming_partners_response.rb +11 -0
  35. data/lib/nordlet/partners/types/debt_reminders_upcoming_partners_response_rows_item.rb +27 -0
  36. data/lib/nordlet/partners/types/debt_reminders_upcoming_partners_response_rows_item_kind.rb +14 -0
  37. data/lib/nordlet/payroll/client.rb +62 -0
  38. data/lib/nordlet/peppol/client.rb +7 -0
  39. data/lib/nordlet/platform_sellers/client.rb +13 -0
  40. data/lib/nordlet/pos/client.rb +46 -0
  41. data/lib/nordlet/production/client.rb +78 -0
  42. data/lib/nordlet/projects/client.rb +35 -0
  43. data/lib/nordlet/public/client.rb +9 -0
  44. data/lib/nordlet/purchases/client.rb +102 -0
  45. data/lib/nordlet/reference/client.rb +74 -0
  46. data/lib/nordlet/reports/client.rb +108 -0
  47. data/lib/nordlet/sales/client.rb +408 -0
  48. data/lib/nordlet/sales/types/invoices_apply_advance_sales_response.rb +4 -0
  49. data/lib/nordlet/sales/types/invoices_create_sales_request.rb +2 -0
  50. data/lib/nordlet/sales/types/invoices_create_sales_request_locale.rb +15 -0
  51. data/lib/nordlet/sales/types/invoices_create_sales_response.rb +4 -0
  52. data/lib/nordlet/sales/types/invoices_get_sales_response.rb +4 -0
  53. data/lib/nordlet/sales/types/invoices_issue_sales_response.rb +4 -0
  54. data/lib/nordlet/sales/types/invoices_list_sales_response_rows_item.rb +4 -0
  55. data/lib/nordlet/sales/types/invoices_lock_sales_response.rb +4 -0
  56. data/lib/nordlet/sales/types/invoices_unlock_sales_response.rb +4 -0
  57. data/lib/nordlet/sales/types/invoices_update_sales_request.rb +2 -0
  58. data/lib/nordlet/sales/types/invoices_update_sales_request_locale.rb +15 -0
  59. data/lib/nordlet/sales/types/invoices_update_sales_response.rb +4 -0
  60. data/lib/nordlet/sales/types/recurring_invoices_create_sales_request.rb +29 -0
  61. data/lib/nordlet/sales/types/recurring_invoices_create_sales_request_frequency.rb +16 -0
  62. data/lib/nordlet/sales/types/recurring_invoices_create_sales_request_locale.rb +15 -0
  63. data/lib/nordlet/sales/types/recurring_invoices_create_sales_response.rb +51 -0
  64. data/lib/nordlet/sales/types/recurring_invoices_create_sales_response_frequency.rb +16 -0
  65. data/lib/nordlet/sales/types/recurring_invoices_create_sales_response_status.rb +15 -0
  66. data/lib/nordlet/sales/types/recurring_invoices_delete_sales_request.rb +11 -0
  67. data/lib/nordlet/sales/types/recurring_invoices_delete_sales_response.rb +11 -0
  68. data/lib/nordlet/sales/types/recurring_invoices_generate_sales_request.rb +11 -0
  69. data/lib/nordlet/sales/types/recurring_invoices_generate_sales_response.rb +21 -0
  70. data/lib/nordlet/sales/types/recurring_invoices_generate_sales_response_recurring_invoice.rb +51 -0
  71. data/lib/nordlet/sales/types/recurring_invoices_generate_sales_response_recurring_invoice_frequency.rb +16 -0
  72. data/lib/nordlet/sales/types/recurring_invoices_generate_sales_response_recurring_invoice_status.rb +15 -0
  73. data/lib/nordlet/sales/types/recurring_invoices_get_sales_request.rb +11 -0
  74. data/lib/nordlet/sales/types/recurring_invoices_get_sales_response.rb +51 -0
  75. data/lib/nordlet/sales/types/recurring_invoices_get_sales_response_frequency.rb +16 -0
  76. data/lib/nordlet/sales/types/recurring_invoices_get_sales_response_status.rb +15 -0
  77. data/lib/nordlet/sales/types/recurring_invoices_list_sales_request.rb +19 -0
  78. data/lib/nordlet/sales/types/recurring_invoices_list_sales_request_filter_item.rb +15 -0
  79. data/lib/nordlet/sales/types/recurring_invoices_list_sales_request_filter_item_op.rb +18 -0
  80. data/lib/nordlet/sales/types/recurring_invoices_list_sales_request_filter_item_value.rb +19 -0
  81. data/lib/nordlet/sales/types/recurring_invoices_list_sales_request_filter_item_value_three_item.rb +15 -0
  82. data/lib/nordlet/sales/types/recurring_invoices_list_sales_request_sort_item.rb +13 -0
  83. data/lib/nordlet/sales/types/recurring_invoices_list_sales_request_sort_item_dir.rb +14 -0
  84. data/lib/nordlet/sales/types/recurring_invoices_list_sales_response.rb +21 -0
  85. data/lib/nordlet/sales/types/recurring_invoices_list_sales_response_rows_item.rb +51 -0
  86. data/lib/nordlet/sales/types/recurring_invoices_list_sales_response_rows_item_frequency.rb +16 -0
  87. data/lib/nordlet/sales/types/recurring_invoices_list_sales_response_rows_item_status.rb +15 -0
  88. data/lib/nordlet/sales/types/recurring_invoices_run_sales_request.rb +11 -0
  89. data/lib/nordlet/sales/types/recurring_invoices_run_sales_response.rb +13 -0
  90. data/lib/nordlet/sales/types/recurring_invoices_run_sales_response_errors_item.rb +13 -0
  91. data/lib/nordlet/sales/types/recurring_invoices_run_sales_response_generated_item.rb +19 -0
  92. data/lib/nordlet/sales/types/recurring_invoices_update_sales_request.rb +35 -0
  93. data/lib/nordlet/sales/types/recurring_invoices_update_sales_request_frequency.rb +16 -0
  94. data/lib/nordlet/sales/types/recurring_invoices_update_sales_request_locale.rb +15 -0
  95. data/lib/nordlet/sales/types/recurring_invoices_update_sales_request_status.rb +14 -0
  96. data/lib/nordlet/sales/types/recurring_invoices_update_sales_response.rb +51 -0
  97. data/lib/nordlet/sales/types/recurring_invoices_update_sales_response_frequency.rb +16 -0
  98. data/lib/nordlet/sales/types/recurring_invoices_update_sales_response_status.rb +15 -0
  99. data/lib/nordlet/transport/client.rb +20 -0
  100. data/lib/nordlet/version.rb +1 -1
  101. data/lib/nordlet/webhooks/client.rb +20 -0
  102. data/lib/nordlet/webhooks/types/subscriptions_create_webhooks_request_events_item.rb +1 -0
  103. data/lib/nordlet/webhooks/types/subscriptions_update_webhooks_request_events_item.rb +1 -0
  104. data/lib/nordlet.rb +51 -0
  105. data/reference.md +11974 -2959
  106. metadata +53 -2
@@ -10,6 +10,11 @@ module Nordlet
10
10
  @client = client
11
11
  end
12
12
 
13
+ # Create a bank, Stripe or broker account. `currency` defaults to the company base currency and `accountCode` to
14
+ # the default bank account of the chart of accounts. A `documentRef` also creates a bank agreement with that
15
+ # document attached. A Stripe account with an `iban` is refused with 422; an account with the same IBAN already
16
+ # existing answers 409.
17
+ #
13
18
  # @param request_options [Hash]
14
19
  # @param params [Nordlet::Bank::Types::AccountsCreateBankRequest]
15
20
  # @option request_options [String] :base_url
@@ -42,6 +47,9 @@ module Nordlet
42
47
  end
43
48
  end
44
49
 
50
+ # List the bank accounts of the company. Filterable by name, type, iban and isActive; sortable by name and
51
+ # createdAt.
52
+ #
45
53
  # @param request_options [Hash]
46
54
  # @param params [Nordlet::Bank::Types::AccountsListBankRequest]
47
55
  # @option request_options [String] :base_url
@@ -74,6 +82,9 @@ module Nordlet
74
82
  end
75
83
  end
76
84
 
85
+ # Change the name, type, IBAN, ledger account code or active flag of a bank account. Setting type to stripe clears
86
+ # the IBAN, and sending an `iban` together with it is refused with 422.
87
+ #
77
88
  # @param request_options [Hash]
78
89
  # @param params [Nordlet::Bank::Types::AccountsUpdateBankRequest]
79
90
  # @option request_options [String] :base_url
@@ -106,6 +117,11 @@ module Nordlet
106
117
  end
107
118
  end
108
119
 
120
+ # Insert statement lines (up to 1000 per call) into a bank account as new transactions. A line without `currency`
121
+ # takes the account currency; a line in another currency is refused with 422. A line whose `externalId` is already
122
+ # on the account is skipped and counted in `skipped`. An incoming line that an active match rule
123
+ # (`bank/match-rules/create`) recognises is linked to its settlement batch.
124
+ #
109
125
  # @param request_options [Hash]
110
126
  # @param params [Nordlet::Bank::Types::TransactionsImportBankRequest]
111
127
  # @option request_options [String] :base_url
@@ -138,6 +154,17 @@ module Nordlet
138
154
  end
139
155
  end
140
156
 
157
+ # Import a statement file into a bank account: camt.053 XML, MT940, a Stripe balance CSV or a Revolut Business
158
+ # CSV, chosen by `format` or by the type of `templateId` (an iso20022 template also takes MT940 content).
159
+ # Statements whose IBAN or currency differ from the account are left out; the call is refused with 422 when none
160
+ # remains, when a line is in another currency, when the file lacks the columns or elements the template requires
161
+ # or when it holds more than 50000 lines. Lines already on the account are skipped, and Stripe movements already
162
+ # posted through a settlement payout are skipped with a warning. With a template, the mapped fields are posted to
163
+ # their ledger accounts, partners are created, payments are matched to the invoices they reference, and invoices,
164
+ # credit notes or advance invoices are issued where the template asks for them (`invoiceMetaField`,
165
+ # `advanceInvoices`); `transfersCsv` posts the lender payouts and commissions of a Stripe template. Invoices
166
+ # issued this way are announced as `sale_invoice.issued`.
167
+ #
141
168
  # @param request_options [Hash]
142
169
  # @param params [Nordlet::Bank::Types::StatementsImportBankRequest]
143
170
  # @option request_options [String] :base_url
@@ -170,6 +197,9 @@ module Nordlet
170
197
  end
171
198
  end
172
199
 
200
+ # List the bank transactions of the company. Filterable by id, bankAccountId, status, matchedDocumentId, date,
201
+ # amount, counterpartyIban, counterpartyName and externalId; sortable by date, createdAt and amount.
202
+ #
173
203
  # @param request_options [Hash]
174
204
  # @param params [Nordlet::Bank::Types::TransactionsListBankRequest]
175
205
  # @option request_options [String] :base_url
@@ -202,6 +232,15 @@ module Nordlet
202
232
  end
203
233
  end
204
234
 
235
+ # Match one new bank transaction to a document: an issued sale invoice or advance for incoming money; an issued
236
+ # sale credit note, a registered purchase invoice or an approved payroll run (company currency only) for outgoing
237
+ # money. Posts the payment journal transaction between the bank account and the receivable, payable or net payable
238
+ # account, with any exchange difference on the gain or loss account, raises the paid amount of the document and
239
+ # sets the line to matched. `invoiceAmount` states the amount settled on an invoice in another currency; in the
240
+ # same currency it must equal the payment (422). Answers 409 when the line is already matched, when the amount
241
+ # exceeds the remaining balance of the document or when the accounting period of the line date is locked. A
242
+ # document that becomes fully paid is announced as `sale_invoice.paid` or `purchase_invoice.paid`.
243
+ #
205
244
  # @param request_options [Hash]
206
245
  # @param params [Nordlet::Bank::Types::TransactionsMatchBankRequest]
207
246
  # @option request_options [String] :base_url
@@ -234,6 +273,14 @@ module Nordlet
234
273
  end
235
274
  end
236
275
 
276
+ # The documents are issued sale invoices or advances for incoming money; issued sale credit notes, registered
277
+ # purchase invoices or approved payroll runs for outgoing money. Each must be in the currency of the payment, each
278
+ # allocation must be above zero, a document may appear once and the allocations must add up to the payment (422
279
+ # otherwise). One journal transaction carries the bank entry, one entry per document and any exchange difference;
280
+ # the line is matched as an `invoice_allocation`. Answers 409 when the line is already matched, when an allocation
281
+ # exceeds the remaining balance of its document or when the accounting period of the line date is locked. Each
282
+ # document that becomes fully paid is announced as `sale_invoice.paid` or `purchase_invoice.paid`.
283
+ #
237
284
  # @param request_options [Hash]
238
285
  # @param params [Nordlet::Bank::Types::TransactionsMatchManyBankRequest]
239
286
  # @option request_options [String] :base_url
@@ -302,6 +349,11 @@ module Nordlet
302
349
  end
303
350
  end
304
351
 
352
+ # Record a payment that is on no imported statement: inserts a bank transaction on the account dated `date`
353
+ # (positive for a sale invoice, negative for a purchase invoice or payroll run, in the account currency) and
354
+ # matches it to the document with the checks, posting and `sale_invoice.paid` or `purchase_invoice.paid` event of
355
+ # `bank/transactions/match`.
356
+ #
305
357
  # @param request_options [Hash]
306
358
  # @param params [Nordlet::Bank::Types::TransactionsRecordBankRequest]
307
359
  # @option request_options [String] :base_url
@@ -334,6 +386,12 @@ module Nordlet
334
386
  end
335
387
  end
336
388
 
389
+ # Build a SEPA credit transfer file (pain.001.001.03) that pays the remaining amount of each registered purchase
390
+ # invoice from the bank account on `executionDate` (default: today), to the partner's default bank account. The
391
+ # bank account needs an IBAN and every invoice must be in EUR and have a partner bank account on file (422
392
+ # otherwise, see `partners/bank-accounts/create`); an invoice that is already paid answers 409. The file is
393
+ # returned as `xml`; nothing is posted or marked paid.
394
+ #
337
395
  # @param request_options [Hash]
338
396
  # @param params [Nordlet::Bank::Types::PaymentsExportBankRequest]
339
397
  # @option request_options [String] :base_url
@@ -366,6 +424,13 @@ module Nordlet
366
424
  end
367
425
  end
368
426
 
427
+ # A template of type stripe, iso20022, revolut or bank_connection names the fields of the file or feed: a field
428
+ # with an `accountCode` is posted to that ledger account on import, a field with `createPartner` creates the
429
+ # customer, supplier or fee partner. `invoiceMetaField` is the Stripe metadata key (stripe) or the reference field
430
+ # (other types) by which payments are linked to invoices; with it `invoiceVatRatePercent`, `invoiceItemId` and,
431
+ # outside Stripe, `advanceInvoices` apply. `companyMetaField`, `lenderMetaField`, the operation types and the
432
+ # refund labels are for Stripe templates only. A template with the same name already existing answers 409.
433
+ #
369
434
  # @param request_options [Hash]
370
435
  # @param params [Nordlet::Bank::Types::ImportTemplatesCreateBankRequest]
371
436
  # @option request_options [String] :base_url
@@ -398,6 +463,10 @@ module Nordlet
398
463
  end
399
464
  end
400
465
 
466
+ # Change a company import template under the rules of `bank/import-templates/create`; a change of `type` re-checks
467
+ # the existing fields against the new type. Built-in templates cannot be changed. A name already used by another
468
+ # template answers 409.
469
+ #
401
470
  # @param request_options [Hash]
402
471
  # @param params [Nordlet::Bank::Types::ImportTemplatesUpdateBankRequest]
403
472
  # @option request_options [String] :base_url
@@ -430,6 +499,8 @@ module Nordlet
430
499
  end
431
500
  end
432
501
 
502
+ # Delete a company import template. Built-in templates cannot be deleted.
503
+ #
433
504
  # @param request_options [Hash]
434
505
  # @param params [Nordlet::Bank::Types::ImportTemplatesDeleteBankRequest]
435
506
  # @option request_options [String] :base_url
@@ -462,6 +533,8 @@ module Nordlet
462
533
  end
463
534
  end
464
535
 
536
+ # Read one import template, a company one or a built-in one.
537
+ #
465
538
  # @param request_options [Hash]
466
539
  # @param params [Nordlet::Bank::Types::ImportTemplatesGetBankRequest]
467
540
  # @option request_options [String] :base_url
@@ -494,6 +567,11 @@ module Nordlet
494
567
  end
495
568
  end
496
569
 
570
+ # Today the Revolut Business template: the Revolut CSV fields, with fees, card payments and top-ups posted to the
571
+ # accounts of the posting rules, the sender and beneficiary names creating partners and the Reference column
572
+ # linking payments to invoices. The rows carry `builtin: true`, are readable with `bank/import-templates/get` and
573
+ # are not in `bank/import-templates/list`.
574
+ #
497
575
  # @param request_options [Hash]
498
576
  # @param params [Nordlet::Bank::Types::ImportTemplatesListBuiltinBankRequest]
499
577
  # @option request_options [String] :base_url
@@ -526,6 +604,9 @@ module Nordlet
526
604
  end
527
605
  end
528
606
 
607
+ # List the import templates of the company (the built-in ones are under `bank/import-templates/list-builtin`).
608
+ # Filterable by name and type; sortable by name and createdAt.
609
+ #
529
610
  # @param request_options [Hash]
530
611
  # @param params [Nordlet::Bank::Types::ImportTemplatesListBankRequest]
531
612
  # @option request_options [String] :base_url
@@ -558,6 +639,13 @@ module Nordlet
558
639
  end
559
640
  end
560
641
 
642
+ # Create a rule that links incoming bank lines to the settlement batches of a payment provider when lines are
643
+ # imported and when a batch is posted. A line whose description, counterparty name or external id contains
644
+ # `pattern` (case-insensitive) is linked to the open batch of `provider` whose payout id follows `payoutIdPrefix`
645
+ # in the line text or, without a prefix, to the single open batch on the same bank account with the same currency
646
+ # and net amount and a payout date within `dateWindowDays` of the line date. `bankAccountId` limits the rule to
647
+ # one account.
648
+ #
561
649
  # @param request_options [Hash]
562
650
  # @param params [Nordlet::Bank::Types::MatchRulesCreateBankRequest]
563
651
  # @option request_options [String] :base_url
@@ -590,6 +678,8 @@ module Nordlet
590
678
  end
591
679
  end
592
680
 
681
+ # Change a match rule; `payoutIdPrefix` and `bankAccountId` are cleared with null.
682
+ #
593
683
  # @param request_options [Hash]
594
684
  # @param params [Nordlet::Bank::Types::MatchRulesUpdateBankRequest]
595
685
  # @option request_options [String] :base_url
@@ -622,6 +712,8 @@ module Nordlet
622
712
  end
623
713
  end
624
714
 
715
+ # Delete a match rule.
716
+ #
625
717
  # @param request_options [Hash]
626
718
  # @param params [Nordlet::Bank::Types::MatchRulesDeleteBankRequest]
627
719
  # @option request_options [String] :base_url
@@ -654,6 +746,8 @@ module Nordlet
654
746
  end
655
747
  end
656
748
 
749
+ # List the match rules of the company, ordered by name.
750
+ #
657
751
  # @param request_options [Hash]
658
752
  # @param params [Nordlet::Bank::Types::MatchRulesListBankRequest]
659
753
  # @option request_options [String] :base_url
@@ -686,6 +780,11 @@ module Nordlet
686
780
  end
687
781
  end
688
782
 
783
+ # Record a SEPA direct debit mandate a partner has signed: debtor IBAN and BIC, scheme (CORE or B2B), recurrent or
784
+ # one-off, and the signature date. `reference` is the mandate reference written into the collection files; without
785
+ # one `MNDT-` followed by a generated id is used. `debtorName` defaults to the partner name. A reference already
786
+ # in use answers 409.
787
+ #
689
788
  # @param request_options [Hash]
690
789
  # @param params [Nordlet::Bank::Types::MandatesCreateBankRequest]
691
790
  # @option request_options [String] :base_url
@@ -718,6 +817,8 @@ module Nordlet
718
817
  end
719
818
  end
720
819
 
820
+ # Change the BIC, debtor name or notes of a mandate.
821
+ #
721
822
  # @param request_options [Hash]
722
823
  # @param params [Nordlet::Bank::Types::MandatesUpdateBankRequest]
723
824
  # @option request_options [String] :base_url
@@ -750,6 +851,8 @@ module Nordlet
750
851
  end
751
852
  end
752
853
 
854
+ # Cancel an active mandate. A mandate that is already cancelled or completed answers 409.
855
+ #
753
856
  # @param request_options [Hash]
754
857
  # @param params [Nordlet::Bank::Types::MandatesCancelBankRequest]
755
858
  # @option request_options [String] :base_url
@@ -782,6 +885,9 @@ module Nordlet
782
885
  end
783
886
  end
784
887
 
888
+ # Read one mandate. `expiresOn` is 36 months after the last collection, or after the signature date when nothing
889
+ # has been collected.
890
+ #
785
891
  # @param request_options [Hash]
786
892
  # @param params [Nordlet::Bank::Types::MandatesGetBankRequest]
787
893
  # @option request_options [String] :base_url
@@ -814,6 +920,9 @@ module Nordlet
814
920
  end
815
921
  end
816
922
 
923
+ # List the mandates of the company. Filterable by partnerId, status, scheme, reference and iban; sortable by
924
+ # createdAt and signatureDate.
925
+ #
817
926
  # @param request_options [Hash]
818
927
  # @param params [Nordlet::Bank::Types::MandatesListBankRequest]
819
928
  # @option request_options [String] :base_url
@@ -846,6 +955,11 @@ module Nordlet
846
955
  end
847
956
  end
848
957
 
958
+ # List the issued EUR sale invoices that are unpaid or partly paid and whose partner holds an active mandate, each
959
+ # with the mandate `bank/direct-debits/export` would use (the most recently signed active one). Filterable by
960
+ # partnerId, fullNumber, issueDate and dueDate; sortable by issueDate, dueDate, fullNumber, grossTotal and
961
+ # createdAt.
962
+ #
849
963
  # @param request_options [Hash]
850
964
  # @param params [Nordlet::Bank::Types::DirectDebitsCandidatesBankRequest]
851
965
  # @option request_options [String] :base_url
@@ -878,6 +992,15 @@ module Nordlet
878
992
  end
879
993
  end
880
994
 
995
+ # Build a SEPA direct debit file (pain.008.001.02) that collects the remaining amount of each issued EUR sale
996
+ # invoice into the bank account on `collectionDate` (default: today) under the partner's most recently signed
997
+ # active mandate. The bank account needs an IBAN and the company a valid `sepaCreditorId` (422, see
998
+ # `account/companies/update`); an invoice whose partner has no active mandate, or whose mandate expired (36 months
999
+ # without a collection), answers 422; an invoice already paid, or a one-off mandate asked to collect more than one
1000
+ # invoice, answers 409. The sequence type is OOFF for a one-off mandate, FRST for the first collection under a
1001
+ # recurrent one and RCUR after that. On success the collection count and last collection date of each mandate are
1002
+ # advanced and a one-off mandate is completed; nothing is posted.
1003
+ #
881
1004
  # @param request_options [Hash]
882
1005
  # @param params [Nordlet::Bank::Types::DirectDebitsExportBankRequest]
883
1006
  # @option request_options [String] :base_url
@@ -910,6 +1033,13 @@ module Nordlet
910
1033
  end
911
1034
  end
912
1035
 
1036
+ # Suggest documents for a new bank transaction: issued sale invoices and advances for incoming money; registered
1037
+ # purchase invoices, issued sale credit notes and approved payroll runs for outgoing money. Candidates are unpaid
1038
+ # documents whose remaining balance covers the payment (any balance when in another currency), scored by an equal
1039
+ # remaining balance, the document number or payroll period in the payment description and a counterparty IBAN or
1040
+ # name matching the partner or an employee on the run; the best `limit` come back with their reasons. A
1041
+ # transaction that is already matched answers 409.
1042
+ #
913
1043
  # @param request_options [Hash]
914
1044
  # @param params [Nordlet::Bank::Types::TransactionsSuggestMatchesBankRequest]
915
1045
  # @option request_options [String] :base_url
@@ -942,6 +1072,15 @@ module Nordlet
942
1072
  end
943
1073
  end
944
1074
 
1075
+ # Import a Stripe payout report into settlement batches, one per payout: the itemized payout reconciliation CSV
1076
+ # (`format` payout_reconciliation) or the unified payments export with its Transfer column (unified_payments);
1077
+ # another CSV is refused with 422. Rows without a payout, the payout rows themselves and unsettled payments are
1078
+ # skipped and counted. Each line is matched to an issued sale invoice through the references the report carries
1079
+ # (the external reference of a sales order or an invoice number) or through a charge matched earlier. A payout
1080
+ # already imported receives its new lines while the batch is in status imported and is skipped once posted; a
1081
+ # payout mixing currencies answers 422. Emits `settlement.imported` for a new batch and `settlement.updated` for
1082
+ # one that received lines.
1083
+ #
945
1084
  # @param request_options [Hash]
946
1085
  # @param params [Nordlet::Bank::Types::SettlementsImportBankRequest]
947
1086
  # @option request_options [String] :base_url
@@ -974,6 +1113,9 @@ module Nordlet
974
1113
  end
975
1114
  end
976
1115
 
1116
+ # List the settlement batches with their line counts and the clearing figures against the bank lines. Filterable
1117
+ # by provider, payoutId, status, currency and bankAccountId; sortable by payoutDate, createdAt and netTotal.
1118
+ #
977
1119
  # @param request_options [Hash]
978
1120
  # @param params [Nordlet::Bank::Types::SettlementsListBankRequest]
979
1121
  # @option request_options [String] :base_url
@@ -1006,6 +1148,9 @@ module Nordlet
1006
1148
  end
1007
1149
  end
1008
1150
 
1151
+ # Read one settlement batch with its lines, each with the invoice it is matched to and the bank line that cleared
1152
+ # it (`clearingBooked`, `clearingDifference`, `clearingUnposted`).
1153
+ #
1009
1154
  # @param request_options [Hash]
1010
1155
  # @param params [Nordlet::Bank::Types::SettlementsGetBankRequest]
1011
1156
  # @option request_options [String] :base_url
@@ -1038,6 +1183,10 @@ module Nordlet
1038
1183
  end
1039
1184
  end
1040
1185
 
1186
+ # Match a settlement line to an issued sale invoice or advance by hand (`matchStatus` manual), or clear the match
1187
+ # with `invoiceId` null. Only lines of the categories charge, refund, dispute, dispute_reversal and
1188
+ # partial_capture_reversal can be matched (422), and only while the batch is in status imported (409).
1189
+ #
1041
1190
  # @param request_options [Hash]
1042
1191
  # @param params [Nordlet::Bank::Types::SettlementsMatchBankRequest]
1043
1192
  # @option request_options [String] :base_url
@@ -1174,6 +1323,18 @@ module Nordlet
1174
1323
  end
1175
1324
  end
1176
1325
 
1326
+ # Post a settlement batch dated `date` (default: the payout date, else today): the bank account receives the net
1327
+ # payout, the matched sale invoices are settled against the receivable (the receivable of each partner in a
1328
+ # journal transaction of its own when invoices of several partners are settled), the provider fees, the
1329
+ # marketplace commission and the seller payable are booked, and a payout in another currency is converted at the
1330
+ # rate of that date with the exchange difference against each invoice's own rate on the gain or loss account. A
1331
+ # line without a matched invoice is split by its own rate or amount, else by `commissionPercent`, else parked on
1332
+ # the suspense account; a line already imported as a movement of a bank account is posted against that account
1333
+ # instead. Answers 409 when the batch is already posted or the period is locked, 422 when it has no lines. The
1334
+ # payout is linked to the bank line a match rule recognises. Emits `settlement.posted`, `sale_invoice.paid` for
1335
+ # each invoice that becomes paid and `refund_liability.actual` for refunds of invoices carrying a refund
1336
+ # liability.
1337
+ #
1177
1338
  # @param request_options [Hash]
1178
1339
  # @param params [Nordlet::Bank::Types::SettlementsPostBankRequest]
1179
1340
  # @option request_options [String] :base_url
@@ -1206,6 +1367,15 @@ module Nordlet
1206
1367
  end
1207
1368
  end
1208
1369
 
1370
+ # Import an Interactive Brokers activity statement (CSV) into a bank account of type `broker`; refused with 422
1371
+ # for another account type, a file that is not an IBKR statement, a statement of a different IBKR account than the
1372
+ # bank account already holds, or a trade older than the latest trade already imported (statements go in in date
1373
+ # order). Rows already imported are skipped. Dividends, withholding tax, interest and fees are posted against the
1374
+ # broker account; stock, option and futures trades are matched FIFO against the open lots and post the cost to
1375
+ # `securities.investments` and the realised result to `securities.gain` or `securities.loss` (posting rules), one
1376
+ # journal entry per date in the base currency at the rate of the day (422 without a rate, 409 when the date's
1377
+ # period is locked). Deposits, corporate actions and currency conversions are stored as `not_posted` with a note.
1378
+ #
1209
1379
  # @param request_options [Hash]
1210
1380
  # @param params [Nordlet::Bank::Types::SecuritiesImportBankRequest]
1211
1381
  # @option request_options [String] :base_url
@@ -1238,6 +1408,9 @@ module Nordlet
1238
1408
  end
1239
1409
  end
1240
1410
 
1411
+ # List the securities imports, newest first; filterable by `bankAccountId` and `brokerAccount`, sortable by
1412
+ # `createdAt` and `realizedTotal`.
1413
+ #
1241
1414
  # @param request_options [Hash]
1242
1415
  # @param params [Nordlet::Bank::Types::SecuritiesListBankRequest]
1243
1416
  # @option request_options [String] :base_url
@@ -1270,6 +1443,9 @@ module Nordlet
1270
1443
  end
1271
1444
  end
1272
1445
 
1446
+ # Return one securities import with its operations in date order, each with its posting status, its amounts in the
1447
+ # base currency and the journal transaction it was posted in.
1448
+ #
1273
1449
  # @param request_options [Hash]
1274
1450
  # @param params [Nordlet::Bank::Types::SecuritiesGetBankRequest]
1275
1451
  # @option request_options [String] :base_url
@@ -1302,6 +1478,9 @@ module Nordlet
1302
1478
  end
1303
1479
  end
1304
1480
 
1481
+ # List the imported securities operations, newest first; filterable by `bankAccountId`, `kind`, `status`, `symbol`
1482
+ # and `date`, sortable by `date` and `createdAt`.
1483
+ #
1305
1484
  # @param request_options [Hash]
1306
1485
  # @param params [Nordlet::Bank::Types::SecuritiesOperationsListBankRequest]
1307
1486
  # @option request_options [String] :base_url
@@ -1334,6 +1513,9 @@ module Nordlet
1334
1513
  end
1335
1514
  end
1336
1515
 
1516
+ # Read from the bank-feed provider configured on the API server or in platform settings (Enable Banking or an HTTP
1517
+ # bridge, named in `provider`), for one `country` or all. Without a provider the call answers 503.
1518
+ #
1337
1519
  # @param request_options [Hash]
1338
1520
  # @param params [Nordlet::Bank::Types::FeedsBanksListBankRequest]
1339
1521
  # @option request_options [String] :base_url
@@ -1366,6 +1548,11 @@ module Nordlet
1366
1548
  end
1367
1549
  end
1368
1550
 
1551
+ # Creates a pending bank connection and asks the provider for the authorization page of the bank. `url` is where
1552
+ # the user authorizes access for `validForDays` (default 90); `reference` is the state the bank sends back and
1553
+ # what `bank/feeds/connections/complete` takes. `redirectUrl` falls back to the one in platform settings, and the
1554
+ # call is refused with 422 when neither is set.
1555
+ #
1369
1556
  # @param request_options [Hash]
1370
1557
  # @param params [Nordlet::Bank::Types::FeedsConnectionsStartBankRequest]
1371
1558
  # @option request_options [String] :base_url
@@ -1398,6 +1585,11 @@ module Nordlet
1398
1585
  end
1399
1586
  end
1400
1587
 
1588
+ # Exchanges `code` for a provider session, sets the connection to active with the consent expiry the bank reports,
1589
+ # and records every account of the session as a bank-feed account, not yet linked to a ledger account
1590
+ # (`bank/feeds/accounts/link`). A connection that is already active answers 409. When the provider refuses the
1591
+ # code the connection goes to status error with the message in `error`.
1592
+ #
1401
1593
  # @param request_options [Hash]
1402
1594
  # @param params [Nordlet::Bank::Types::FeedsConnectionsCompleteBankRequest]
1403
1595
  # @option request_options [String] :base_url
@@ -1430,6 +1622,8 @@ module Nordlet
1430
1622
  end
1431
1623
  end
1432
1624
 
1625
+ # Read one bank connection with its bank-feed accounts.
1626
+ #
1433
1627
  # @param request_options [Hash]
1434
1628
  # @param params [Nordlet::Bank::Types::FeedsConnectionsGetBankRequest]
1435
1629
  # @option request_options [String] :base_url
@@ -1462,6 +1656,9 @@ module Nordlet
1462
1656
  end
1463
1657
  end
1464
1658
 
1659
+ # List the bank connections of the company, without their accounts. Filterable by status, provider and
1660
+ # aspspCountry; sortable by createdAt and lastSyncedAt.
1661
+ #
1465
1662
  # @param request_options [Hash]
1466
1663
  # @param params [Nordlet::Bank::Types::FeedsConnectionsListBankRequest]
1467
1664
  # @option request_options [String] :base_url
@@ -1494,6 +1691,10 @@ module Nordlet
1494
1691
  end
1495
1692
  end
1496
1693
 
1694
+ # Closes the provider session when the connection has one and a provider is configured (a failure at the bank does
1695
+ # not stop the call), then deletes the connection and its bank-feed accounts. The ledger bank accounts and the
1696
+ # transactions already imported stay.
1697
+ #
1497
1698
  # @param request_options [Hash]
1498
1699
  # @param params [Nordlet::Bank::Types::FeedsConnectionsDeleteBankRequest]
1499
1700
  # @option request_options [String] :base_url
@@ -1526,6 +1727,10 @@ module Nordlet
1526
1727
  end
1527
1728
  end
1528
1729
 
1730
+ # Give exactly one of `bankAccountId` (an existing ledger bank account) or `createBankAccount` (a new one with the
1731
+ # IBAN and currency of the feed account; `accountCode` defaults to the default bank account of the chart of
1732
+ # accounts). `syncFrom` is the date the first sync starts from; without it the first sync covers the last 90 days.
1733
+ #
1529
1734
  # @param request_options [Hash]
1530
1735
  # @param params [Nordlet::Bank::Types::FeedsAccountsLinkBankRequest]
1531
1736
  # @option request_options [String] :base_url
@@ -1558,6 +1763,10 @@ module Nordlet
1558
1763
  end
1559
1764
  end
1560
1765
 
1766
+ # `importTemplateId` must be a template of type bank_connection, or null to apply none. `syncSchedule` is manual,
1767
+ # daily, weekly or monthly; every account whose schedule is not manual is synced by Nordlet when it is due. At
1768
+ # least one of the two must be given.
1769
+ #
1561
1770
  # @param request_options [Hash]
1562
1771
  # @param params [Nordlet::Bank::Types::FeedsAccountsConfigureBankRequest]
1563
1772
  # @option request_options [String] :base_url
@@ -1590,6 +1799,15 @@ module Nordlet
1590
1799
  end
1591
1800
  end
1592
1801
 
1802
+ # Fetches the transactions of every linked bank-feed account of the connection, or of `feedAccountId` alone, from
1803
+ # `dateFrom` (default: seven days before the last sync, else the `syncFrom` of the account, else 90 days back) to
1804
+ # `dateTo`, and inserts the new ones into the linked ledger bank account; lines already there count as `skipped`.
1805
+ # An import template set on the account is applied as in `bank/statements/import`. Answers 409 when the connection
1806
+ # is not active or has no session, and when the bank returns more than 20 pages for the range (keep `dateFrom` and
1807
+ # set an earlier `dateTo`). A provider failure is written to the `error` of the connection, and one that is not
1808
+ # retryable sets its status to error. The outcome is announced as `bank_feed.synced`, and invoices the template
1809
+ # issues as `sale_invoice.issued`.
1810
+ #
1593
1811
  # @param request_options [Hash]
1594
1812
  # @param params [Nordlet::Bank::Types::FeedsSyncBankRequest]
1595
1813
  # @option request_options [String] :base_url
@@ -10,6 +10,10 @@ module Nordlet
10
10
  @client = client
11
11
  end
12
12
 
13
+ # Return the signed-in user's billing account: plan, account type, status, balance, trial and payment state, the
14
+ # month-to-date usage of the companies the user pays for with an estimate of today's charge, the plan catalogue,
15
+ # and the top-up, automatic top-up and overdraft settings.
16
+ #
13
17
  # @param request_options [Hash]
14
18
  # @param params [Nordlet::Billing::Types::AccountGetBillingRequest]
15
19
  # @option request_options [String] :base_url
@@ -42,6 +46,9 @@ module Nordlet
42
46
  end
43
47
  end
44
48
 
49
+ # Change the plan of the user's flat-rate billing account; answers 409 when the account type is not `flat_rate`.
50
+ # With a Stripe subscription and payments configured, the subscription is moved to the new plan.
51
+ #
45
52
  # @param request_options [Hash]
46
53
  # @param params [Nordlet::Billing::Types::AccountSetPlanBillingRequest]
47
54
  # @option request_options [String] :base_url
@@ -74,6 +81,11 @@ module Nordlet
74
81
  end
75
82
  end
76
83
 
84
+ # Switch the user's billing account between `flat_rate` and `per_request`. With a Stripe subscription and payments
85
+ # configured, the subscription is moved to the plan's price for `flat_rate`; for `per_request` the plan is taken
86
+ # off the subscription, and a subscription that carried only the plan is cancelled, leaving the account without
87
+ # one. When Stripe refuses the change, the previous account type is restored.
88
+ #
77
89
  # @param request_options [Hash]
78
90
  # @param params [Nordlet::Billing::Types::AccountSetAccountTypeBillingRequest]
79
91
  # @option request_options [String] :base_url
@@ -106,6 +118,10 @@ module Nordlet
106
118
  end
107
119
  end
108
120
 
121
+ # Switch automatic top-ups on or off and set their amount. Switching them on needs a Stripe customer, which the
122
+ # first card top-up creates (400 otherwise); when switched on, a top-up is charged at once if the balance is at or
123
+ # below zero, no payment has failed and no top-up was requested in the last 24 hours.
124
+ #
109
125
  # @param request_options [Hash]
110
126
  # @param params [Nordlet::Billing::Types::AccountSetAutoTopUpBillingRequest]
111
127
  # @option request_options [String] :base_url
@@ -138,6 +154,9 @@ module Nordlet
138
154
  end
139
155
  end
140
156
 
157
+ # Set the overdraft cap of the user's billing account: how far usage charges may take the balance below zero
158
+ # before the account is suspended. A suspended account whose balance is within the new cap is activated again.
159
+ #
141
160
  # @param request_options [Hash]
142
161
  # @param params [Nordlet::Billing::Types::AccountSetOverdraftCapBillingRequest]
143
162
  # @option request_options [String] :base_url
@@ -170,6 +189,10 @@ module Nordlet
170
189
  end
171
190
  end
172
191
 
192
+ # Open a Stripe Checkout session for a one-time credit top-up of `amountCents` and return its URL; a Stripe
193
+ # customer is created for the user when there is none. `returnTo` chooses whether Checkout returns to the credits
194
+ # page or to the onboarding plan page, in `locale`. Answers 503 when online payments are not configured.
195
+ #
173
196
  # @param request_options [Hash]
174
197
  # @param params [Nordlet::Billing::Types::TopupCreateBillingRequest]
175
198
  # @option request_options [String] :base_url
@@ -202,6 +225,10 @@ module Nordlet
202
225
  end
203
226
  end
204
227
 
228
+ # Confirm a paid top-up Checkout session by `sessionId` and credit the account at once instead of waiting for the
229
+ # Stripe webhook; a session is credited only once. Answers 404 when the session is not the user's own or is not
230
+ # paid.
231
+ #
205
232
  # @param request_options [Hash]
206
233
  # @param params [Nordlet::Billing::Types::TopupConfirmBillingRequest]
207
234
  # @option request_options [String] :base_url
@@ -234,6 +261,11 @@ module Nordlet
234
261
  end
235
262
  end
236
263
 
264
+ # Open a Stripe Checkout session for a flat-rate subscription on `plan`, with the trial period of `trialDays`
265
+ # days, and return its URL; a Stripe customer is created for the user when there is none. Answers 409 when a
266
+ # flat-rate subscription is already active and 503 when online payments are not configured or the plan has no
267
+ # price.
268
+ #
237
269
  # @param request_options [Hash]
238
270
  # @param params [Nordlet::Billing::Types::FlatRateCreateBillingRequest]
239
271
  # @option request_options [String] :base_url
@@ -266,6 +298,10 @@ module Nordlet
266
298
  end
267
299
  end
268
300
 
301
+ # Confirm a completed flat-rate Checkout session by `sessionId`: the account becomes `flat_rate` on the session's
302
+ # plan with status `active` and the subscription attached, unless the Stripe webhook already did this. Answers 404
303
+ # when the session is not the user's own or not completed.
304
+ #
269
305
  # @param request_options [Hash]
270
306
  # @param params [Nordlet::Billing::Types::FlatRateConfirmBillingRequest]
271
307
  # @option request_options [String] :base_url
@@ -298,6 +334,9 @@ module Nordlet
298
334
  end
299
335
  end
300
336
 
337
+ # Open a Stripe customer portal session that returns to the credits page in `locale`, and return its URL. Answers
338
+ # 503 when online payments are not configured and 400 when the user has no Stripe customer yet.
339
+ #
301
340
  # @param request_options [Hash]
302
341
  # @param params [Nordlet::Billing::Types::PortalCreateBillingRequest]
303
342
  # @option request_options [String] :base_url
@@ -330,6 +369,9 @@ module Nordlet
330
369
  end
331
370
  end
332
371
 
372
+ # List the newest credit transactions of the user's billing account, up to `limit`: trial grants, top-ups, usage
373
+ # charges, activations and adjustments, each with the balance after it.
374
+ #
333
375
  # @param request_options [Hash]
334
376
  # @param params [Nordlet::Billing::Types::TransactionsListBillingRequest]
335
377
  # @option request_options [String] :base_url
@@ -362,6 +404,9 @@ module Nordlet
362
404
  end
363
405
  end
364
406
 
407
+ # List the daily usage records of the companies the user pays for, from `from` to `to`: one row per company, date
408
+ # and metric (API requests, OCR pages, file storage bytes, database bytes, sale invoices).
409
+ #
365
410
  # @param request_options [Hash]
366
411
  # @param params [Nordlet::Billing::Types::UsageListBillingRequest]
367
412
  # @option request_options [String] :base_url