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
@@ -0,0 +1,14 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Nordlet
4
+ module Partners
5
+ module Types
6
+ module DebtRemindersUpcomingPartnersResponseRowsItemKind
7
+ extend Nordlet::Internal::Types::Enum
8
+
9
+ BEFORE_DUE = "before_due"
10
+ OVERDUE = "overdue"
11
+ end
12
+ end
13
+ end
14
+ end
@@ -10,6 +10,8 @@ module Nordlet
10
10
  @client = client
11
11
  end
12
12
 
13
+ # Creates a department with a code and a name; answers 409 when the code already exists.
14
+ #
13
15
  # @param request_options [Hash]
14
16
  # @param params [Nordlet::Payroll::Types::DepartmentsCreatePayrollRequest]
15
17
  # @option request_options [String] :base_url
@@ -42,6 +44,8 @@ module Nordlet
42
44
  end
43
45
  end
44
46
 
47
+ # Lists the company's departments ordered by code.
48
+ #
45
49
  # @param request_options [Hash]
46
50
  # @param params [Nordlet::Payroll::Types::DepartmentsListPayrollRequest]
47
51
  # @option request_options [String] :base_url
@@ -74,6 +78,9 @@ module Nordlet
74
78
  end
75
79
  end
76
80
 
81
+ # Creates a work schedule with a code, a name and `hoursPerWeek` (default 40); answers 409 when the code already
82
+ # exists.
83
+ #
77
84
  # @param request_options [Hash]
78
85
  # @param params [Nordlet::Payroll::Types::SchedulesCreatePayrollRequest]
79
86
  # @option request_options [String] :base_url
@@ -106,6 +113,8 @@ module Nordlet
106
113
  end
107
114
  end
108
115
 
116
+ # Lists the company's work schedules ordered by code.
117
+ #
109
118
  # @param request_options [Hash]
110
119
  # @param params [Nordlet::Payroll::Types::SchedulesListPayrollRequest]
111
120
  # @option request_options [String] :base_url
@@ -138,6 +147,11 @@ module Nordlet
138
147
  end
139
148
  end
140
149
 
150
+ # Reads the payment types of the company country's payroll engine, each with the labels of the taxes,
151
+ # contributions and reporting lines it is subject to (`applies`), and the default type an untyped payment falls
152
+ # under. These codes are what `payroll/calc` and the additions of `payroll/runs/create` accept as `paymentType`.
153
+ # Answers 422 when Nordlet has no payroll engine for the company's country.
154
+ #
141
155
  # @param request_options [Hash]
142
156
  # @param params [Nordlet::Payroll::Types::PaymentTypesListPayrollRequest]
143
157
  # @option request_options [String] :base_url
@@ -170,6 +184,12 @@ module Nordlet
170
184
  end
171
185
  end
172
186
 
187
+ # Runs the company country's payroll engine once on a taxable base at a date, with the employee settings given in
188
+ # the body instead of an employee record, and returns the allowance, income tax, contributions, components and
189
+ # net; nothing is saved. `payments` passes typed payments to the engine; each `paymentType` must be a code from
190
+ # `payroll/payment-types/list` (422 otherwise). Answers 422 when Nordlet has no payroll engine for the company's
191
+ # country.
192
+ #
173
193
  # @param request_options [Hash]
174
194
  # @param params [Nordlet::Payroll::Types::CalcPayrollRequest]
175
195
  # @option request_options [String] :base_url
@@ -202,6 +222,18 @@ module Nordlet
202
222
  end
203
223
  end
204
224
 
225
+ # Creates a draft payroll run for a month, computing each line with the company country's payroll engine, the
226
+ # employee's approved runs of the year so far and of the two previous years, the month's timesheet and `payDate`
227
+ # (default the last day of the month). Without `lines`, every active employee whose contract covers the month gets
228
+ # a line: the gross is the contract's monthly salary reduced to the paid working days of the contract and the
229
+ # timesheet, unless `grossOverrides` sets it; the per diems of approved business trips ending in the month are
230
+ # added untaxed and the trips linked to the run; for a Lithuanian company the car benefit in kind
231
+ # (`includeNatura`) and the compensation for unused leave of a contract ending in the month are added. With
232
+ # `lines`, only the given employees are computed with their gross, additions and deductions; a taxable addition
233
+ # may carry a `paymentType` from `payroll/payment-types/list` and `hours`. Answers 422 when the country has no
234
+ # engine, an employee is given twice, has two contracts in the month, has no contract and no gross, or is paid by
235
+ # the hour or day without a gross; 409 when a run for the month already exists or the accounting period is locked.
236
+ #
205
237
  # @param request_options [Hash]
206
238
  # @param params [Nordlet::Payroll::Types::RunsCreatePayrollRequest]
207
239
  # @option request_options [String] :base_url
@@ -234,6 +266,8 @@ module Nordlet
234
266
  end
235
267
  end
236
268
 
269
+ # Reads a payroll run with its lines.
270
+ #
237
271
  # @param request_options [Hash]
238
272
  # @param params [Nordlet::Payroll::Types::RunsGetPayrollRequest]
239
273
  # @option request_options [String] :base_url
@@ -266,6 +300,9 @@ module Nordlet
266
300
  end
267
301
  end
268
302
 
303
+ # Lists payroll runs without their lines; filterable by `status`, `year` and `month`, sortable by `createdAt`,
304
+ # `year` and `month`.
305
+ #
269
306
  # @param request_options [Hash]
270
307
  # @param params [Nordlet::Payroll::Types::RunsListPayrollRequest]
271
308
  # @option request_options [String] :base_url
@@ -333,6 +370,16 @@ module Nordlet
333
370
  end
334
371
  end
335
372
 
373
+ # Posts the run's journal entry dated the last day of the month and sets the status to `approved`: the wage
374
+ # expense (net pay, income tax, employee contributions and deductions) and the employer contributions are debited;
375
+ # the net payable, the income tax, the social contributions (on one account, or split between the employee and
376
+ # employer accounts when their codes differ) and the deductions are credited. The accounts default to the payroll
377
+ # accounts of the company's chart template; each can be given per call. Answers 409 when the run is not a draft or
378
+ # the accounting period is locked, 422 when the run has no lines or nothing to post, and emits
379
+ # `payroll_run.approved`. For an Irish company with the automation of the `ie-payroll-withholding` deadline
380
+ # switched on, the month's payroll submission is sent at once and a failure is added to the run's `warnings`. Undo
381
+ # with `payroll/runs/reverse`, pay with `payroll/payments/export`.
382
+ #
336
383
  # @param request_options [Hash]
337
384
  # @param params [Nordlet::Payroll::Types::RunsApprovePayrollRequest]
338
385
  # @option request_options [String] :base_url
@@ -365,6 +412,11 @@ module Nordlet
365
412
  end
366
413
  end
367
414
 
415
+ # Posts a journal entry dated the last day of the month that mirrors the run's entry (debits and credits swapped),
416
+ # sets the status to `reversed` with the reason, and releases the business trips the run paid so the next run
417
+ # picks them up again. Answers 409 when the run is not approved, when part of it is matched to bank payments
418
+ # (`paidAmount`, unmatch them first) or when the accounting period is locked. Emits `payroll_run.reversed`.
419
+ #
368
420
  # @param request_options [Hash]
369
421
  # @param params [Nordlet::Payroll::Types::RunsReversePayrollRequest]
370
422
  # @option request_options [String] :base_url
@@ -397,6 +449,9 @@ module Nordlet
397
449
  end
398
450
  end
399
451
 
452
+ # Deletes a draft run with its lines and releases the business trips linked to it; answers 409 when the run is not
453
+ # a draft. An approved run is undone with `payroll/runs/reverse`.
454
+ #
400
455
  # @param request_options [Hash]
401
456
  # @param params [Nordlet::Payroll::Types::RunsCancelPayrollRequest]
402
457
  # @option request_options [String] :base_url
@@ -429,6 +484,13 @@ module Nordlet
429
484
  end
430
485
  end
431
486
 
487
+ # Builds a SEPA credit transfer file (pain.001.001.03) for an approved run: one transfer from the chosen bank
488
+ # account to each employee's IBAN for the line's net when it is positive, with a remittance text in `locale`
489
+ # (default the locale of the calling user) and the run period, executed on `executionDate` (default the company's
490
+ # current date). Answers 409 when the run is not approved, and 422 when the bank account has no IBAN or is not in
491
+ # the company's base currency, an employee has no IBAN (`hr/employees/update`) or no line has a positive net. The
492
+ # file is returned in `xml`; nothing is sent to the bank.
493
+ #
432
494
  # @param request_options [Hash]
433
495
  # @param params [Nordlet::Payroll::Types::PaymentsExportPayrollRequest]
434
496
  # @option request_options [String] :base_url
@@ -46,6 +46,13 @@ module Nordlet
46
46
  end
47
47
  end
48
48
 
49
+ # Apply one event: a delivery status event updates the Peppol status of the sale invoice with that message id and,
50
+ # when the status changes, emits `sale_invoice.peppol_delivered`, `sale_invoice.peppol_rejected` or
51
+ # `sale_invoice.peppol_failed`; a received-document event fetches the document from the access point, stores it as
52
+ # a document capture with the matched supplier, emits `document_capture.peppol_received` and marks it read at the
53
+ # access point (a document already stored is skipped). `handled` is false when the event matched no invoice or
54
+ # document. Answers 404 when no company uses that provider account, 401 when the signature does not match.
55
+ #
49
56
  # @param request_options [Hash]
50
57
  # @param params [Hash]
51
58
  # @option request_options [String] :base_url
@@ -45,6 +45,8 @@ module Nordlet
45
45
  end
46
46
  end
47
47
 
48
+ # Read one platform seller with its activities, ordered by year.
49
+ #
48
50
  # @param request_options [Hash]
49
51
  # @param params [Nordlet::PlatformSellers::Types::GetPlatformSellersRequest]
50
52
  # @option request_options [String] :base_url
@@ -77,6 +79,12 @@ module Nordlet
77
79
  end
78
80
  end
79
81
 
82
+ # Record a seller on the company's platform for the DAC7 report: an `individual` (first and last name required) or
83
+ # an `entity` (`entityName` required), with its `activities` per year and quarter. An `immovable_property`
84
+ # activity needs `propertyAddress`; property address, type and rented days on any other kind of activity are
85
+ # refused. These checks answer 422; a `partnerId` that does not exist answers 404. The report is built from the
86
+ # sellers with `declarations/eu/dac7/preview` and `declarations/eu/dac7/xml`.
87
+ #
80
88
  # @param request_options [Hash]
81
89
  # @param params [Nordlet::PlatformSellers::Types::CreatePlatformSellersRequest]
82
90
  # @option request_options [String] :base_url
@@ -109,6 +117,9 @@ module Nordlet
109
117
  end
110
118
  end
111
119
 
120
+ # Replace a platform seller's details and all of its activities with the ones given, under the same checks as
121
+ # `platform-sellers/create`.
122
+ #
112
123
  # @param request_options [Hash]
113
124
  # @param params [Nordlet::PlatformSellers::Types::UpdatePlatformSellersRequest]
114
125
  # @option request_options [String] :base_url
@@ -141,6 +152,8 @@ module Nordlet
141
152
  end
142
153
  end
143
154
 
155
+ # Mark a platform seller as deleted. It leaves the lists and the DAC7 report.
156
+ #
144
157
  # @param request_options [Hash]
145
158
  # @param params [Nordlet::PlatformSellers::Types::DeletePlatformSellersRequest]
146
159
  # @option request_options [String] :base_url
@@ -10,6 +10,9 @@ module Nordlet
10
10
  @client = client
11
11
  end
12
12
 
13
+ # Register a cash register (POS device). The serial number must be unique in the company; a repeat is refused with
14
+ # 409.
15
+ #
13
16
  # @param request_options [Hash]
14
17
  # @param params [Nordlet::Pos::Types::DevicesCreatePosRequest]
15
18
  # @option request_options [String] :base_url
@@ -42,6 +45,9 @@ module Nordlet
42
45
  end
43
46
  end
44
47
 
48
+ # Change a POS device's details or set `isActive`; an inactive device accepts no new shifts or reports. A serial
49
+ # number already used by another device is refused with 409.
50
+ #
45
51
  # @param request_options [Hash]
46
52
  # @param params [Nordlet::Pos::Types::DevicesUpdatePosRequest]
47
53
  # @option request_options [String] :base_url
@@ -74,6 +80,8 @@ module Nordlet
74
80
  end
75
81
  end
76
82
 
83
+ # List POS devices. Filterable by `name` and `serialNumber`; sortable by `name`, `serialNumber` and `createdAt`.
84
+ #
77
85
  # @param request_options [Hash]
78
86
  # @param params [Nordlet::Pos::Types::DevicesListPosRequest]
79
87
  # @option request_options [String] :base_url
@@ -106,6 +114,15 @@ module Nordlet
106
114
  end
107
115
  end
108
116
 
117
+ # Record a daily cash register report (Z-report) and post it to the ledger in one journal entry: the cash and card
118
+ # takings are debited to `cashAccountCode` and `cardAccountCode`, the net of the `vatLines` is credited to
119
+ # `revenueAccountCode` and their VAT to `vatAccountCode`. `itemLines` write the sold products off `warehouseId`
120
+ # FIFO (a set is expanded to its product components) and add the cost of goods sold, debited to `cogsAccountCode`
121
+ # against the stock accounts. Account codes default to the company's chart. Refused with 422 when cash plus card
122
+ # differs from the gross total, the item lines have no warehouse or the device is inactive, with 409 when the
123
+ # accounting period is locked or the `reportNumber` already exists. Emits `pos_report.created` and, per item line,
124
+ # `stock.changed`.
125
+ #
109
126
  # @param request_options [Hash]
110
127
  # @param params [Nordlet::Pos::Types::ReportsCreatePosRequest]
111
128
  # @option request_options [String] :base_url
@@ -138,6 +155,8 @@ module Nordlet
138
155
  end
139
156
  end
140
157
 
158
+ # Read one POS report with its VAT lines.
159
+ #
141
160
  # @param request_options [Hash]
142
161
  # @param params [Nordlet::Pos::Types::ReportsGetPosRequest]
143
162
  # @option request_options [String] :base_url
@@ -170,6 +189,9 @@ module Nordlet
170
189
  end
171
190
  end
172
191
 
192
+ # List POS reports without their VAT lines. Filterable by `date`, `reportNumber` and `deviceId`; sortable by
193
+ # `date`, `reportNumber` and `createdAt`.
194
+ #
173
195
  # @param request_options [Hash]
174
196
  # @param params [Nordlet::Pos::Types::ReportsListPosRequest]
175
197
  # @option request_options [String] :base_url
@@ -202,6 +224,10 @@ module Nordlet
202
224
  end
203
225
  end
204
226
 
227
+ # Open a shift on a POS device with the cash float `openingCash`. A device has at most one open shift (409 for a
228
+ # second); an inactive device is refused with 422. Give `warehouseId` when the shift will sell stock items; they
229
+ # are written off that warehouse when the shift is closed.
230
+ #
205
231
  # @param request_options [Hash]
206
232
  # @param params [Nordlet::Pos::Types::ShiftsOpenPosRequest]
207
233
  # @option request_options [String] :base_url
@@ -234,6 +260,8 @@ module Nordlet
234
260
  end
235
261
  end
236
262
 
263
+ # Read one POS shift.
264
+ #
237
265
  # @param request_options [Hash]
238
266
  # @param params [Nordlet::Pos::Types::ShiftsGetPosRequest]
239
267
  # @option request_options [String] :base_url
@@ -266,6 +294,8 @@ module Nordlet
266
294
  end
267
295
  end
268
296
 
297
+ # List POS shifts. Filterable by `deviceId` and `status`; sortable by `openedAt`.
298
+ #
269
299
  # @param request_options [Hash]
270
300
  # @param params [Nordlet::Pos::Types::ShiftsListPosRequest]
271
301
  # @option request_options [String] :base_url
@@ -298,6 +328,11 @@ module Nordlet
298
328
  end
299
329
  end
300
330
 
331
+ # Record a receipt in an open shift, numbered per shift from 1. Each line's net, VAT and gross come from its
332
+ # VAT-inclusive unit price; a line without `description` takes its item's name. Refused with 422 when cash plus
333
+ # card differs from the receipt total or a stock item is sold in a shift opened without a warehouse, with 409 when
334
+ # the shift is closed.
335
+ #
301
336
  # @param request_options [Hash]
302
337
  # @param params [Nordlet::Pos::Types::ReceiptsCreatePosRequest]
303
338
  # @option request_options [String] :base_url
@@ -330,6 +365,8 @@ module Nordlet
330
365
  end
331
366
  end
332
367
 
368
+ # List receipts without their lines. Filterable by `shiftId`; sortable by `number` and `createdAt`.
369
+ #
333
370
  # @param request_options [Hash]
334
371
  # @param params [Nordlet::Pos::Types::ReceiptsListPosRequest]
335
372
  # @option request_options [String] :base_url
@@ -362,6 +399,8 @@ module Nordlet
362
399
  end
363
400
  end
364
401
 
402
+ # Read one receipt with its lines.
403
+ #
365
404
  # @param request_options [Hash]
366
405
  # @param params [Nordlet::Pos::Types::ReceiptsGetPosRequest]
367
406
  # @option request_options [String] :base_url
@@ -394,6 +433,13 @@ module Nordlet
394
433
  end
395
434
  end
396
435
 
436
+ # Close an open shift: its receipts are summed by VAT rate and by product into one POS report, created as by
437
+ # `pos/reports/create` with number `reportNumber` (default `Z-<device serial>-<n>`, n being the device's closed
438
+ # shifts plus one) on `date` (default: the company's today), which posts the takings and the stock write-off to
439
+ # the ledger and emits `pos_report.created`. The response adds `expectedCash` (opening cash plus the cash
440
+ # receipts) and `cashDifference` (`countedCash` less expected). A shift without receipts is refused with 422, a
441
+ # closed one with 409.
442
+ #
397
443
  # @param request_options [Hash]
398
444
  # @param params [Nordlet::Pos::Types::ShiftsClosePosRequest]
399
445
  # @option request_options [String] :base_url
@@ -10,6 +10,10 @@ module Nordlet
10
10
  @client = client
11
11
  end
12
12
 
13
+ # Create a work center with its `costPerHour`. `costAccountCode` must be a postable account of the chart (422
14
+ # otherwise); when a production order completes, the labor cost of the operations run on this center is credited
15
+ # to it instead of the `production.laborApplied` posting rule account. A duplicate `code` is refused with 409.
16
+ #
13
17
  # @param request_options [Hash]
14
18
  # @param params [Nordlet::Production::Types::WorkCentersCreateProductionRequest]
15
19
  # @option request_options [String] :base_url
@@ -42,6 +46,9 @@ module Nordlet
42
46
  end
43
47
  end
44
48
 
49
+ # Change a work center; only the fields sent are changed. `costAccountCode` must be a postable account of the
50
+ # chart (422 otherwise); a `code` already used by another work center is refused with 409.
51
+ #
45
52
  # @param request_options [Hash]
46
53
  # @param params [Nordlet::Production::Types::WorkCentersUpdateProductionRequest]
47
54
  # @option request_options [String] :base_url
@@ -74,6 +81,10 @@ module Nordlet
74
81
  end
75
82
  end
76
83
 
84
+ # List work centers. `nextMaintenanceDate` is the latest completed maintenance date (the creation date when there
85
+ # is none) plus `maintenanceIntervalDays`, null without an interval. Filterable by `code`, `name` and `isActive`;
86
+ # sortable by `code`, `name` and `createdAt`.
87
+ #
77
88
  # @param request_options [Hash]
78
89
  # @param params [Nordlet::Production::Types::WorkCentersListProductionRequest]
79
90
  # @option request_options [String] :base_url
@@ -106,6 +117,10 @@ module Nordlet
106
117
  end
107
118
  end
108
119
 
120
+ # Create a routing with its operations: `sequence`, work center, `setupMinutes`, `runMinutesPerUnit` and an
121
+ # optional `qualityCheckName` that becomes a pending quality check on every production order using the routing.
122
+ # Operation sequences must be unique (422); a duplicate `code` is refused with 409.
123
+ #
109
124
  # @param request_options [Hash]
110
125
  # @param params [Nordlet::Production::Types::RoutingsCreateProductionRequest]
111
126
  # @option request_options [String] :base_url
@@ -138,6 +153,8 @@ module Nordlet
138
153
  end
139
154
  end
140
155
 
156
+ # Return one routing with its operations in sequence order.
157
+ #
141
158
  # @param request_options [Hash]
142
159
  # @param params [Nordlet::Production::Types::RoutingsGetProductionRequest]
143
160
  # @option request_options [String] :base_url
@@ -170,6 +187,9 @@ module Nordlet
170
187
  end
171
188
  end
172
189
 
190
+ # List routings without their operations. Filterable by `code`, `name` and `isActive`; sortable by `code`, `name`
191
+ # and `createdAt`.
192
+ #
173
193
  # @param request_options [Hash]
174
194
  # @param params [Nordlet::Production::Types::RoutingsListProductionRequest]
175
195
  # @option request_options [String] :base_url
@@ -202,6 +222,9 @@ module Nordlet
202
222
  end
203
223
  end
204
224
 
225
+ # Record a `preventive` or `corrective` maintenance planned for a work center on `plannedDate`; it starts as
226
+ # `planned`.
227
+ #
205
228
  # @param request_options [Hash]
206
229
  # @param params [Nordlet::Production::Types::MaintenanceCreateProductionRequest]
207
230
  # @option request_options [String] :base_url
@@ -234,6 +257,10 @@ module Nordlet
234
257
  end
235
258
  end
236
259
 
260
+ # Mark a `planned` maintenance as completed on `completedDate`, with optional `downtimeHours` and `cost` (409 when
261
+ # it is already completed or cancelled). The work center's `nextMaintenanceDate` is then counted from the latest
262
+ # completed maintenance date.
263
+ #
237
264
  # @param request_options [Hash]
238
265
  # @param params [Nordlet::Production::Types::MaintenanceCompleteProductionRequest]
239
266
  # @option request_options [String] :base_url
@@ -266,6 +293,8 @@ module Nordlet
266
293
  end
267
294
  end
268
295
 
296
+ # Cancel a `planned` maintenance (409 when it is already completed or cancelled).
297
+ #
269
298
  # @param request_options [Hash]
270
299
  # @param params [Nordlet::Production::Types::MaintenanceCancelProductionRequest]
271
300
  # @option request_options [String] :base_url
@@ -298,6 +327,9 @@ module Nordlet
298
327
  end
299
328
  end
300
329
 
330
+ # List maintenance records. Filterable by `workCenterId`, `status` and `type`; sortable by `plannedDate` and
331
+ # `createdAt`.
332
+ #
301
333
  # @param request_options [Hash]
302
334
  # @param params [Nordlet::Production::Types::MaintenanceListProductionRequest]
303
335
  # @option request_options [String] :base_url
@@ -330,6 +362,11 @@ module Nordlet
330
362
  end
331
363
  end
332
364
 
365
+ # Create a bill of materials for a finished item. `outputQuantity` is the finished quantity made per unit of order
366
+ # quantity; each line's `quantity` is the component consumed per unit of order quantity, increased by its
367
+ # `scrapPercent` at completion; `routingId` is the default routing of assembly orders. A BOM that consumes its own
368
+ # finished item is refused with 422, a duplicate `code` with 409.
369
+ #
333
370
  # @param request_options [Hash]
334
371
  # @param params [Nordlet::Production::Types::BomsCreateProductionRequest]
335
372
  # @option request_options [String] :base_url
@@ -362,6 +399,8 @@ module Nordlet
362
399
  end
363
400
  end
364
401
 
402
+ # Return one bill of materials with its component lines.
403
+ #
365
404
  # @param request_options [Hash]
366
405
  # @param params [Nordlet::Production::Types::BomsGetProductionRequest]
367
406
  # @option request_options [String] :base_url
@@ -394,6 +433,9 @@ module Nordlet
394
433
  end
395
434
  end
396
435
 
436
+ # List bills of materials without their lines. Filterable by `code`, `name`, `finishedItemId` and `isActive`;
437
+ # sortable by `code` and `name`.
438
+ #
397
439
  # @param request_options [Hash]
398
440
  # @param params [Nordlet::Production::Types::BomsListProductionRequest]
399
441
  # @option request_options [String] :base_url
@@ -426,6 +468,13 @@ module Nordlet
426
468
  end
427
469
  end
428
470
 
471
+ # Create a draft production order for `quantity` units of a BOM in a warehouse; stock moves only at
472
+ # `production/orders/complete`. An `assembly` order takes its routing from `routingId`, else from the BOM, and
473
+ # copies the routing's operations onto the order (`plannedMinutes` = setup minutes + run minutes per unit ×
474
+ # finished quantity, priced at the work center's current `costPerHour`) with a pending quality check for every
475
+ # operation that names one. A `routingId` on a `disassembly` order, an inactive routing or a routing without
476
+ # operations is refused with 422.
477
+ #
429
478
  # @param request_options [Hash]
430
479
  # @param params [Nordlet::Production::Types::OrdersCreateProductionRequest]
431
480
  # @option request_options [String] :base_url
@@ -458,6 +507,9 @@ module Nordlet
458
507
  end
459
508
  end
460
509
 
510
+ # Record the `actualMinutes` spent on one operation of a draft production order; at completion the actual minutes,
511
+ # else the planned ones, price the operation's labor cost. Refused with 409 once the order is completed.
512
+ #
461
513
  # @param request_options [Hash]
462
514
  # @param params [Nordlet::Production::Types::OrdersRecordOperationProductionRequest]
463
515
  # @option request_options [String] :base_url
@@ -490,6 +542,9 @@ module Nordlet
490
542
  end
491
543
  end
492
544
 
545
+ # Add a pending quality check to a draft production order (409 once the order is completed). The order cannot
546
+ # complete while a check is pending.
547
+ #
493
548
  # @param request_options [Hash]
494
549
  # @param params [Nordlet::Production::Types::QualityChecksAddProductionRequest]
495
550
  # @option request_options [String] :base_url
@@ -522,6 +577,9 @@ module Nordlet
522
577
  end
523
578
  end
524
579
 
580
+ # Record the result of a quality check as `passed` or `failed`, with the time and the actor (409 once the order is
581
+ # completed). Only a `pending` check blocks `production/orders/complete`; a `failed` one does not.
582
+ #
525
583
  # @param request_options [Hash]
526
584
  # @param params [Nordlet::Production::Types::QualityChecksRecordProductionRequest]
527
585
  # @option request_options [String] :base_url
@@ -554,6 +612,8 @@ module Nordlet
554
612
  end
555
613
  end
556
614
 
615
+ # List quality checks. Filterable by `orderId`, `result` and `name`; sortable by `createdAt` and `name`.
616
+ #
557
617
  # @param request_options [Hash]
558
618
  # @param params [Nordlet::Production::Types::QualityChecksListProductionRequest]
559
619
  # @option request_options [String] :base_url
@@ -586,6 +646,19 @@ module Nordlet
586
646
  end
587
647
  end
588
648
 
649
+ # Complete a draft production order on the order's date. An `assembly` consumes the components FIFO from the
650
+ # warehouse (line quantity × order quantity, increased by `scrapPercent`), prices each operation at its actual or
651
+ # planned minutes × `costPerHour`, receives the finished item at material cost + labor cost less the share of
652
+ # `scrappedQuantity`, and, when there is labor, scrap or a component stock account other than the finished one,
653
+ # posts a journal entry debiting the finished stock account (and the `production.scrap` rule account for the
654
+ # scrapped share) and crediting the component stock accounts and the work centers' cost accounts (or the
655
+ # `production.laborApplied` rule account); a `disassembly` consumes the finished item and receives the components
656
+ # at its cost shared by quantity. `componentsAccountCode` and `finishedAccountCode` default to the chart's
657
+ # production accounts. Refused with 409 when the order is already completed, a quality check is still pending or
658
+ # the accounting period is locked, and with 422 when the BOM has no lines, `scrappedQuantity` is given on a
659
+ # disassembly or exceeds the finished quantity, the assembly cost is zero, stock is insufficient, a received item
660
+ # needs lot or serial tracking, or a posting account is missing. Emits `stock.changed`.
661
+ #
589
662
  # @param request_options [Hash]
590
663
  # @param params [Nordlet::Production::Types::OrdersCompleteProductionRequest]
591
664
  # @option request_options [String] :base_url
@@ -618,6 +691,8 @@ module Nordlet
618
691
  end
619
692
  end
620
693
 
694
+ # Return one production order with its operations and quality checks.
695
+ #
621
696
  # @param request_options [Hash]
622
697
  # @param params [Nordlet::Production::Types::OrdersGetProductionRequest]
623
698
  # @option request_options [String] :base_url
@@ -650,6 +725,9 @@ module Nordlet
650
725
  end
651
726
  end
652
727
 
728
+ # List production orders without operations and quality checks. Filterable by `bomId`, `warehouseId`, `status` and
729
+ # `type`; sortable by `date` and `createdAt`.
730
+ #
653
731
  # @param request_options [Hash]
654
732
  # @param params [Nordlet::Production::Types::OrdersListProductionRequest]
655
733
  # @option request_options [String] :base_url
@@ -10,6 +10,9 @@ module Nordlet
10
10
  @client = client
11
11
  end
12
12
 
13
+ # Create a project; `partnerId` is the customer that `projects/time-entries/bill` invoices by default. A duplicate
14
+ # `code` is refused with 409.
15
+ #
13
16
  # @param request_options [Hash]
14
17
  # @param params [Nordlet::Projects::Types::CreateProjectsRequest]
15
18
  # @option request_options [String] :base_url
@@ -42,6 +45,9 @@ module Nordlet
42
45
  end
43
46
  end
44
47
 
48
+ # Change a project's name, customer, `status` (`active`, `completed`, `archived`) or notes; only the fields sent
49
+ # are changed. An archived project accepts no new time entries.
50
+ #
45
51
  # @param request_options [Hash]
46
52
  # @param params [Nordlet::Projects::Types::UpdateProjectsRequest]
47
53
  # @option request_options [String] :base_url
@@ -74,6 +80,8 @@ module Nordlet
74
80
  end
75
81
  end
76
82
 
83
+ # Return one project.
84
+ #
77
85
  # @param request_options [Hash]
78
86
  # @param params [Nordlet::Projects::Types::GetProjectsRequest]
79
87
  # @option request_options [String] :base_url
@@ -106,6 +114,9 @@ module Nordlet
106
114
  end
107
115
  end
108
116
 
117
+ # List projects. Filterable by `code`, `name`, `status` and `partnerId`; sortable by `code`, `name` and
118
+ # `createdAt`.
119
+ #
109
120
  # @param request_options [Hash]
110
121
  # @param params [Nordlet::Projects::Types::ListProjectsRequest]
111
122
  # @option request_options [String] :base_url
@@ -138,6 +149,9 @@ module Nordlet
138
149
  end
139
150
  end
140
151
 
152
+ # Record hours worked on a project on a date, optionally for an employee and with the `hourlyRate` used when
153
+ # billing. `hours` must be positive (422); an archived project is refused with 409.
154
+ #
141
155
  # @param request_options [Hash]
142
156
  # @param params [Nordlet::Projects::Types::TimeEntriesCreateProjectsRequest]
143
157
  # @option request_options [String] :base_url
@@ -170,6 +184,9 @@ module Nordlet
170
184
  end
171
185
  end
172
186
 
187
+ # Change a time entry; only the fields sent are changed. `hours` must be positive (422); an entry already billed
188
+ # to an invoice cannot be changed (409).
189
+ #
173
190
  # @param request_options [Hash]
174
191
  # @param params [Nordlet::Projects::Types::TimeEntriesUpdateProjectsRequest]
175
192
  # @option request_options [String] :base_url
@@ -202,6 +219,8 @@ module Nordlet
202
219
  end
203
220
  end
204
221
 
222
+ # Delete a time entry (409 once it is billed).
223
+ #
205
224
  # @param request_options [Hash]
206
225
  # @param params [Nordlet::Projects::Types::TimeEntriesDeleteProjectsRequest]
207
226
  # @option request_options [String] :base_url
@@ -234,6 +253,9 @@ module Nordlet
234
253
  end
235
254
  end
236
255
 
256
+ # List time entries. Filterable by `projectId`, `employeeId`, `billable`, `billedInvoiceId` and `date`; sortable
257
+ # by `date`, `createdAt` and `hours`.
258
+ #
237
259
  # @param request_options [Hash]
238
260
  # @param params [Nordlet::Projects::Types::TimeEntriesListProjectsRequest]
239
261
  # @option request_options [String] :base_url
@@ -266,6 +288,13 @@ module Nordlet
266
288
  end
267
289
  end
268
290
 
291
+ # Create a draft sale invoice from the project's unbilled billable time entries, optionally limited to `dateFrom`
292
+ # and `dateTo`, and mark them billed; needs the `sales:write` scope, and the invoice is issued with
293
+ # `sales/invoices/issue`. The customer is `partnerId`, else the project's partner (422 without either); each entry
294
+ # is priced at its own `hourlyRate`, else the call's `hourlyRate` (422 when an entry has neither); `groupBy`
295
+ # `rate` makes one line per rate with the summed hours, `entry` one line per entry; `itemId`, `vatRatePercent` and
296
+ # `vatClassifierCode` go onto every line. No matching entries is 422.
297
+ #
269
298
  # @param request_options [Hash]
270
299
  # @param params [Nordlet::Projects::Types::TimeEntriesBillProjectsRequest]
271
300
  # @option request_options [String] :base_url
@@ -298,6 +327,12 @@ module Nordlet
298
327
  end
299
328
  end
300
329
 
330
+ # Profitability per project: `revenue` and `costs` from posted journal entries tagged with the project (income
331
+ # accounts credit less debit, expense accounts debit less credit), `profit` as their difference, and the hours
332
+ # from time entries (total, billable, billed, unbilled, and the unbilled amount at the entries' hourly rates).
333
+ # `projectId` limits the report to one project; `dateFrom` and `dateTo` limit the journal dates and the entry
334
+ # dates. Nothing is changed.
335
+ #
301
336
  # @param request_options [Hash]
302
337
  # @param params [Nordlet::Projects::Types::ReportProjectsRequest]
303
338
  # @option request_options [String] :base_url