nordlet 0.6.3 → 0.6.4

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 (129) hide show
  1. checksums.yaml +4 -4
  2. data/lib/nordlet/bank/client.rb +19 -16
  3. data/lib/nordlet/billing/client.rb +3 -1
  4. data/lib/nordlet/calendar/types/create_calendar_response_submission.rb +2 -0
  5. data/lib/nordlet/calendar/types/create_calendar_response_submissions_item.rb +2 -0
  6. data/lib/nordlet/calendar/types/get_calendar_response_submission.rb +2 -0
  7. data/lib/nordlet/calendar/types/get_calendar_response_submissions_item.rb +2 -0
  8. data/lib/nordlet/calendar/types/list_calendar_response_rows_item_submission.rb +2 -0
  9. data/lib/nordlet/calendar/types/list_calendar_response_rows_item_submissions_item.rb +2 -0
  10. data/lib/nordlet/calendar/types/submit_calendar_response.rb +2 -0
  11. data/lib/nordlet/calendar/types/update_calendar_response_submission.rb +2 -0
  12. data/lib/nordlet/calendar/types/update_calendar_response_submissions_item.rb +2 -0
  13. data/lib/nordlet/capture/types/documents_confirm_capture_request_lines_item.rb +4 -0
  14. data/lib/nordlet/capture/types/documents_confirm_capture_request_opposite_lines_item.rb +4 -0
  15. data/lib/nordlet/capture/types/documents_confirm_capture_response_invoice_lines_item.rb +8 -0
  16. data/lib/nordlet/capture/types/documents_confirm_capture_response_opposite_invoice_lines_item.rb +8 -0
  17. data/lib/nordlet/cash/client.rb +7 -6
  18. data/lib/nordlet/catalog/client.rb +145 -2
  19. data/lib/nordlet/catalog/types/items_create_catalog_response.rb +2 -0
  20. data/lib/nordlet/catalog/types/items_create_catalog_response_alternative_units_item.rb +21 -0
  21. data/lib/nordlet/catalog/types/items_get_catalog_response.rb +2 -0
  22. data/lib/nordlet/catalog/types/items_get_catalog_response_alternative_units_item.rb +21 -0
  23. data/lib/nordlet/catalog/types/items_list_catalog_response_rows_item.rb +2 -0
  24. data/lib/nordlet/catalog/types/items_list_catalog_response_rows_item_alternative_units_item.rb +21 -0
  25. data/lib/nordlet/catalog/types/items_units_create_catalog_request.rb +21 -0
  26. data/lib/nordlet/catalog/types/items_units_create_catalog_response.rb +27 -0
  27. data/lib/nordlet/catalog/types/items_units_delete_catalog_request.rb +11 -0
  28. data/lib/nordlet/catalog/types/items_units_delete_catalog_response.rb +11 -0
  29. data/lib/nordlet/catalog/types/items_units_list_catalog_request.rb +11 -0
  30. data/lib/nordlet/catalog/types/items_units_list_catalog_response.rb +11 -0
  31. data/lib/nordlet/catalog/types/items_units_list_catalog_response_rows_item.rb +27 -0
  32. data/lib/nordlet/catalog/types/items_units_update_catalog_request.rb +19 -0
  33. data/lib/nordlet/catalog/types/items_units_update_catalog_response.rb +27 -0
  34. data/lib/nordlet/catalog/types/items_update_catalog_response.rb +2 -0
  35. data/lib/nordlet/catalog/types/items_update_catalog_response_alternative_units_item.rb +21 -0
  36. data/lib/nordlet/catalog/types/units_create_catalog_request.rb +2 -0
  37. data/lib/nordlet/catalog/types/units_create_catalog_response.rb +2 -0
  38. data/lib/nordlet/catalog/types/units_list_catalog_response_rows_item.rb +2 -0
  39. data/lib/nordlet/catalog/types/units_update_catalog_request.rb +2 -0
  40. data/lib/nordlet/catalog/types/units_update_catalog_response.rb +2 -0
  41. data/lib/nordlet/declarations/client.rb +46 -5
  42. data/lib/nordlet/declarations/types/lt_ivaz_amend_declarations_request.rb +2 -0
  43. data/lib/nordlet/declarations/types/lt_ivaz_amend_declarations_request_corrections_item.rb +25 -0
  44. data/lib/nordlet/declarations/types/lt_ivaz_amend_declarations_request_corrections_item_lines_item.rb +13 -0
  45. data/lib/nordlet/declarations/types/submissions_confirm_declarations_request.rb +11 -0
  46. data/lib/nordlet/declarations/types/submissions_confirm_declarations_response.rb +71 -0
  47. data/lib/nordlet/declarations/types/submissions_confirm_declarations_response_environment.rb +14 -0
  48. data/lib/nordlet/declarations/types/submissions_confirm_declarations_response_status.rb +16 -0
  49. data/lib/nordlet/declarations/types/submissions_create_declarations_response.rb +2 -0
  50. data/lib/nordlet/declarations/types/submissions_list_declarations_response_rows_item.rb +2 -0
  51. data/lib/nordlet/declarations/types/submissions_mark_declarations_response.rb +2 -0
  52. data/lib/nordlet/declarations/types/submissions_retry_declarations_response.rb +2 -0
  53. data/lib/nordlet/ecommerce/client.rb +12 -9
  54. data/lib/nordlet/fleet/client.rb +8 -4
  55. data/lib/nordlet/fleet/types/vehicles_create_fleet_request.rb +2 -0
  56. data/lib/nordlet/fleet/types/vehicles_create_fleet_response.rb +2 -0
  57. data/lib/nordlet/fleet/types/vehicles_get_fleet_response.rb +2 -0
  58. data/lib/nordlet/fleet/types/vehicles_list_fleet_response_rows_item.rb +2 -0
  59. data/lib/nordlet/fleet/types/vehicles_update_fleet_request.rb +2 -0
  60. data/lib/nordlet/fleet/types/vehicles_update_fleet_response.rb +2 -0
  61. data/lib/nordlet/inventory/client.rb +28 -23
  62. data/lib/nordlet/ledger/types/posting_rules_update_ledger_request_rules_item_key.rb +2 -0
  63. data/lib/nordlet/payroll/client.rb +16 -12
  64. data/lib/nordlet/pos/client.rb +126 -9
  65. data/lib/nordlet/pos/types/refunds_create_pos_request.rb +17 -0
  66. data/lib/nordlet/pos/types/refunds_create_pos_request_lines_item.rb +13 -0
  67. data/lib/nordlet/pos/types/refunds_create_pos_response.rb +33 -0
  68. data/lib/nordlet/pos/types/refunds_create_pos_response_lines_item.rb +23 -0
  69. data/lib/nordlet/pos/types/refunds_get_pos_request.rb +11 -0
  70. data/lib/nordlet/pos/types/refunds_get_pos_response.rb +33 -0
  71. data/lib/nordlet/pos/types/refunds_get_pos_response_lines_item.rb +23 -0
  72. data/lib/nordlet/pos/types/refunds_list_pos_request.rb +19 -0
  73. data/lib/nordlet/pos/types/refunds_list_pos_request_filter_item.rb +15 -0
  74. data/lib/nordlet/pos/types/refunds_list_pos_request_filter_item_op.rb +18 -0
  75. data/lib/nordlet/pos/types/refunds_list_pos_request_filter_item_value.rb +19 -0
  76. data/lib/nordlet/pos/types/refunds_list_pos_request_filter_item_value_three_item.rb +15 -0
  77. data/lib/nordlet/pos/types/refunds_list_pos_request_sort_item.rb +13 -0
  78. data/lib/nordlet/pos/types/refunds_list_pos_request_sort_item_dir.rb +14 -0
  79. data/lib/nordlet/pos/types/refunds_list_pos_response.rb +21 -0
  80. data/lib/nordlet/pos/types/refunds_list_pos_response_rows_item.rb +31 -0
  81. data/lib/nordlet/production/client.rb +20 -14
  82. data/lib/nordlet/production/types/maintenance_cancel_production_response.rb +2 -0
  83. data/lib/nordlet/production/types/maintenance_complete_production_request.rb +2 -0
  84. data/lib/nordlet/production/types/maintenance_complete_production_response.rb +2 -0
  85. data/lib/nordlet/production/types/maintenance_create_production_request.rb +2 -0
  86. data/lib/nordlet/production/types/maintenance_create_production_response.rb +2 -0
  87. data/lib/nordlet/production/types/maintenance_list_production_response_rows_item.rb +2 -0
  88. data/lib/nordlet/public/client.rb +6 -5
  89. data/lib/nordlet/public/types/invoices_get_public_response.rb +2 -0
  90. data/lib/nordlet/purchases/client.rb +12 -9
  91. data/lib/nordlet/purchases/types/invoices_create_purchases_request_lines_item.rb +4 -0
  92. data/lib/nordlet/purchases/types/invoices_create_purchases_response_lines_item.rb +8 -0
  93. data/lib/nordlet/purchases/types/invoices_get_purchases_response_lines_item.rb +8 -0
  94. data/lib/nordlet/purchases/types/invoices_register_purchases_response_lines_item.rb +8 -0
  95. data/lib/nordlet/purchases/types/invoices_update_purchases_request_lines_item.rb +4 -0
  96. data/lib/nordlet/purchases/types/invoices_update_purchases_response_lines_item.rb +8 -0
  97. data/lib/nordlet/purchases/types/orders_approve_purchases_response_lines_item.rb +4 -0
  98. data/lib/nordlet/purchases/types/orders_cancel_purchases_response_lines_item.rb +4 -0
  99. data/lib/nordlet/purchases/types/orders_close_purchases_response_lines_item.rb +4 -0
  100. data/lib/nordlet/purchases/types/orders_create_purchases_request_lines_item.rb +4 -0
  101. data/lib/nordlet/purchases/types/orders_create_purchases_response_lines_item.rb +4 -0
  102. data/lib/nordlet/purchases/types/orders_get_purchases_response_lines_item.rb +4 -0
  103. data/lib/nordlet/purchases/types/orders_reject_purchases_response_lines_item.rb +4 -0
  104. data/lib/nordlet/purchases/types/orders_submit_purchases_response_lines_item.rb +4 -0
  105. data/lib/nordlet/purchases/types/orders_update_purchases_request_lines_item.rb +4 -0
  106. data/lib/nordlet/purchases/types/orders_update_purchases_response_lines_item.rb +4 -0
  107. data/lib/nordlet/reports/client.rb +3 -3
  108. data/lib/nordlet/sales/client.rb +26 -19
  109. data/lib/nordlet/sales/types/acts_create_sales_response_lines_item.rb +4 -0
  110. data/lib/nordlet/sales/types/acts_get_sales_response_lines_item.rb +4 -0
  111. data/lib/nordlet/sales/types/acts_issue_sales_response_lines_item.rb +4 -0
  112. data/lib/nordlet/sales/types/acts_update_sales_response_lines_item.rb +4 -0
  113. data/lib/nordlet/sales/types/invoices_apply_advance_sales_response_lines_item.rb +4 -0
  114. data/lib/nordlet/sales/types/invoices_create_sales_response_lines_item.rb +4 -0
  115. data/lib/nordlet/sales/types/invoices_get_sales_response_lines_item.rb +4 -0
  116. data/lib/nordlet/sales/types/invoices_issue_sales_response_lines_item.rb +4 -0
  117. data/lib/nordlet/sales/types/invoices_list_sales_response_rows_item.rb +2 -0
  118. data/lib/nordlet/sales/types/invoices_lock_sales_response_lines_item.rb +4 -0
  119. data/lib/nordlet/sales/types/invoices_unlock_sales_response_lines_item.rb +4 -0
  120. data/lib/nordlet/sales/types/invoices_update_sales_response_lines_item.rb +4 -0
  121. data/lib/nordlet/sales/types/invoices_view_sales_response.rb +2 -0
  122. data/lib/nordlet/transport/types/waybills_create_transport_response_lines_item.rb +4 -0
  123. data/lib/nordlet/transport/types/waybills_get_transport_response_lines_item.rb +4 -0
  124. data/lib/nordlet/transport/types/waybills_issue_transport_response_lines_item.rb +4 -0
  125. data/lib/nordlet/transport/types/waybills_update_transport_response_lines_item.rb +4 -0
  126. data/lib/nordlet/version.rb +1 -1
  127. data/lib/nordlet.rb +35 -0
  128. data/reference.md +728 -37
  129. metadata +37 -2
@@ -223,7 +223,8 @@ module Nordlet
223
223
  end
224
224
 
225
225
  # Record a `preventive` or `corrective` maintenance planned for a work center on `plannedDate`; it starts as
226
- # `planned`.
226
+ # `planned`. `purchaseInvoiceId` links the purchase invoice that books its cost (422 when it is not a purchase
227
+ # invoice of the company or is a credit note). Maintenance posts nothing to the ledger itself.
227
228
  #
228
229
  # @param request_options [Hash]
229
230
  # @param params [Nordlet::Production::Types::MaintenanceCreateProductionRequest]
@@ -259,7 +260,8 @@ module Nordlet
259
260
 
260
261
  # Mark a `planned` maintenance as completed on `completedDate`, with optional `downtimeHours` and `cost` (409 when
261
262
  # it is already completed or cancelled). The work center's `nextMaintenanceDate` is then counted from the latest
262
- # completed maintenance date.
263
+ # completed maintenance date. `purchaseInvoiceId` links the purchase invoice that books the cost, as on
264
+ # `production/maintenance/create`; the cost is not posted to the ledger, with or without the link.
263
265
  #
264
266
  # @param request_options [Hash]
265
267
  # @param params [Nordlet::Production::Types::MaintenanceCompleteProductionRequest]
@@ -543,7 +545,7 @@ module Nordlet
543
545
  end
544
546
 
545
547
  # 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.
548
+ # complete while a check is pending or failed.
547
549
  #
548
550
  # @param request_options [Hash]
549
551
  # @param params [Nordlet::Production::Types::QualityChecksAddProductionRequest]
@@ -578,7 +580,8 @@ module Nordlet
578
580
  end
579
581
 
580
582
  # 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.
583
+ # completed). `production/orders/complete` answers 409 while a check is `pending` or `failed`; a failed check can
584
+ # be recorded again as `passed`.
582
585
  #
583
586
  # @param request_options [Hash]
584
587
  # @param params [Nordlet::Production::Types::QualityChecksRecordProductionRequest]
@@ -646,18 +649,21 @@ module Nordlet
646
649
  end
647
650
  end
648
651
 
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
652
+ # Complete a draft production order on the order's date. An `assembly` consumes the components from the warehouse,
653
+ # the first-expiring lot first (lots without an expiry date after those with one, then the oldest layers first),
654
+ # leaving out expired lots (line quantity × order quantity, increased by `scrapPercent`), prices each operation at
655
+ # its actual or planned minutes × `costPerHour`, receives the finished item at material cost + labor cost less the
656
+ # share of `scrappedQuantity`, and, when there is labor, scrap or a component stock account other than the
657
+ # finished one, posts a journal entry debiting the finished stock account (and the `production.scrap` rule account
658
+ # for the scrapped share) and crediting the component stock accounts and the work centers' cost accounts (or the
655
659
  # `production.laborApplied` rule account); a `disassembly` consumes the finished item and receives the components
656
660
  # 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
+ # production accounts; consumed layers without a stock account are credited to the given code, else to the
662
+ # `inventory.stock` rule account. Refused with 409 when the order is already completed, a quality check is still
663
+ # pending or has failed, or the accounting period is locked, and with 422 when the BOM has no lines,
664
+ # `scrappedQuantity` is given on a disassembly or exceeds the finished quantity, the assembly cost is zero, stock
665
+ # is insufficient, a received item needs lot or serial tracking, or a posting account is missing. Emits
666
+ # `stock.changed`.
661
667
  #
662
668
  # @param request_options [Hash]
663
669
  # @param params [Nordlet::Production::Types::OrdersCompleteProductionRequest]
@@ -22,6 +22,8 @@ module Nordlet
22
22
 
23
23
  field :cost, -> { String }, optional: false, nullable: true
24
24
 
25
+ field :purchase_invoice_id, -> { String }, optional: false, nullable: true, api_name: "purchaseInvoiceId"
26
+
25
27
  field :notes, -> { String }, optional: false, nullable: true
26
28
 
27
29
  field :created_at, -> { String }, optional: false, nullable: false, api_name: "createdAt"
@@ -12,6 +12,8 @@ module Nordlet
12
12
 
13
13
  field :cost, -> { String }, optional: true, nullable: false
14
14
 
15
+ field :purchase_invoice_id, -> { String }, optional: true, nullable: false, api_name: "purchaseInvoiceId"
16
+
15
17
  field :notes, -> { String }, optional: true, nullable: false
16
18
  end
17
19
  end
@@ -22,6 +22,8 @@ module Nordlet
22
22
 
23
23
  field :cost, -> { String }, optional: false, nullable: true
24
24
 
25
+ field :purchase_invoice_id, -> { String }, optional: false, nullable: true, api_name: "purchaseInvoiceId"
26
+
25
27
  field :notes, -> { String }, optional: false, nullable: true
26
28
 
27
29
  field :created_at, -> { String }, optional: false, nullable: false, api_name: "createdAt"
@@ -12,6 +12,8 @@ module Nordlet
12
12
 
13
13
  field :description, -> { String }, optional: true, nullable: false
14
14
 
15
+ field :purchase_invoice_id, -> { String }, optional: true, nullable: false, api_name: "purchaseInvoiceId"
16
+
15
17
  field :notes, -> { String }, optional: true, nullable: false
16
18
  end
17
19
  end
@@ -22,6 +22,8 @@ module Nordlet
22
22
 
23
23
  field :cost, -> { String }, optional: false, nullable: true
24
24
 
25
+ field :purchase_invoice_id, -> { String }, optional: false, nullable: true, api_name: "purchaseInvoiceId"
26
+
25
27
  field :notes, -> { String }, optional: false, nullable: true
26
28
 
27
29
  field :created_at, -> { String }, optional: false, nullable: false, api_name: "createdAt"
@@ -22,6 +22,8 @@ module Nordlet
22
22
 
23
23
  field :cost, -> { String }, optional: false, nullable: true
24
24
 
25
+ field :purchase_invoice_id, -> { String }, optional: false, nullable: true, api_name: "purchaseInvoiceId"
26
+
25
27
  field :notes, -> { String }, optional: false, nullable: true
26
28
 
27
29
  field :created_at, -> { String }, optional: false, nullable: false, api_name: "createdAt"
@@ -48,8 +48,8 @@ module Nordlet
48
48
  # Redirect (302) to the company's payment page for the issued invoice that carries this payment token, rendered
49
49
  # from the template set with `sales/invoices/payment-settings/update` with the invoice number, the amount still
50
50
  # unpaid, the currency, the token, the invoice id and the customer name (see `sales/invoices/payment-link`).
51
- # Answers 404 when the token matches no issued invoice, the invoice has `payLinkEnabled` false or the company has
52
- # no template, and 409 when the invoice is already paid.
51
+ # Answers 404 when the token matches no issued invoice, the document is a credit note, the invoice has
52
+ # `payLinkEnabled` false or the company has no template, and 409 when the invoice is already paid.
53
53
  #
54
54
  # @param request_options [Hash]
55
55
  # @param params [Hash]
@@ -118,9 +118,10 @@ module Nordlet
118
118
 
119
119
  # Open a Stripe Checkout page on the company's connected Stripe account for the amount still unpaid on the issued
120
120
  # invoice that carries this customer token, and return its `url`. Stripe sends the customer back to the public
121
- # invoice page. Answers 404 when the token matches no issued invoice, the invoice has `payLinkEnabled` false or
122
- # the company has no Stripe account that can take charges, 409 when the invoice is already paid and 422 when
123
- # Stripe cannot take the amount in the invoice currency.
121
+ # invoice page. Answers 404 when the token matches no issued invoice, the document is a credit note, the invoice
122
+ # has `payLinkEnabled` false or the company has no Stripe account that can take charges, 409 when the invoice is
123
+ # already paid or a completed card payment for it was received and waits for the payout, and 422 when Stripe
124
+ # cannot take the amount in the invoice currency.
124
125
  #
125
126
  # @param request_options [Hash]
126
127
  # @param params [Nordlet::Public::Types::InvoicesCheckoutPublicRequest]
@@ -36,6 +36,8 @@ module Nordlet
36
36
 
37
37
  field :pay_url, -> { String }, optional: false, nullable: true, api_name: "payUrl"
38
38
 
39
+ field :card_payment_received, -> { Internal::Types::Boolean }, optional: false, nullable: false, api_name: "cardPaymentReceived"
40
+
39
41
  field :seller, -> { Nordlet::Public::Types::InvoicesGetPublicResponseSeller }, optional: false, nullable: false
40
42
 
41
43
  field :buyer, -> { Nordlet::Public::Types::InvoicesGetPublicResponseBuyer }, optional: false, nullable: false
@@ -163,13 +163,15 @@ module Nordlet
163
163
  # when set) and credits output VAT for self-assessed VAT; a credit note posts the reverse. Lines with
164
164
  # `deferralStartDate` and `deferralEndDate` are debited to the `purchases.prepaidExpenses` account instead and get
165
165
  # a monthly release schedule for `purchases/deferrals/post`. With `warehouseId` the product lines of an invoice
166
- # are received into stock at their base-currency cost (422 on an order-linked invoice, whose goods arrive through
167
- # `purchases/receipts/create`, and for a line that is also deferred); `returnFromStock` on a credit note that
168
- # credits an invoice takes the goods back out of stock at their FIFO cost and books the difference to the credited
169
- # amount on the `inventory.cogs` account (422 on an invoice, without `creditedInvoiceId`, or when no goods of the
170
- # credited invoice are in stock). A credit note that credits a registered invoice in the same currency is applied
171
- # to it as a payment up to the open amount. Refused with 409 when already registered or the accounting period is
172
- # locked, and with 422 when the credit notes would exceed the credited invoice, a posting account is missing or no
166
+ # are received into stock at their base-currency cost, into the lot named by the line's `lotNumber` (an unknown
167
+ # lot is created, and the line's `expiryDate` is stored on a lot that has none) (422 on an order-linked invoice,
168
+ # whose goods arrive through `purchases/receipts/create`, for a line that is also deferred and for a lot- or
169
+ # serial-tracked item without `lotNumber`); `returnFromStock` on a credit note that credits an invoice takes the
170
+ # goods back out of stock at their FIFO cost and books the difference to the credited amount on the
171
+ # `inventory.cogs` account (422 on an invoice, without `creditedInvoiceId`, or when no goods of the credited
172
+ # invoice are in stock). A credit note that credits a registered invoice in the same currency is applied to it as
173
+ # a payment up to the open amount. Refused with 409 when already registered or the accounting period is locked,
174
+ # and with 422 when the credit notes would exceed the credited invoice, a posting account is missing or no
173
175
  # exchange rate exists for the date. Emits `purchase_invoice.registered`, `purchase_invoice.paid` when the
174
176
  # credited invoice becomes fully paid, and `stock.changed` when stock moves.
175
177
  #
@@ -243,8 +245,9 @@ module Nordlet
243
245
 
244
246
  # Post every `pending` prepaid-expense release row dated on or before `asOfDate` (default today in the company's
245
247
  # time zone): one journal entry per schedule date debiting the expense account and crediting the prepaid account,
246
- # and the rows become `posted`. A locked accounting period is refused with 409. The scheduled job
247
- # `expense-deferrals` runs the same release for every active company.
248
+ # and the rows become `posted`. A row dated in a locked accounting period is posted on the first day of the first
249
+ # open period after it, even when that day is after `asOfDate`. The scheduled job `expense-deferrals` runs the
250
+ # same release for every active company.
248
251
  #
249
252
  # @param request_options [Hash]
250
253
  # @param params [Nordlet::Purchases::Types::DeferralsPostPurchasesRequest]
@@ -29,6 +29,10 @@ module Nordlet
29
29
  field :deferral_start_date, -> { String }, optional: true, nullable: false, api_name: "deferralStartDate"
30
30
 
31
31
  field :deferral_end_date, -> { String }, optional: true, nullable: false, api_name: "deferralEndDate"
32
+
33
+ field :lot_number, -> { String }, optional: true, nullable: false, api_name: "lotNumber"
34
+
35
+ field :expiry_date, -> { String }, optional: true, nullable: false, api_name: "expiryDate"
32
36
  end
33
37
  end
34
38
  end
@@ -14,6 +14,10 @@ module Nordlet
14
14
 
15
15
  field :quantity, -> { String }, optional: false, nullable: false
16
16
 
17
+ field :unit_factor, -> { String }, optional: false, nullable: false, api_name: "unitFactor"
18
+
19
+ field :base_quantity, -> { String }, optional: false, nullable: false, api_name: "baseQuantity"
20
+
17
21
  field :unit_price_excl_vat, -> { String }, optional: false, nullable: true, api_name: "unitPriceExclVat"
18
22
 
19
23
  field :unit_price_incl_vat, -> { String }, optional: false, nullable: true, api_name: "unitPriceInclVat"
@@ -32,6 +36,10 @@ module Nordlet
32
36
 
33
37
  field :deferral_end_date, -> { String }, optional: false, nullable: true, api_name: "deferralEndDate"
34
38
 
39
+ field :lot_number, -> { String }, optional: false, nullable: true, api_name: "lotNumber"
40
+
41
+ field :expiry_date, -> { String }, optional: false, nullable: true, api_name: "expiryDate"
42
+
35
43
  field :line_net, -> { String }, optional: false, nullable: false, api_name: "lineNet"
36
44
 
37
45
  field :line_vat, -> { String }, optional: false, nullable: false, api_name: "lineVat"
@@ -14,6 +14,10 @@ module Nordlet
14
14
 
15
15
  field :quantity, -> { String }, optional: false, nullable: false
16
16
 
17
+ field :unit_factor, -> { String }, optional: false, nullable: false, api_name: "unitFactor"
18
+
19
+ field :base_quantity, -> { String }, optional: false, nullable: false, api_name: "baseQuantity"
20
+
17
21
  field :unit_price_excl_vat, -> { String }, optional: false, nullable: true, api_name: "unitPriceExclVat"
18
22
 
19
23
  field :unit_price_incl_vat, -> { String }, optional: false, nullable: true, api_name: "unitPriceInclVat"
@@ -32,6 +36,10 @@ module Nordlet
32
36
 
33
37
  field :deferral_end_date, -> { String }, optional: false, nullable: true, api_name: "deferralEndDate"
34
38
 
39
+ field :lot_number, -> { String }, optional: false, nullable: true, api_name: "lotNumber"
40
+
41
+ field :expiry_date, -> { String }, optional: false, nullable: true, api_name: "expiryDate"
42
+
35
43
  field :line_net, -> { String }, optional: false, nullable: false, api_name: "lineNet"
36
44
 
37
45
  field :line_vat, -> { String }, optional: false, nullable: false, api_name: "lineVat"
@@ -14,6 +14,10 @@ module Nordlet
14
14
 
15
15
  field :quantity, -> { String }, optional: false, nullable: false
16
16
 
17
+ field :unit_factor, -> { String }, optional: false, nullable: false, api_name: "unitFactor"
18
+
19
+ field :base_quantity, -> { String }, optional: false, nullable: false, api_name: "baseQuantity"
20
+
17
21
  field :unit_price_excl_vat, -> { String }, optional: false, nullable: true, api_name: "unitPriceExclVat"
18
22
 
19
23
  field :unit_price_incl_vat, -> { String }, optional: false, nullable: true, api_name: "unitPriceInclVat"
@@ -32,6 +36,10 @@ module Nordlet
32
36
 
33
37
  field :deferral_end_date, -> { String }, optional: false, nullable: true, api_name: "deferralEndDate"
34
38
 
39
+ field :lot_number, -> { String }, optional: false, nullable: true, api_name: "lotNumber"
40
+
41
+ field :expiry_date, -> { String }, optional: false, nullable: true, api_name: "expiryDate"
42
+
35
43
  field :line_net, -> { String }, optional: false, nullable: false, api_name: "lineNet"
36
44
 
37
45
  field :line_vat, -> { String }, optional: false, nullable: false, api_name: "lineVat"
@@ -29,6 +29,10 @@ module Nordlet
29
29
  field :deferral_start_date, -> { String }, optional: true, nullable: false, api_name: "deferralStartDate"
30
30
 
31
31
  field :deferral_end_date, -> { String }, optional: true, nullable: false, api_name: "deferralEndDate"
32
+
33
+ field :lot_number, -> { String }, optional: true, nullable: false, api_name: "lotNumber"
34
+
35
+ field :expiry_date, -> { String }, optional: true, nullable: false, api_name: "expiryDate"
32
36
  end
33
37
  end
34
38
  end
@@ -14,6 +14,10 @@ module Nordlet
14
14
 
15
15
  field :quantity, -> { String }, optional: false, nullable: false
16
16
 
17
+ field :unit_factor, -> { String }, optional: false, nullable: false, api_name: "unitFactor"
18
+
19
+ field :base_quantity, -> { String }, optional: false, nullable: false, api_name: "baseQuantity"
20
+
17
21
  field :unit_price_excl_vat, -> { String }, optional: false, nullable: true, api_name: "unitPriceExclVat"
18
22
 
19
23
  field :unit_price_incl_vat, -> { String }, optional: false, nullable: true, api_name: "unitPriceInclVat"
@@ -32,6 +36,10 @@ module Nordlet
32
36
 
33
37
  field :deferral_end_date, -> { String }, optional: false, nullable: true, api_name: "deferralEndDate"
34
38
 
39
+ field :lot_number, -> { String }, optional: false, nullable: true, api_name: "lotNumber"
40
+
41
+ field :expiry_date, -> { String }, optional: false, nullable: true, api_name: "expiryDate"
42
+
35
43
  field :line_net, -> { String }, optional: false, nullable: false, api_name: "lineNet"
36
44
 
37
45
  field :line_vat, -> { String }, optional: false, nullable: false, api_name: "lineVat"
@@ -14,6 +14,10 @@ module Nordlet
14
14
 
15
15
  field :quantity, -> { String }, optional: false, nullable: false
16
16
 
17
+ field :unit_factor, -> { String }, optional: false, nullable: false, api_name: "unitFactor"
18
+
19
+ field :base_quantity, -> { String }, optional: false, nullable: false, api_name: "baseQuantity"
20
+
17
21
  field :received_qty, -> { String }, optional: false, nullable: false, api_name: "receivedQty"
18
22
 
19
23
  field :remaining_qty, -> { String }, optional: false, nullable: false, api_name: "remainingQty"
@@ -14,6 +14,10 @@ module Nordlet
14
14
 
15
15
  field :quantity, -> { String }, optional: false, nullable: false
16
16
 
17
+ field :unit_factor, -> { String }, optional: false, nullable: false, api_name: "unitFactor"
18
+
19
+ field :base_quantity, -> { String }, optional: false, nullable: false, api_name: "baseQuantity"
20
+
17
21
  field :received_qty, -> { String }, optional: false, nullable: false, api_name: "receivedQty"
18
22
 
19
23
  field :remaining_qty, -> { String }, optional: false, nullable: false, api_name: "remainingQty"
@@ -14,6 +14,10 @@ module Nordlet
14
14
 
15
15
  field :quantity, -> { String }, optional: false, nullable: false
16
16
 
17
+ field :unit_factor, -> { String }, optional: false, nullable: false, api_name: "unitFactor"
18
+
19
+ field :base_quantity, -> { String }, optional: false, nullable: false, api_name: "baseQuantity"
20
+
17
21
  field :received_qty, -> { String }, optional: false, nullable: false, api_name: "receivedQty"
18
22
 
19
23
  field :remaining_qty, -> { String }, optional: false, nullable: false, api_name: "remainingQty"
@@ -29,6 +29,10 @@ module Nordlet
29
29
  field :deferral_start_date, -> { String }, optional: true, nullable: false, api_name: "deferralStartDate"
30
30
 
31
31
  field :deferral_end_date, -> { String }, optional: true, nullable: false, api_name: "deferralEndDate"
32
+
33
+ field :lot_number, -> { String }, optional: true, nullable: false, api_name: "lotNumber"
34
+
35
+ field :expiry_date, -> { String }, optional: true, nullable: false, api_name: "expiryDate"
32
36
  end
33
37
  end
34
38
  end
@@ -14,6 +14,10 @@ module Nordlet
14
14
 
15
15
  field :quantity, -> { String }, optional: false, nullable: false
16
16
 
17
+ field :unit_factor, -> { String }, optional: false, nullable: false, api_name: "unitFactor"
18
+
19
+ field :base_quantity, -> { String }, optional: false, nullable: false, api_name: "baseQuantity"
20
+
17
21
  field :received_qty, -> { String }, optional: false, nullable: false, api_name: "receivedQty"
18
22
 
19
23
  field :remaining_qty, -> { String }, optional: false, nullable: false, api_name: "remainingQty"
@@ -14,6 +14,10 @@ module Nordlet
14
14
 
15
15
  field :quantity, -> { String }, optional: false, nullable: false
16
16
 
17
+ field :unit_factor, -> { String }, optional: false, nullable: false, api_name: "unitFactor"
18
+
19
+ field :base_quantity, -> { String }, optional: false, nullable: false, api_name: "baseQuantity"
20
+
17
21
  field :received_qty, -> { String }, optional: false, nullable: false, api_name: "receivedQty"
18
22
 
19
23
  field :remaining_qty, -> { String }, optional: false, nullable: false, api_name: "remainingQty"
@@ -14,6 +14,10 @@ module Nordlet
14
14
 
15
15
  field :quantity, -> { String }, optional: false, nullable: false
16
16
 
17
+ field :unit_factor, -> { String }, optional: false, nullable: false, api_name: "unitFactor"
18
+
19
+ field :base_quantity, -> { String }, optional: false, nullable: false, api_name: "baseQuantity"
20
+
17
21
  field :received_qty, -> { String }, optional: false, nullable: false, api_name: "receivedQty"
18
22
 
19
23
  field :remaining_qty, -> { String }, optional: false, nullable: false, api_name: "remainingQty"
@@ -14,6 +14,10 @@ module Nordlet
14
14
 
15
15
  field :quantity, -> { String }, optional: false, nullable: false
16
16
 
17
+ field :unit_factor, -> { String }, optional: false, nullable: false, api_name: "unitFactor"
18
+
19
+ field :base_quantity, -> { String }, optional: false, nullable: false, api_name: "baseQuantity"
20
+
17
21
  field :received_qty, -> { String }, optional: false, nullable: false, api_name: "receivedQty"
18
22
 
19
23
  field :remaining_qty, -> { String }, optional: false, nullable: false, api_name: "remainingQty"
@@ -29,6 +29,10 @@ module Nordlet
29
29
  field :deferral_start_date, -> { String }, optional: true, nullable: false, api_name: "deferralStartDate"
30
30
 
31
31
  field :deferral_end_date, -> { String }, optional: true, nullable: false, api_name: "deferralEndDate"
32
+
33
+ field :lot_number, -> { String }, optional: true, nullable: false, api_name: "lotNumber"
34
+
35
+ field :expiry_date, -> { String }, optional: true, nullable: false, api_name: "expiryDate"
32
36
  end
33
37
  end
34
38
  end
@@ -14,6 +14,10 @@ module Nordlet
14
14
 
15
15
  field :quantity, -> { String }, optional: false, nullable: false
16
16
 
17
+ field :unit_factor, -> { String }, optional: false, nullable: false, api_name: "unitFactor"
18
+
19
+ field :base_quantity, -> { String }, optional: false, nullable: false, api_name: "baseQuantity"
20
+
17
21
  field :received_qty, -> { String }, optional: false, nullable: false, api_name: "receivedQty"
18
22
 
19
23
  field :remaining_qty, -> { String }, optional: false, nullable: false, api_name: "remainingQty"
@@ -948,9 +948,9 @@ module Nordlet
948
948
  end
949
949
  end
950
950
 
951
- # Net purchases per cost centre and item for a period, from the lines of registered purchase invoices (by
952
- # registration date) that carry a cost centre, credit notes counting negative; `costCenterId` limits the report to
953
- # one cost centre. A line without an item is reported under its description.
951
+ # Net purchases in the base currency per cost centre and item for a period, from the lines of registered purchase
952
+ # invoices (by registration date) that carry a cost centre, credit notes counting negative; `costCenterId` limits
953
+ # the report to one cost centre. A line without an item is reported under its description.
954
954
  #
955
955
  # @param request_options [Hash]
956
956
  # @param params [Nordlet::Reports::Types::CostCenterItemsReportsRequest]
@@ -122,8 +122,10 @@ module Nordlet
122
122
 
123
123
  # Return a sale document as its customer sees it: the seller as printed on it (the snapshot taken at issue, else
124
124
  # the company), the buyer with address and e-mail, the lines, the totals, `paidOn` (the date of the latest payment
125
- # once the document is paid), `payUrl` (as in `sales/invoices/payment-link`) and `token`, the document's customer
126
- # token for `public/invoices/get` and `public/invoices/pdf`, created on first use; `token` is null on a draft.
125
+ # once the document is paid), `payUrl` (as in `sales/invoices/payment-link`; null while `cardPaymentReceived`),
126
+ # `cardPaymentReceived` (a completed card payment was received and the invoice waits for the payout settlement)
127
+ # and `token`, the document's customer token for `public/invoices/get` and `public/invoices/pdf`, created on first
128
+ # use; `token` is null on a draft.
127
129
  #
128
130
  # @param request_options [Hash]
129
131
  # @param params [Nordlet::Sales::Types::InvoicesViewSalesRequest]
@@ -494,13 +496,14 @@ module Nordlet
494
496
  # default prefix and the year), the issue date (`issueDate`, else the draft's, else today) and a missing due date
495
497
  # from the partner's payment term, and for an invoice, credit note or advance invoice posts the journal entry and
496
498
  # stores the VAT evidence. `warehouseId` (or the series' warehouse) takes the sold goods of an invoice out of
497
- # stock with a cost of goods sold entry; `returnToStock` puts them back for a credit note that credits an invoice.
498
- # A credit note is set against the unpaid balance of the credited document. Emits `sale_invoice.issued`,
499
- # `sale_invoice.paid` when a credit note settles the credited invoice in full, and `intercompany.invoice_mirrored`
500
- # when the partner is linked to another company of the group (a draft purchase invoice is created there). Answers
501
- # 409 when the document is already issued or locked or the accounting period is locked, 422 when the lines carry
502
- # VAT under a scheme that charges none, when credit notes would exceed the credited total, or when `returnToStock`
503
- # is used on anything but a credit note of an invoice.
499
+ # stock, the first-expiring lot first (lots without an expiry date after those with one, then the oldest layers
500
+ # first), leaving out expired lots, with a cost of goods sold entry; `returnToStock` puts them back for a credit
501
+ # note that credits an invoice. A credit note is set against the unpaid balance of the credited document. Emits
502
+ # `sale_invoice.issued`, `sale_invoice.paid` when a credit note settles the credited invoice in full, and
503
+ # `intercompany.invoice_mirrored` when the partner is linked to another company of the group (a draft purchase
504
+ # invoice is created there). Answers 409 when the document is already issued or locked or the accounting period is
505
+ # locked, 422 when the lines carry VAT under a scheme that charges none, when credit notes would exceed the
506
+ # credited total, or when `returnToStock` is used on anything but a credit note of an invoice.
504
507
  #
505
508
  # @param request_options [Hash]
506
509
  # @param params [Nordlet::Sales::Types::InvoicesIssueSalesRequest]
@@ -790,11 +793,12 @@ module Nordlet
790
793
  end
791
794
  end
792
795
 
793
- # List the sale documents of the company with the partner name. Filterable by partnerId, type, status,
794
- # paymentStatus, fullNumber, issueDate, currency, agreementId, creditedInvoiceId, operationTypeId,
795
- # documentSeriesId, lockedAt, grossTotal, netTotal, vatTotal, dueDate, orderNumber, seriesLabel, locale and
796
- # recurringInvoiceId; sortable by createdAt, issueDate, fullNumber, grossTotal, netTotal, vatTotal, status and
797
- # paymentStatus.
796
+ # List the sale documents of the company with the partner name. An advance invoice also carries
797
+ # `advanceUnappliedAmount`: its gross total less the amounts applied with `sales/invoices/apply-advance` and the
798
+ # issued credit notes on it (null on other documents). Filterable by partnerId, type, status, paymentStatus,
799
+ # fullNumber, issueDate, currency, agreementId, creditedInvoiceId, operationTypeId, documentSeriesId, lockedAt,
800
+ # grossTotal, netTotal, vatTotal, dueDate, orderNumber, seriesLabel, locale and recurringInvoiceId; sortable by
801
+ # createdAt, issueDate, fullNumber, grossTotal, netTotal, vatTotal, status and paymentStatus.
798
802
  #
799
803
  # @param request_options [Hash]
800
804
  # @param params [Nordlet::Sales::Types::InvoicesListSalesRequest]
@@ -937,7 +941,10 @@ module Nordlet
937
941
  end
938
942
  end
939
943
 
940
- # Cancel a draft or issued delivery act. Answers 409 when it is already cancelled.
944
+ # Cancel a draft or issued delivery act. When issuing the act recognised milestone revenue, the recognition
945
+ # journal entry is reversed on the company's current date (or on the recognition date when that is later) and
946
+ # those milestone schedules return to `pending`. Answers 409 when it is already cancelled or when the recognition
947
+ # it posted has changed since.
941
948
  #
942
949
  # @param request_options [Hash]
943
950
  # @param params [Nordlet::Sales::Types::ActsCancelSalesRequest]
@@ -1805,10 +1812,10 @@ module Nordlet
1805
1812
 
1806
1813
  # List the money received on sale documents between `from` and `to` (inclusive), oldest first: bank payments
1807
1814
  # matched to the document, card settlements of a payment provider and cash receipt orders. A reversed bank match
1808
- # is a row with a negative amount on the date it was reversed. Credit notes, advances applied to a final invoice
1809
- # and balances carried over by a migration are not money received and are left out. `amount` is in the document
1810
- # currency; `method` is `card` for a settlement or a payment into a Stripe bank account, `cash` for a cash order
1811
- # and `bank_transfer` otherwise.
1815
+ # is a row with a negative amount on the date it was reversed. Refunds paid on credit notes, credit notes,
1816
+ # advances applied to a final invoice and balances carried over by a migration are not money received and are left
1817
+ # out. `amount` is in the document currency; `method` is `card` for a settlement or a payment into a Stripe bank
1818
+ # account, `cash` for a cash order and `bank_transfer` otherwise.
1812
1819
  #
1813
1820
  # @param request_options [Hash]
1814
1821
  # @param params [Nordlet::Sales::Types::PaymentsListSalesRequest]
@@ -14,6 +14,10 @@ module Nordlet
14
14
 
15
15
  field :quantity, -> { String }, optional: false, nullable: false
16
16
 
17
+ field :unit_factor, -> { String }, optional: false, nullable: false, api_name: "unitFactor"
18
+
19
+ field :base_quantity, -> { String }, optional: false, nullable: false, api_name: "baseQuantity"
20
+
17
21
  field :unit_price_excl_vat, -> { String }, optional: false, nullable: true, api_name: "unitPriceExclVat"
18
22
 
19
23
  field :line_net, -> { String }, optional: false, nullable: true, api_name: "lineNet"
@@ -14,6 +14,10 @@ module Nordlet
14
14
 
15
15
  field :quantity, -> { String }, optional: false, nullable: false
16
16
 
17
+ field :unit_factor, -> { String }, optional: false, nullable: false, api_name: "unitFactor"
18
+
19
+ field :base_quantity, -> { String }, optional: false, nullable: false, api_name: "baseQuantity"
20
+
17
21
  field :unit_price_excl_vat, -> { String }, optional: false, nullable: true, api_name: "unitPriceExclVat"
18
22
 
19
23
  field :line_net, -> { String }, optional: false, nullable: true, api_name: "lineNet"
@@ -14,6 +14,10 @@ module Nordlet
14
14
 
15
15
  field :quantity, -> { String }, optional: false, nullable: false
16
16
 
17
+ field :unit_factor, -> { String }, optional: false, nullable: false, api_name: "unitFactor"
18
+
19
+ field :base_quantity, -> { String }, optional: false, nullable: false, api_name: "baseQuantity"
20
+
17
21
  field :unit_price_excl_vat, -> { String }, optional: false, nullable: true, api_name: "unitPriceExclVat"
18
22
 
19
23
  field :line_net, -> { String }, optional: false, nullable: true, api_name: "lineNet"
@@ -14,6 +14,10 @@ module Nordlet
14
14
 
15
15
  field :quantity, -> { String }, optional: false, nullable: false
16
16
 
17
+ field :unit_factor, -> { String }, optional: false, nullable: false, api_name: "unitFactor"
18
+
19
+ field :base_quantity, -> { String }, optional: false, nullable: false, api_name: "baseQuantity"
20
+
17
21
  field :unit_price_excl_vat, -> { String }, optional: false, nullable: true, api_name: "unitPriceExclVat"
18
22
 
19
23
  field :line_net, -> { String }, optional: false, nullable: true, api_name: "lineNet"
@@ -14,6 +14,10 @@ module Nordlet
14
14
 
15
15
  field :quantity, -> { String }, optional: false, nullable: false
16
16
 
17
+ field :unit_factor, -> { String }, optional: false, nullable: false, api_name: "unitFactor"
18
+
19
+ field :base_quantity, -> { String }, optional: false, nullable: false, api_name: "baseQuantity"
20
+
17
21
  field :unit_price_excl_vat, -> { String }, optional: false, nullable: true, api_name: "unitPriceExclVat"
18
22
 
19
23
  field :unit_price_incl_vat, -> { String }, optional: false, nullable: true, api_name: "unitPriceInclVat"