nordlet 0.5.3 → 0.5.5

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 (113) hide show
  1. checksums.yaml +4 -4
  2. data/lib/nordlet/account/client.rb +125 -0
  3. data/lib/nordlet/agreements/client.rb +49 -0
  4. data/lib/nordlet/assets/client.rb +42 -0
  5. data/lib/nordlet/audit/client.rb +4 -0
  6. data/lib/nordlet/bank/client.rb +218 -0
  7. data/lib/nordlet/billing/client.rb +45 -0
  8. data/lib/nordlet/calendar/client.rb +18 -0
  9. data/lib/nordlet/capture/client.rb +33 -0
  10. data/lib/nordlet/cash/client.rb +36 -0
  11. data/lib/nordlet/catalog/client.rb +77 -0
  12. data/lib/nordlet/consolidation/client.rb +29 -0
  13. data/lib/nordlet/declarations/client.rb +209 -0
  14. data/lib/nordlet/declarations/types/lt_gpm312compute_declarations_response_rows_item.rb +2 -0
  15. data/lib/nordlet/document_series/client.rb +20 -0
  16. data/lib/nordlet/ecommerce/client.rb +41 -0
  17. data/lib/nordlet/files/client.rb +10 -0
  18. data/lib/nordlet/fleet/client.rb +26 -0
  19. data/lib/nordlet/hr/client.rb +93 -0
  20. data/lib/nordlet/inventory/client.rb +91 -0
  21. data/lib/nordlet/leads/client.rb +49 -0
  22. data/lib/nordlet/ledger/client.rb +78 -3
  23. data/lib/nordlet/officers/client.rb +8 -0
  24. data/lib/nordlet/operation_types/client.rb +20 -0
  25. data/lib/nordlet/partners/client.rb +126 -0
  26. data/lib/nordlet/payroll/client.rb +94 -0
  27. data/lib/nordlet/payroll/types/calc_payroll_request.rb +2 -0
  28. data/lib/nordlet/payroll/types/calc_payroll_request_payments_item.rb +15 -0
  29. data/lib/nordlet/payroll/types/calc_payroll_response_components_item.rb +2 -0
  30. data/lib/nordlet/payroll/types/lines_attendance_payroll_response_additions_item.rb +4 -0
  31. data/lib/nordlet/payroll/types/lines_attendance_payroll_response_components_item.rb +2 -0
  32. data/lib/nordlet/payroll/types/payment_types_list_payroll_request.rb +9 -0
  33. data/lib/nordlet/payroll/types/payment_types_list_payroll_response.rb +15 -0
  34. data/lib/nordlet/payroll/types/payment_types_list_payroll_response_rows_item.rb +15 -0
  35. data/lib/nordlet/payroll/types/runs_approve_payroll_response_component_totals_item.rb +2 -0
  36. data/lib/nordlet/payroll/types/runs_create_payroll_request_lines_item_additions_item.rb +4 -0
  37. data/lib/nordlet/payroll/types/runs_create_payroll_response_component_totals_item.rb +2 -0
  38. data/lib/nordlet/payroll/types/runs_create_payroll_response_lines_item_additions_item.rb +4 -0
  39. data/lib/nordlet/payroll/types/runs_create_payroll_response_lines_item_components_item.rb +2 -0
  40. data/lib/nordlet/payroll/types/runs_get_payroll_response_component_totals_item.rb +2 -0
  41. data/lib/nordlet/payroll/types/runs_get_payroll_response_lines_item_additions_item.rb +4 -0
  42. data/lib/nordlet/payroll/types/runs_get_payroll_response_lines_item_components_item.rb +2 -0
  43. data/lib/nordlet/payroll/types/runs_list_payroll_response_rows_item_component_totals_item.rb +2 -0
  44. data/lib/nordlet/payroll/types/runs_reverse_payroll_response_component_totals_item.rb +2 -0
  45. data/lib/nordlet/peppol/client.rb +7 -0
  46. data/lib/nordlet/platform_sellers/client.rb +13 -0
  47. data/lib/nordlet/pos/client.rb +46 -0
  48. data/lib/nordlet/production/client.rb +78 -0
  49. data/lib/nordlet/projects/client.rb +35 -0
  50. data/lib/nordlet/public/client.rb +9 -0
  51. data/lib/nordlet/purchases/client.rb +102 -0
  52. data/lib/nordlet/reference/client.rb +74 -0
  53. data/lib/nordlet/reports/client.rb +108 -0
  54. data/lib/nordlet/sales/client.rb +408 -0
  55. data/lib/nordlet/sales/types/invoices_apply_advance_sales_response.rb +4 -0
  56. data/lib/nordlet/sales/types/invoices_create_sales_request.rb +2 -0
  57. data/lib/nordlet/sales/types/invoices_create_sales_request_locale.rb +15 -0
  58. data/lib/nordlet/sales/types/invoices_create_sales_response.rb +4 -0
  59. data/lib/nordlet/sales/types/invoices_get_sales_response.rb +4 -0
  60. data/lib/nordlet/sales/types/invoices_issue_sales_response.rb +4 -0
  61. data/lib/nordlet/sales/types/invoices_list_sales_response_rows_item.rb +4 -0
  62. data/lib/nordlet/sales/types/invoices_lock_sales_response.rb +4 -0
  63. data/lib/nordlet/sales/types/invoices_unlock_sales_response.rb +4 -0
  64. data/lib/nordlet/sales/types/invoices_update_sales_request.rb +2 -0
  65. data/lib/nordlet/sales/types/invoices_update_sales_request_locale.rb +15 -0
  66. data/lib/nordlet/sales/types/invoices_update_sales_response.rb +4 -0
  67. data/lib/nordlet/sales/types/recurring_invoices_create_sales_request.rb +29 -0
  68. data/lib/nordlet/sales/types/recurring_invoices_create_sales_request_frequency.rb +16 -0
  69. data/lib/nordlet/sales/types/recurring_invoices_create_sales_request_locale.rb +15 -0
  70. data/lib/nordlet/sales/types/recurring_invoices_create_sales_response.rb +51 -0
  71. data/lib/nordlet/sales/types/recurring_invoices_create_sales_response_frequency.rb +16 -0
  72. data/lib/nordlet/sales/types/recurring_invoices_create_sales_response_status.rb +15 -0
  73. data/lib/nordlet/sales/types/recurring_invoices_delete_sales_request.rb +11 -0
  74. data/lib/nordlet/sales/types/recurring_invoices_delete_sales_response.rb +11 -0
  75. data/lib/nordlet/sales/types/recurring_invoices_generate_sales_request.rb +11 -0
  76. data/lib/nordlet/sales/types/recurring_invoices_generate_sales_response.rb +21 -0
  77. data/lib/nordlet/sales/types/recurring_invoices_generate_sales_response_recurring_invoice.rb +51 -0
  78. data/lib/nordlet/sales/types/recurring_invoices_generate_sales_response_recurring_invoice_frequency.rb +16 -0
  79. data/lib/nordlet/sales/types/recurring_invoices_generate_sales_response_recurring_invoice_status.rb +15 -0
  80. data/lib/nordlet/sales/types/recurring_invoices_get_sales_request.rb +11 -0
  81. data/lib/nordlet/sales/types/recurring_invoices_get_sales_response.rb +51 -0
  82. data/lib/nordlet/sales/types/recurring_invoices_get_sales_response_frequency.rb +16 -0
  83. data/lib/nordlet/sales/types/recurring_invoices_get_sales_response_status.rb +15 -0
  84. data/lib/nordlet/sales/types/recurring_invoices_list_sales_request.rb +19 -0
  85. data/lib/nordlet/sales/types/recurring_invoices_list_sales_request_filter_item.rb +15 -0
  86. data/lib/nordlet/sales/types/recurring_invoices_list_sales_request_filter_item_op.rb +18 -0
  87. data/lib/nordlet/sales/types/recurring_invoices_list_sales_request_filter_item_value.rb +19 -0
  88. data/lib/nordlet/sales/types/recurring_invoices_list_sales_request_filter_item_value_three_item.rb +15 -0
  89. data/lib/nordlet/sales/types/recurring_invoices_list_sales_request_sort_item.rb +13 -0
  90. data/lib/nordlet/sales/types/recurring_invoices_list_sales_request_sort_item_dir.rb +14 -0
  91. data/lib/nordlet/sales/types/recurring_invoices_list_sales_response.rb +21 -0
  92. data/lib/nordlet/sales/types/recurring_invoices_list_sales_response_rows_item.rb +51 -0
  93. data/lib/nordlet/sales/types/recurring_invoices_list_sales_response_rows_item_frequency.rb +16 -0
  94. data/lib/nordlet/sales/types/recurring_invoices_list_sales_response_rows_item_status.rb +15 -0
  95. data/lib/nordlet/sales/types/recurring_invoices_run_sales_request.rb +11 -0
  96. data/lib/nordlet/sales/types/recurring_invoices_run_sales_response.rb +13 -0
  97. data/lib/nordlet/sales/types/recurring_invoices_run_sales_response_errors_item.rb +13 -0
  98. data/lib/nordlet/sales/types/recurring_invoices_run_sales_response_generated_item.rb +19 -0
  99. data/lib/nordlet/sales/types/recurring_invoices_update_sales_request.rb +35 -0
  100. data/lib/nordlet/sales/types/recurring_invoices_update_sales_request_frequency.rb +16 -0
  101. data/lib/nordlet/sales/types/recurring_invoices_update_sales_request_locale.rb +15 -0
  102. data/lib/nordlet/sales/types/recurring_invoices_update_sales_request_status.rb +14 -0
  103. data/lib/nordlet/sales/types/recurring_invoices_update_sales_response.rb +51 -0
  104. data/lib/nordlet/sales/types/recurring_invoices_update_sales_response_frequency.rb +16 -0
  105. data/lib/nordlet/sales/types/recurring_invoices_update_sales_response_status.rb +15 -0
  106. data/lib/nordlet/transport/client.rb +20 -0
  107. data/lib/nordlet/version.rb +1 -1
  108. data/lib/nordlet/webhooks/client.rb +20 -0
  109. data/lib/nordlet/webhooks/types/subscriptions_create_webhooks_request_events_item.rb +1 -0
  110. data/lib/nordlet/webhooks/types/subscriptions_update_webhooks_request_events_item.rb +1 -0
  111. data/lib/nordlet.rb +45 -0
  112. data/reference.md +9789 -912
  113. metadata +47 -2
@@ -10,6 +10,8 @@ module Nordlet
10
10
  @client = client
11
11
  end
12
12
 
13
+ # Return the company's negative stock policy.
14
+ #
13
15
  # @param request_options [Hash]
14
16
  # @param params [Nordlet::Inventory::Types::SettingsGetInventoryRequest]
15
17
  # @option request_options [String] :base_url
@@ -42,6 +44,12 @@ module Nordlet
42
44
  end
43
45
  end
44
46
 
47
+ # Set the negative stock policy. With `reject` a consumption larger than the stock on hand of the item in the
48
+ # warehouse is refused with 422. With `allow` the missing quantity is written as a shortage priced at the unit
49
+ # cost of the last receipt in that warehouse (the item's purchase price when there is none); the next receipt of
50
+ # the item there settles the shortage and posts any cost difference between `inventory.cogs` and
51
+ # `inventory.stock`. A consumption from a named lot is refused with 422 under both policies.
52
+ #
45
53
  # @param request_options [Hash]
46
54
  # @param params [Nordlet::Inventory::Types::SettingsUpdateInventoryRequest]
47
55
  # @option request_options [String] :base_url
@@ -74,6 +82,8 @@ module Nordlet
74
82
  end
75
83
  end
76
84
 
85
+ # Create a warehouse. 409 when the code already exists.
86
+ #
77
87
  # @param request_options [Hash]
78
88
  # @param params [Nordlet::Inventory::Types::WarehousesCreateInventoryRequest]
79
89
  # @option request_options [String] :base_url
@@ -106,6 +116,8 @@ module Nordlet
106
116
  end
107
117
  end
108
118
 
119
+ # List the warehouses. Filterable and sortable: code, name.
120
+ #
109
121
  # @param request_options [Hash]
110
122
  # @param params [Nordlet::Inventory::Types::WarehousesListInventoryRequest]
111
123
  # @option request_options [String] :base_url
@@ -138,6 +150,8 @@ module Nordlet
138
150
  end
139
151
  end
140
152
 
153
+ # Change the name or the country code of a warehouse.
154
+ #
141
155
  # @param request_options [Hash]
142
156
  # @param params [Nordlet::Inventory::Types::WarehousesUpdateInventoryRequest]
143
157
  # @option request_options [String] :base_url
@@ -170,6 +184,13 @@ module Nordlet
170
184
  end
171
185
  end
172
186
 
187
+ # Record a manual receipt of an item into a warehouse at `unitCost` (document type `manual_receipt`); the quantity
188
+ # must be positive (422). A lot- or serial-tracked item needs `lotNumber` (422); an unknown lot is created, and
189
+ # `expiryDate` is stored on a lot that has none. A serial-tracked item is received one unit at a time (422), and
190
+ # 409 when that serial number is already in stock. Open shortages of the item in the warehouse (negative stock
191
+ # policy `allow`) are settled from the receipt. Emits `stock.changed`. Receipts against a purchase order go
192
+ # through `purchases/receipts/create`.
193
+ #
173
194
  # @param request_options [Hash]
174
195
  # @param params [Nordlet::Inventory::Types::StockReceiveInventoryRequest]
175
196
  # @option request_options [String] :base_url
@@ -202,6 +223,14 @@ module Nordlet
202
223
  end
203
224
  end
204
225
 
226
+ # Consume a quantity of an item from a warehouse, oldest layers first (from one lot when `lotNumber` is given),
227
+ # and post a journal entry: debit the expense account (`expenseAccountCode`, default the chart's inventory expense
228
+ # account), credit the stock account each consumed layer was received on (the chart's inventory account for layers
229
+ # without one), or `inventoryAccountCode` for the whole cost when given. 409 when the accounting period of `date`
230
+ # is locked; 422 when the stock is insufficient under the `reject` policy or in the named lot. Emits
231
+ # `stock.changed` and, when the consumption takes the available quantity from above a reorder rule's minimum to at
232
+ # or below it, `stock.reorder_needed`.
233
+ #
205
234
  # @param request_options [Hash]
206
235
  # @param params [Nordlet::Inventory::Types::StockWriteOffInventoryRequest]
207
236
  # @option request_options [String] :base_url
@@ -234,6 +263,13 @@ module Nordlet
234
263
  end
235
264
  end
236
265
 
266
+ # Move a quantity of an item from one warehouse to another: the source layers are consumed oldest first (from one
267
+ # lot when `lotNumber` is given) and received in the target with the same quantities, costs, lots and stock
268
+ # accounts (document type `warehouse_transfer`). 422 when both warehouses are the same or the source stock is
269
+ # insufficient under the `reject` policy. `inMovementId` is the first receipt when the consumption spans several
270
+ # lots or stock accounts. Emits `stock.changed` for both warehouses and `stock.reorder_needed` as
271
+ # `inventory/stock/write-off` does.
272
+ #
237
273
  # @param request_options [Hash]
238
274
  # @param params [Nordlet::Inventory::Types::StockTransferInventoryRequest]
239
275
  # @option request_options [String] :base_url
@@ -266,6 +302,16 @@ module Nordlet
266
302
  end
267
303
  end
268
304
 
305
+ # Post a stock count for a warehouse. Each line names an item by `itemId` or `barcode` with its `countedQty`; the
306
+ # difference to the quantity on hand in the warehouse (all lots together) is written off oldest layers first or
307
+ # received as a surplus at `unitCost` (the item's purchase price when omitted; 422 when neither is set), with
308
+ # document type `stock_take`, and a surplus of a lot- or serial-tracked item needs `lotNumber` (422). The shortage
309
+ # cost less the surplus cost is posted in one journal entry between the expense account (`expenseAccountCode`,
310
+ # default the chart's inventory expense account) and the stock accounts (`inventoryAccountCode` for everything
311
+ # when given, else the accounts of the consumed layers and the chart's inventory account for the surpluses);
312
+ # nothing is posted and `journalTransactionId` is null when the net is zero. 409 when the accounting period of
313
+ # `date` is locked. Emits `stock.changed` per adjusted item.
314
+ #
269
315
  # @param request_options [Hash]
270
316
  # @param params [Nordlet::Inventory::Types::StockTakeInventoryRequest]
271
317
  # @option request_options [String] :base_url
@@ -298,6 +344,9 @@ module Nordlet
298
344
  end
299
345
  end
300
346
 
347
+ # Return the quantity and value on hand per item and warehouse, summed from the stock movements, optionally for
348
+ # one `warehouseId` and/or `itemId`. Rows with a zero quantity are left out.
349
+ #
301
350
  # @param request_options [Hash]
302
351
  # @param params [Nordlet::Inventory::Types::StockLevelsInventoryRequest]
303
352
  # @option request_options [String] :base_url
@@ -330,6 +379,9 @@ module Nordlet
330
379
  end
331
380
  end
332
381
 
382
+ # List the stock movements. Filterable: itemId, warehouseId, lotId, direction, documentType, date, quantity,
383
+ # totalCost. Sortable: date, createdAt, quantity, totalCost; default newest first.
384
+ #
333
385
  # @param request_options [Hash]
334
386
  # @param params [Nordlet::Inventory::Types::StockMovementsListInventoryRequest]
335
387
  # @option request_options [String] :base_url
@@ -362,6 +414,9 @@ module Nordlet
362
414
  end
363
415
  end
364
416
 
417
+ # List the lots with their quantity on hand (the remaining quantity of the lot's incoming movements). Filterable:
418
+ # itemId, lotNumber, expiryDate. Sortable: lotNumber, expiryDate, createdAt; default newest first.
419
+ #
365
420
  # @param request_options [Hash]
366
421
  # @param params [Nordlet::Inventory::Types::LotsListInventoryRequest]
367
422
  # @option request_options [String] :base_url
@@ -394,6 +449,8 @@ module Nordlet
394
449
  end
395
450
  end
396
451
 
452
+ # Return a lot with its quantity on hand and its movements in date order.
453
+ #
397
454
  # @param request_options [Hash]
398
455
  # @param params [Nordlet::Inventory::Types::LotsGetInventoryRequest]
399
456
  # @option request_options [String] :base_url
@@ -426,6 +483,8 @@ module Nordlet
426
483
  end
427
484
  end
428
485
 
486
+ # Change the expiry date or the notes of a lot; null clears the value.
487
+ #
429
488
  # @param request_options [Hash]
430
489
  # @param params [Nordlet::Inventory::Types::LotsUpdateInventoryRequest]
431
490
  # @option request_options [String] :base_url
@@ -458,6 +517,16 @@ module Nordlet
458
517
  end
459
518
  end
460
519
 
520
+ # Allocate an extra cost `amount` (positive, whole cents; 422 otherwise) over incoming stock movements, named by
521
+ # `movementIds` or taken from the lines of a goods receipt (`goodsReceiptId`; 422 when the receipt has no stock
522
+ # movements), in proportion to their cost (`by_value`) or quantity (`by_quantity`), largest remainder to the cent.
523
+ # The part of each share that belongs to the quantity still on hand raises the movement's remaining cost and
524
+ # recomputes its unit cost; the part that belongs to quantity already consumed is posted in a journal entry dated
525
+ # `date` debiting `inventory.cogs` and crediting the movement's stock account (`inventory.stock` when it has
526
+ # none), 409 when that period is locked. 422 when a movement is not incoming or the weights sum to zero.
527
+ # `sourceInvoiceId` records the purchase invoice the cost came from. Goods receipts come from
528
+ # `purchases/receipts/create`.
529
+ #
461
530
  # @param request_options [Hash]
462
531
  # @param params [Nordlet::Inventory::Types::LandedCostsCreateInventoryRequest]
463
532
  # @option request_options [String] :base_url
@@ -490,6 +559,8 @@ module Nordlet
490
559
  end
491
560
  end
492
561
 
562
+ # Return a landed cost with its allocation lines and the journal transaction it posted, if any.
563
+ #
493
564
  # @param request_options [Hash]
494
565
  # @param params [Nordlet::Inventory::Types::LandedCostsGetInventoryRequest]
495
566
  # @option request_options [String] :base_url
@@ -522,6 +593,9 @@ module Nordlet
522
593
  end
523
594
  end
524
595
 
596
+ # List the landed costs without their lines. Filterable: date, method, goodsReceiptId, sourceInvoiceId. Sortable:
597
+ # date, createdAt, amount; default newest first.
598
+ #
525
599
  # @param request_options [Hash]
526
600
  # @param params [Nordlet::Inventory::Types::LandedCostsListInventoryRequest]
527
601
  # @option request_options [String] :base_url
@@ -554,6 +628,12 @@ module Nordlet
554
628
  end
555
629
  end
556
630
 
631
+ # Create a reorder rule for an item, for one warehouse or, without `warehouseId`, for the item over all
632
+ # warehouses; one rule per item and warehouse (409). While the rule is active, an outgoing movement or a
633
+ # reservation that takes the available quantity (on hand less reserved) from above `minQty` to at or below it
634
+ # emits `stock.reorder_needed` with the `reorderQty`. `inventory/reorder-rules/check` lists the rules currently at
635
+ # or below their minimum.
636
+ #
557
637
  # @param request_options [Hash]
558
638
  # @param params [Nordlet::Inventory::Types::ReorderRulesCreateInventoryRequest]
559
639
  # @option request_options [String] :base_url
@@ -586,6 +666,9 @@ module Nordlet
586
666
  end
587
667
  end
588
668
 
669
+ # Change the minimum quantity, the reorder quantity (null clears it), the active flag or the notes of a reorder
670
+ # rule.
671
+ #
589
672
  # @param request_options [Hash]
590
673
  # @param params [Nordlet::Inventory::Types::ReorderRulesUpdateInventoryRequest]
591
674
  # @option request_options [String] :base_url
@@ -618,6 +701,8 @@ module Nordlet
618
701
  end
619
702
  end
620
703
 
704
+ # Delete a reorder rule.
705
+ #
621
706
  # @param request_options [Hash]
622
707
  # @param params [Nordlet::Inventory::Types::ReorderRulesDeleteInventoryRequest]
623
708
  # @option request_options [String] :base_url
@@ -650,6 +735,9 @@ module Nordlet
650
735
  end
651
736
  end
652
737
 
738
+ # List the reorder rules. Filterable: itemId, warehouseId, isActive. Sortable: createdAt, minQty; default newest
739
+ # first.
740
+ #
653
741
  # @param request_options [Hash]
654
742
  # @param params [Nordlet::Inventory::Types::ReorderRulesListInventoryRequest]
655
743
  # @option request_options [String] :base_url
@@ -682,6 +770,9 @@ module Nordlet
682
770
  end
683
771
  end
684
772
 
773
+ # Return the active reorder rules whose available quantity (on hand less reserved, in the rule's warehouse or over
774
+ # all warehouses) is at or below `minQty`, with the quantities. Emits no event.
775
+ #
685
776
  # @param request_options [Hash]
686
777
  # @param params [Nordlet::Inventory::Types::ReorderRulesCheckInventoryRequest]
687
778
  # @option request_options [String] :base_url
@@ -10,6 +10,11 @@ module Nordlet
10
10
  @client = client
11
11
  end
12
12
 
13
+ # Creates a lead in status `new`, `contacted`, `qualified` or `lost`. `assignedUserId` must be a member of the
14
+ # company and `sourceId` and `typeId` must exist in it; `countryCode` and `currency` are stored in upper case;
15
+ # `documents` attach uploaded files not yet linked to a record, and `notes` become the lead's first notes with the
16
+ # caller as author. Emits `lead.created`.
17
+ #
13
18
  # @param request_options [Hash]
14
19
  # @param params [Nordlet::Leads::Types::CreateLeadsRequest]
15
20
  # @option request_options [String] :base_url
@@ -42,6 +47,8 @@ module Nordlet
42
47
  end
43
48
  end
44
49
 
50
+ # Returns one lead with its source and type names.
51
+ #
45
52
  # @param request_options [Hash]
46
53
  # @param params [Nordlet::Leads::Types::GetLeadsRequest]
47
54
  # @option request_options [String] :base_url
@@ -74,6 +81,10 @@ module Nordlet
74
81
  end
75
82
  end
76
83
 
84
+ # Changes the given fields of a lead; the clearable fields accept null, `documents` attach more uploaded files,
85
+ # and `countryCode` and `currency` are stored in upper case. A lead that is already converted cannot change
86
+ # `status` (409).
87
+ #
77
88
  # @param request_options [Hash]
78
89
  # @param params [Nordlet::Leads::Types::UpdateLeadsRequest]
79
90
  # @option request_options [String] :base_url
@@ -106,6 +117,8 @@ module Nordlet
106
117
  end
107
118
  end
108
119
 
120
+ # Deletes a lead with its notes and detaches its files, which stay in the company's files without a record.
121
+ #
109
122
  # @param request_options [Hash]
110
123
  # @param params [Nordlet::Leads::Types::DeleteLeadsRequest]
111
124
  # @option request_options [String] :base_url
@@ -138,6 +151,10 @@ module Nordlet
138
151
  end
139
152
  end
140
153
 
154
+ # Lists leads with their source and type names; filterable by `name`, `contactName`, `email`, `phone`, `status`,
155
+ # `sourceId`, `typeId`, `countryCode`, `assignedUserId`, `partnerId`, `estimatedValue` and `createdAt`, sortable
156
+ # by `name`, `status`, `estimatedValue`, `createdAt` and `updatedAt`.
157
+ #
141
158
  # @param request_options [Hash]
142
159
  # @param params [Nordlet::Leads::Types::ListLeadsRequest]
143
160
  # @option request_options [String] :base_url
@@ -170,6 +187,8 @@ module Nordlet
170
187
  end
171
188
  end
172
189
 
190
+ # Adds a note to a lead with the caller as author and refreshes the lead's `updatedAt`.
191
+ #
173
192
  # @param request_options [Hash]
174
193
  # @param params [Nordlet::Leads::Types::NotesCreateLeadsRequest]
175
194
  # @option request_options [String] :base_url
@@ -202,6 +221,8 @@ module Nordlet
202
221
  end
203
222
  end
204
223
 
224
+ # Deletes a lead note.
225
+ #
205
226
  # @param request_options [Hash]
206
227
  # @param params [Nordlet::Leads::Types::NotesDeleteLeadsRequest]
207
228
  # @option request_options [String] :base_url
@@ -234,6 +255,8 @@ module Nordlet
234
255
  end
235
256
  end
236
257
 
258
+ # Lists the notes of a lead, newest first.
259
+ #
237
260
  # @param request_options [Hash]
238
261
  # @param params [Nordlet::Leads::Types::NotesListLeadsRequest]
239
262
  # @option request_options [String] :base_url
@@ -266,6 +289,8 @@ module Nordlet
266
289
  end
267
290
  end
268
291
 
292
+ # Lists the files attached to a lead, newest first.
293
+ #
269
294
  # @param request_options [Hash]
270
295
  # @param params [Nordlet::Leads::Types::FilesListLeadsRequest]
271
296
  # @option request_options [String] :base_url
@@ -298,6 +323,8 @@ module Nordlet
298
323
  end
299
324
  end
300
325
 
326
+ # Creates a lead source; a `name` already used by a source of the company is refused with 409.
327
+ #
301
328
  # @param request_options [Hash]
302
329
  # @param params [Nordlet::Leads::Types::SourcesCreateLeadsRequest]
303
330
  # @option request_options [String] :base_url
@@ -330,6 +357,9 @@ module Nordlet
330
357
  end
331
358
  end
332
359
 
360
+ # Changes the name or `isActive` flag of a lead source; a name already used by another source of the company is
361
+ # refused with 409.
362
+ #
333
363
  # @param request_options [Hash]
334
364
  # @param params [Nordlet::Leads::Types::SourcesUpdateLeadsRequest]
335
365
  # @option request_options [String] :base_url
@@ -362,6 +392,9 @@ module Nordlet
362
392
  end
363
393
  end
364
394
 
395
+ # Deletes a lead source; one still referenced by a lead is refused with 409 and should be deactivated with
396
+ # `leads/sources/update` instead.
397
+ #
365
398
  # @param request_options [Hash]
366
399
  # @param params [Nordlet::Leads::Types::SourcesDeleteLeadsRequest]
367
400
  # @option request_options [String] :base_url
@@ -394,6 +427,8 @@ module Nordlet
394
427
  end
395
428
  end
396
429
 
430
+ # Lists all lead sources of the company, active and inactive, ordered by name.
431
+ #
397
432
  # @param request_options [Hash]
398
433
  # @param params [Nordlet::Leads::Types::SourcesListLeadsRequest]
399
434
  # @option request_options [String] :base_url
@@ -426,6 +461,8 @@ module Nordlet
426
461
  end
427
462
  end
428
463
 
464
+ # Lists the id and name of the active lead sources, ordered by name.
465
+ #
429
466
  # @param request_options [Hash]
430
467
  # @param params [Nordlet::Leads::Types::SourcesOptionsLeadsRequest]
431
468
  # @option request_options [String] :base_url
@@ -458,6 +495,8 @@ module Nordlet
458
495
  end
459
496
  end
460
497
 
498
+ # Creates a lead type; a `name` already used by a type of the company is refused with 409.
499
+ #
461
500
  # @param request_options [Hash]
462
501
  # @param params [Nordlet::Leads::Types::TypesCreateLeadsRequest]
463
502
  # @option request_options [String] :base_url
@@ -490,6 +529,9 @@ module Nordlet
490
529
  end
491
530
  end
492
531
 
532
+ # Changes the name or `isActive` flag of a lead type; a name already used by another type of the company is
533
+ # refused with 409.
534
+ #
493
535
  # @param request_options [Hash]
494
536
  # @param params [Nordlet::Leads::Types::TypesUpdateLeadsRequest]
495
537
  # @option request_options [String] :base_url
@@ -522,6 +564,9 @@ module Nordlet
522
564
  end
523
565
  end
524
566
 
567
+ # Deletes a lead type; one still referenced by a lead is refused with 409 and should be deactivated with
568
+ # `leads/types/update` instead.
569
+ #
525
570
  # @param request_options [Hash]
526
571
  # @param params [Nordlet::Leads::Types::TypesDeleteLeadsRequest]
527
572
  # @option request_options [String] :base_url
@@ -554,6 +599,8 @@ module Nordlet
554
599
  end
555
600
  end
556
601
 
602
+ # Lists all lead types of the company, active and inactive, ordered by name.
603
+ #
557
604
  # @param request_options [Hash]
558
605
  # @param params [Nordlet::Leads::Types::TypesListLeadsRequest]
559
606
  # @option request_options [String] :base_url
@@ -586,6 +633,8 @@ module Nordlet
586
633
  end
587
634
  end
588
635
 
636
+ # Lists the id and name of the active lead types, ordered by name.
637
+ #
589
638
  # @param request_options [Hash]
590
639
  # @param params [Nordlet::Leads::Types::TypesOptionsLeadsRequest]
591
640
  # @option request_options [String] :base_url
@@ -10,6 +10,9 @@ module Nordlet
10
10
  @client = client
11
11
  end
12
12
 
13
+ # Lists the company's chart of accounts. Filterable by `code`, `name`, `type` and `isPostable`; sortable by `code`
14
+ # and `name`.
15
+ #
13
16
  # @param request_options [Hash]
14
17
  # @param params [Nordlet::Ledger::Types::AccountsListLedgerRequest]
15
18
  # @option request_options [String] :base_url
@@ -42,6 +45,9 @@ module Nordlet
42
45
  end
43
46
  end
44
47
 
48
+ # Adds an account to the company's chart of accounts. `parentId` must name an account of the same company. Answers
49
+ # 409 when an account with the same `code` already exists.
50
+ #
45
51
  # @param request_options [Hash]
46
52
  # @param params [Nordlet::Ledger::Types::AccountsCreateLedgerRequest]
47
53
  # @option request_options [String] :base_url
@@ -74,6 +80,9 @@ module Nordlet
74
80
  end
75
81
  end
76
82
 
83
+ # Changes the name, parent or postability of an account; the code and type cannot be changed. An account cannot be
84
+ # its own parent.
85
+ #
77
86
  # @param request_options [Hash]
78
87
  # @param params [Nordlet::Ledger::Types::AccountsUpdateLedgerRequest]
79
88
  # @option request_options [String] :base_url
@@ -106,6 +115,10 @@ module Nordlet
106
115
  end
107
116
  end
108
117
 
118
+ # Adds the accounts of the company's chart template that the chart does not have yet (an account whose code
119
+ # already exists is not replaced) and sets the parent links the template defines. Returns the number of accounts
120
+ # in the chart afterwards.
121
+ #
109
122
  # @param request_options [Hash]
110
123
  # @param params [Nordlet::Ledger::Types::AccountsApplyTemplateLedgerRequest]
111
124
  # @option request_options [String] :base_url
@@ -139,9 +152,10 @@ module Nordlet
139
152
  end
140
153
 
141
154
  # Replaces the seeded chart with the chart template of the company country (the Romanian general chart for a
142
- # company registered in Romania, the Lithuanian standard chart otherwise) and switches the posting defaults with
143
- # it. Answers 409 when the company already uses that chart, has journal entries, holds accounts created by hand,
144
- # or has settings that name an account the new chart does not have.
155
+ # company registered in Romania, the Estonian e-arveldaja chart for a company registered in Estonia, the
156
+ # Lithuanian standard chart otherwise) and switches the posting defaults with it. Answers 409 when the company
157
+ # already uses that chart, has journal entries, holds accounts created by hand, or has settings that name an
158
+ # account the new chart does not have.
145
159
  #
146
160
  # @param request_options [Hash]
147
161
  # @param params [Nordlet::Ledger::Types::AccountsSwitchChartLedgerRequest]
@@ -175,6 +189,9 @@ module Nordlet
175
189
  end
176
190
  end
177
191
 
192
+ # Lists the company's accounting periods with their `open` or `locked` status. Filterable by `year`, `month` and
193
+ # `status`; sortable by `year` and `month`.
194
+ #
178
195
  # @param request_options [Hash]
179
196
  # @param params [Nordlet::Ledger::Types::PeriodsListLedgerRequest]
180
197
  # @option request_options [String] :base_url
@@ -207,6 +224,13 @@ module Nordlet
207
224
  end
208
225
  end
209
226
 
227
+ # Locks the month so that postings dated in it are refused with 409 (`ledger/journal/transactions/create`,
228
+ # `cash/orders/create` and `cash/expense-reports/create` among them). Before locking a month that is not locked
229
+ # yet, posts the pending ratable revenue recognition tranches scheduled up to the month end and emits
230
+ # `revenue_recognition.posted` when there were any; when the month is the company's fiscal year end and no
231
+ # year-end close is posted for that year, posts the year-end close that moves the income and expense balances of
232
+ # the fiscal year to the retained earnings account (posting rule `closing.retainedEarnings`).
233
+ #
210
234
  # @param request_options [Hash]
211
235
  # @param params [Nordlet::Ledger::Types::PeriodsLockLedgerRequest]
212
236
  # @option request_options [String] :base_url
@@ -239,6 +263,9 @@ module Nordlet
239
263
  end
240
264
  end
241
265
 
266
+ # Opens the month for posting again. When the month is the company's fiscal year end and a year-end close is
267
+ # posted for it, posts a reversal of that close dated the same day.
268
+ #
242
269
  # @param request_options [Hash]
243
270
  # @param params [Nordlet::Ledger::Types::PeriodsUnlockLedgerRequest]
244
271
  # @option request_options [String] :base_url
@@ -271,6 +298,9 @@ module Nordlet
271
298
  end
272
299
  end
273
300
 
301
+ # Lists journal transactions with the partner name. Filterable by `date`, `status`, `documentType`, `partnerId`
302
+ # and `documentId`; sortable by `date` and `createdAt`.
303
+ #
274
304
  # @param request_options [Hash]
275
305
  # @param params [Nordlet::Ledger::Types::JournalTransactionsListLedgerRequest]
276
306
  # @option request_options [String] :base_url
@@ -303,6 +333,8 @@ module Nordlet
303
333
  end
304
334
  end
305
335
 
336
+ # Creates a cost center, optionally inside a cost center group. Answers 409 when the `code` is already used.
337
+ #
306
338
  # @param request_options [Hash]
307
339
  # @param params [Nordlet::Ledger::Types::CostCentersCreateLedgerRequest]
308
340
  # @option request_options [String] :base_url
@@ -335,6 +367,9 @@ module Nordlet
335
367
  end
336
368
  end
337
369
 
370
+ # Changes the name, group or active flag of a cost center. An inactive cost center is refused on new manual
371
+ # journal entries (`ledger/journal/transactions/create` answers 422).
372
+ #
338
373
  # @param request_options [Hash]
339
374
  # @param params [Nordlet::Ledger::Types::CostCentersUpdateLedgerRequest]
340
375
  # @option request_options [String] :base_url
@@ -367,6 +402,9 @@ module Nordlet
367
402
  end
368
403
  end
369
404
 
405
+ # Lists cost centers with their group name. Filterable by `code`, `name`, `isActive` and `groupId`; sortable by
406
+ # `code`, `name` and `createdAt`.
407
+ #
370
408
  # @param request_options [Hash]
371
409
  # @param params [Nordlet::Ledger::Types::CostCentersListLedgerRequest]
372
410
  # @option request_options [String] :base_url
@@ -399,6 +437,8 @@ module Nordlet
399
437
  end
400
438
  end
401
439
 
440
+ # Creates a cost center group. Answers 409 when the `code` is already used.
441
+ #
402
442
  # @param request_options [Hash]
403
443
  # @param params [Nordlet::Ledger::Types::CostCenterGroupsCreateLedgerRequest]
404
444
  # @option request_options [String] :base_url
@@ -431,6 +471,8 @@ module Nordlet
431
471
  end
432
472
  end
433
473
 
474
+ # Changes the code or name of a cost center group. Answers 409 when the new code is already used.
475
+ #
434
476
  # @param request_options [Hash]
435
477
  # @param params [Nordlet::Ledger::Types::CostCenterGroupsUpdateLedgerRequest]
436
478
  # @option request_options [String] :base_url
@@ -463,6 +505,8 @@ module Nordlet
463
505
  end
464
506
  end
465
507
 
508
+ # Deletes a cost center group. Answers 409 while cost centers are still assigned to it.
509
+ #
466
510
  # @param request_options [Hash]
467
511
  # @param params [Nordlet::Ledger::Types::CostCenterGroupsDeleteLedgerRequest]
468
512
  # @option request_options [String] :base_url
@@ -495,6 +539,8 @@ module Nordlet
495
539
  end
496
540
  end
497
541
 
542
+ # Lists cost center groups. Filterable and sortable by `code` and `name`.
543
+ #
498
544
  # @param request_options [Hash]
499
545
  # @param params [Nordlet::Ledger::Types::CostCenterGroupsListLedgerRequest]
500
546
  # @option request_options [String] :base_url
@@ -527,6 +573,9 @@ module Nordlet
527
573
  end
528
574
  end
529
575
 
576
+ # Lists every posting rule with its default account code on the company's chart template, the account code in
577
+ # effect and whether the company has overridden it.
578
+ #
530
579
  # @param request_options [Hash]
531
580
  # @param params [Nordlet::Ledger::Types::PostingRulesListLedgerRequest]
532
581
  # @option request_options [String] :base_url
@@ -559,6 +608,9 @@ module Nordlet
559
608
  end
560
609
  end
561
610
 
611
+ # Overrides the account code of one or more posting rules; an `accountCode` of null removes the override and the
612
+ # chart default applies again. Every code given must be a postable account of the company's chart, else 422.
613
+ #
562
614
  # @param request_options [Hash]
563
615
  # @param params [Nordlet::Ledger::Types::PostingRulesUpdateLedgerRequest]
564
616
  # @option request_options [String] :base_url
@@ -591,6 +643,9 @@ module Nordlet
591
643
  end
592
644
  end
593
645
 
646
+ # Adds an owner of the company. `equityAccountCode` defaults to the share capital account of the company's chart;
647
+ # a code that is not in the chart of accounts answers 422.
648
+ #
594
649
  # @param request_options [Hash]
595
650
  # @param params [Nordlet::Ledger::Types::OwnersCreateLedgerRequest]
596
651
  # @option request_options [String] :base_url
@@ -623,6 +678,8 @@ module Nordlet
623
678
  end
624
679
  end
625
680
 
681
+ # Changes the fields of an owner. An `equityAccountCode` that is not in the chart of accounts answers 422.
682
+ #
626
683
  # @param request_options [Hash]
627
684
  # @param params [Nordlet::Ledger::Types::OwnersUpdateLedgerRequest]
628
685
  # @option request_options [String] :base_url
@@ -655,6 +712,8 @@ module Nordlet
655
712
  end
656
713
  end
657
714
 
715
+ # Deletes an owner.
716
+ #
658
717
  # @param request_options [Hash]
659
718
  # @param params [Nordlet::Ledger::Types::OwnersDeleteLedgerRequest]
660
719
  # @option request_options [String] :base_url
@@ -687,6 +746,8 @@ module Nordlet
687
746
  end
688
747
  end
689
748
 
749
+ # Lists the company's owners. Filterable by `name` and `code`; sortable by `name` and `createdAt`.
750
+ #
690
751
  # @param request_options [Hash]
691
752
  # @param params [Nordlet::Ledger::Types::OwnersListLedgerRequest]
692
753
  # @option request_options [String] :base_url
@@ -719,6 +780,8 @@ module Nordlet
719
780
  end
720
781
  end
721
782
 
783
+ # Returns a journal transaction with its entries, ordered by account code.
784
+ #
722
785
  # @param request_options [Hash]
723
786
  # @param params [Nordlet::Ledger::Types::JournalTransactionsGetLedgerRequest]
724
787
  # @option request_options [String] :base_url
@@ -751,6 +814,12 @@ module Nordlet
751
814
  end
752
815
  end
753
816
 
817
+ # Posts a manual journal transaction (`documentType` `manual`, status `posted`) in the company's base currency.
818
+ # Every `accountCode` must be a postable account of the chart, cost centers must exist and be active, projects
819
+ # must exist, and the debits must equal the credits. Answers 422 for an amount with more than two decimals, for a
820
+ # `currency` other than the base currency and for an inactive cost center, and 409 when the accounting period of
821
+ # `date` is locked.
822
+ #
754
823
  # @param request_options [Hash]
755
824
  # @param params [Nordlet::Ledger::Types::JournalTransactionsCreateLedgerRequest]
756
825
  # @option request_options [String] :base_url
@@ -819,6 +888,12 @@ module Nordlet
819
888
  end
820
889
  end
821
890
 
891
+ # Every postable account of the company with the row of `scheme` it falls into, by a mapping
892
+ # (`ledger/statement-rows/set`) or by the layout default, and the amount it carries there: the balance up to
893
+ # `toDate` on a balance-sheet row, the movement from `fromDate` to `toDate` on an income-statement row. `toDate`
894
+ # defaults to today and `fromDate` to 1 January of that year. `rows` holds the row totals and `unmapped` the
895
+ # accounts with a balance but no row.
896
+ #
822
897
  # @param request_options [Hash]
823
898
  # @param params [Nordlet::Ledger::Types::StatementRowsListLedgerRequest]
824
899
  # @option request_options [String] :base_url
@@ -46,6 +46,9 @@ module Nordlet
46
46
  end
47
47
  end
48
48
 
49
+ # Add an officer to the company's register (`officers/list`); `signsAccounts` defaults to true. Refused with 422
50
+ # when `resignedOn` is before `appointedOn`.
51
+ #
49
52
  # @param request_options [Hash]
50
53
  # @param params [Nordlet::Officers::Types::CreateOfficersRequest]
51
54
  # @option request_options [String] :base_url
@@ -78,6 +81,9 @@ module Nordlet
78
81
  end
79
82
  end
80
83
 
84
+ # Replace the recorded data of an officer; every field is written as sent, so a field left out is cleared and
85
+ # `signsAccounts` falls back to true. Refused with 422 when `resignedOn` is before `appointedOn`.
86
+ #
81
87
  # @param request_options [Hash]
82
88
  # @param params [Nordlet::Officers::Types::UpdateOfficersRequest]
83
89
  # @option request_options [String] :base_url
@@ -110,6 +116,8 @@ module Nordlet
110
116
  end
111
117
  end
112
118
 
119
+ # Remove an officer from the company's register.
120
+ #
113
121
  # @param request_options [Hash]
114
122
  # @param params [Nordlet::Officers::Types::DeleteOfficersRequest]
115
123
  # @option request_options [String] :base_url