nordlet 0.6.3 → 0.6.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 (158) hide show
  1. checksums.yaml +4 -4
  2. data/lib/nordlet/account/client.rb +252 -19
  3. data/lib/nordlet/account/types/api_keys_list_account_response_rows_item.rb +2 -0
  4. data/lib/nordlet/account/types/export_account_response.rb +8 -0
  5. data/lib/nordlet/account/types/export_account_response_api_keys_item.rb +25 -0
  6. data/lib/nordlet/account/types/export_account_response_auth_events_item.rb +17 -0
  7. data/lib/nordlet/account/types/export_account_response_oauth_grants_item.rb +17 -0
  8. data/lib/nordlet/account/types/export_account_response_referral_points_item.rb +15 -0
  9. data/lib/nordlet/account/types/invites_accept_account_response.rb +2 -0
  10. data/lib/nordlet/account/types/login_link_consume_account_response.rb +2 -0
  11. data/lib/nordlet/account/types/two_factor_disable_account_request.rb +11 -0
  12. data/lib/nordlet/account/types/two_factor_disable_account_response.rb +11 -0
  13. data/lib/nordlet/account/types/two_factor_enable_account_request.rb +11 -0
  14. data/lib/nordlet/account/types/two_factor_enable_account_response.rb +11 -0
  15. data/lib/nordlet/account/types/two_factor_get_account_request.rb +9 -0
  16. data/lib/nordlet/account/types/two_factor_get_account_response.rb +17 -0
  17. data/lib/nordlet/account/types/two_factor_get_account_response_setup.rb +13 -0
  18. data/lib/nordlet/account/types/two_factor_recovery_codes_regenerate_account_request.rb +11 -0
  19. data/lib/nordlet/account/types/two_factor_recovery_codes_regenerate_account_response.rb +11 -0
  20. data/lib/nordlet/account/types/two_factor_setup_account_request.rb +9 -0
  21. data/lib/nordlet/account/types/two_factor_setup_account_response.rb +13 -0
  22. data/lib/nordlet/account/types/two_factor_verify_account_request.rb +11 -0
  23. data/lib/nordlet/account/types/two_factor_verify_account_response.rb +11 -0
  24. data/lib/nordlet/bank/client.rb +19 -16
  25. data/lib/nordlet/billing/client.rb +3 -1
  26. data/lib/nordlet/calendar/types/create_calendar_response_submission.rb +2 -0
  27. data/lib/nordlet/calendar/types/create_calendar_response_submissions_item.rb +2 -0
  28. data/lib/nordlet/calendar/types/get_calendar_response_submission.rb +2 -0
  29. data/lib/nordlet/calendar/types/get_calendar_response_submissions_item.rb +2 -0
  30. data/lib/nordlet/calendar/types/list_calendar_response_rows_item_submission.rb +2 -0
  31. data/lib/nordlet/calendar/types/list_calendar_response_rows_item_submissions_item.rb +2 -0
  32. data/lib/nordlet/calendar/types/submit_calendar_response.rb +2 -0
  33. data/lib/nordlet/calendar/types/update_calendar_response_submission.rb +2 -0
  34. data/lib/nordlet/calendar/types/update_calendar_response_submissions_item.rb +2 -0
  35. data/lib/nordlet/capture/types/documents_confirm_capture_request_lines_item.rb +4 -0
  36. data/lib/nordlet/capture/types/documents_confirm_capture_request_opposite_lines_item.rb +4 -0
  37. data/lib/nordlet/capture/types/documents_confirm_capture_response_invoice_lines_item.rb +8 -0
  38. data/lib/nordlet/capture/types/documents_confirm_capture_response_opposite_invoice_lines_item.rb +8 -0
  39. data/lib/nordlet/cash/client.rb +7 -6
  40. data/lib/nordlet/catalog/client.rb +145 -2
  41. data/lib/nordlet/catalog/types/items_create_catalog_response.rb +2 -0
  42. data/lib/nordlet/catalog/types/items_create_catalog_response_alternative_units_item.rb +21 -0
  43. data/lib/nordlet/catalog/types/items_get_catalog_response.rb +2 -0
  44. data/lib/nordlet/catalog/types/items_get_catalog_response_alternative_units_item.rb +21 -0
  45. data/lib/nordlet/catalog/types/items_list_catalog_response_rows_item.rb +2 -0
  46. data/lib/nordlet/catalog/types/items_list_catalog_response_rows_item_alternative_units_item.rb +21 -0
  47. data/lib/nordlet/catalog/types/items_units_create_catalog_request.rb +21 -0
  48. data/lib/nordlet/catalog/types/items_units_create_catalog_response.rb +27 -0
  49. data/lib/nordlet/catalog/types/items_units_delete_catalog_request.rb +11 -0
  50. data/lib/nordlet/catalog/types/items_units_delete_catalog_response.rb +11 -0
  51. data/lib/nordlet/catalog/types/items_units_list_catalog_request.rb +11 -0
  52. data/lib/nordlet/catalog/types/items_units_list_catalog_response.rb +11 -0
  53. data/lib/nordlet/catalog/types/items_units_list_catalog_response_rows_item.rb +27 -0
  54. data/lib/nordlet/catalog/types/items_units_update_catalog_request.rb +19 -0
  55. data/lib/nordlet/catalog/types/items_units_update_catalog_response.rb +27 -0
  56. data/lib/nordlet/catalog/types/items_update_catalog_response.rb +2 -0
  57. data/lib/nordlet/catalog/types/items_update_catalog_response_alternative_units_item.rb +21 -0
  58. data/lib/nordlet/catalog/types/units_create_catalog_request.rb +2 -0
  59. data/lib/nordlet/catalog/types/units_create_catalog_response.rb +2 -0
  60. data/lib/nordlet/catalog/types/units_list_catalog_response_rows_item.rb +2 -0
  61. data/lib/nordlet/catalog/types/units_update_catalog_request.rb +2 -0
  62. data/lib/nordlet/catalog/types/units_update_catalog_response.rb +2 -0
  63. data/lib/nordlet/declarations/client.rb +46 -5
  64. data/lib/nordlet/declarations/types/configs_list_declarations_response_rows_item_fields_item_kind.rb +1 -0
  65. data/lib/nordlet/declarations/types/configs_update_declarations_response_fields_item_kind.rb +1 -0
  66. data/lib/nordlet/declarations/types/lt_ivaz_amend_declarations_request.rb +2 -0
  67. data/lib/nordlet/declarations/types/lt_ivaz_amend_declarations_request_corrections_item.rb +25 -0
  68. data/lib/nordlet/declarations/types/lt_ivaz_amend_declarations_request_corrections_item_lines_item.rb +13 -0
  69. data/lib/nordlet/declarations/types/submissions_confirm_declarations_request.rb +11 -0
  70. data/lib/nordlet/declarations/types/submissions_confirm_declarations_response.rb +71 -0
  71. data/lib/nordlet/declarations/types/submissions_confirm_declarations_response_environment.rb +14 -0
  72. data/lib/nordlet/declarations/types/submissions_confirm_declarations_response_status.rb +16 -0
  73. data/lib/nordlet/declarations/types/submissions_create_declarations_response.rb +2 -0
  74. data/lib/nordlet/declarations/types/submissions_list_declarations_response_rows_item.rb +2 -0
  75. data/lib/nordlet/declarations/types/submissions_mark_declarations_response.rb +2 -0
  76. data/lib/nordlet/declarations/types/submissions_retry_declarations_response.rb +2 -0
  77. data/lib/nordlet/ecommerce/client.rb +12 -9
  78. data/lib/nordlet/fleet/client.rb +8 -4
  79. data/lib/nordlet/fleet/types/vehicles_create_fleet_request.rb +2 -0
  80. data/lib/nordlet/fleet/types/vehicles_create_fleet_response.rb +2 -0
  81. data/lib/nordlet/fleet/types/vehicles_get_fleet_response.rb +2 -0
  82. data/lib/nordlet/fleet/types/vehicles_list_fleet_response_rows_item.rb +2 -0
  83. data/lib/nordlet/fleet/types/vehicles_update_fleet_request.rb +2 -0
  84. data/lib/nordlet/fleet/types/vehicles_update_fleet_response.rb +2 -0
  85. data/lib/nordlet/inventory/client.rb +28 -23
  86. data/lib/nordlet/ledger/types/posting_rules_update_ledger_request_rules_item_key.rb +2 -0
  87. data/lib/nordlet/payroll/client.rb +16 -12
  88. data/lib/nordlet/peppol/client.rb +4 -1
  89. data/lib/nordlet/pos/client.rb +126 -9
  90. data/lib/nordlet/pos/types/refunds_create_pos_request.rb +17 -0
  91. data/lib/nordlet/pos/types/refunds_create_pos_request_lines_item.rb +13 -0
  92. data/lib/nordlet/pos/types/refunds_create_pos_response.rb +33 -0
  93. data/lib/nordlet/pos/types/refunds_create_pos_response_lines_item.rb +23 -0
  94. data/lib/nordlet/pos/types/refunds_get_pos_request.rb +11 -0
  95. data/lib/nordlet/pos/types/refunds_get_pos_response.rb +33 -0
  96. data/lib/nordlet/pos/types/refunds_get_pos_response_lines_item.rb +23 -0
  97. data/lib/nordlet/pos/types/refunds_list_pos_request.rb +19 -0
  98. data/lib/nordlet/pos/types/refunds_list_pos_request_filter_item.rb +15 -0
  99. data/lib/nordlet/pos/types/refunds_list_pos_request_filter_item_op.rb +18 -0
  100. data/lib/nordlet/pos/types/refunds_list_pos_request_filter_item_value.rb +19 -0
  101. data/lib/nordlet/pos/types/refunds_list_pos_request_filter_item_value_three_item.rb +15 -0
  102. data/lib/nordlet/pos/types/refunds_list_pos_request_sort_item.rb +13 -0
  103. data/lib/nordlet/pos/types/refunds_list_pos_request_sort_item_dir.rb +14 -0
  104. data/lib/nordlet/pos/types/refunds_list_pos_response.rb +21 -0
  105. data/lib/nordlet/pos/types/refunds_list_pos_response_rows_item.rb +31 -0
  106. data/lib/nordlet/production/client.rb +20 -14
  107. data/lib/nordlet/production/types/maintenance_cancel_production_response.rb +2 -0
  108. data/lib/nordlet/production/types/maintenance_complete_production_request.rb +2 -0
  109. data/lib/nordlet/production/types/maintenance_complete_production_response.rb +2 -0
  110. data/lib/nordlet/production/types/maintenance_create_production_request.rb +2 -0
  111. data/lib/nordlet/production/types/maintenance_create_production_response.rb +2 -0
  112. data/lib/nordlet/production/types/maintenance_list_production_response_rows_item.rb +2 -0
  113. data/lib/nordlet/public/client.rb +6 -5
  114. data/lib/nordlet/public/types/invoices_get_public_response.rb +2 -0
  115. data/lib/nordlet/purchases/client.rb +12 -9
  116. data/lib/nordlet/purchases/types/invoices_create_purchases_request_lines_item.rb +4 -0
  117. data/lib/nordlet/purchases/types/invoices_create_purchases_response_lines_item.rb +8 -0
  118. data/lib/nordlet/purchases/types/invoices_get_purchases_response_lines_item.rb +8 -0
  119. data/lib/nordlet/purchases/types/invoices_register_purchases_response_lines_item.rb +8 -0
  120. data/lib/nordlet/purchases/types/invoices_update_purchases_request_lines_item.rb +4 -0
  121. data/lib/nordlet/purchases/types/invoices_update_purchases_response_lines_item.rb +8 -0
  122. data/lib/nordlet/purchases/types/orders_approve_purchases_response_lines_item.rb +4 -0
  123. data/lib/nordlet/purchases/types/orders_cancel_purchases_response_lines_item.rb +4 -0
  124. data/lib/nordlet/purchases/types/orders_close_purchases_response_lines_item.rb +4 -0
  125. data/lib/nordlet/purchases/types/orders_create_purchases_request_lines_item.rb +4 -0
  126. data/lib/nordlet/purchases/types/orders_create_purchases_response_lines_item.rb +4 -0
  127. data/lib/nordlet/purchases/types/orders_get_purchases_response_lines_item.rb +4 -0
  128. data/lib/nordlet/purchases/types/orders_reject_purchases_response_lines_item.rb +4 -0
  129. data/lib/nordlet/purchases/types/orders_submit_purchases_response_lines_item.rb +4 -0
  130. data/lib/nordlet/purchases/types/orders_update_purchases_request_lines_item.rb +4 -0
  131. data/lib/nordlet/purchases/types/orders_update_purchases_response_lines_item.rb +4 -0
  132. data/lib/nordlet/reports/client.rb +3 -3
  133. data/lib/nordlet/sales/client.rb +26 -19
  134. data/lib/nordlet/sales/types/acts_create_sales_response_lines_item.rb +4 -0
  135. data/lib/nordlet/sales/types/acts_get_sales_response_lines_item.rb +4 -0
  136. data/lib/nordlet/sales/types/acts_issue_sales_response_lines_item.rb +4 -0
  137. data/lib/nordlet/sales/types/acts_update_sales_response_lines_item.rb +4 -0
  138. data/lib/nordlet/sales/types/invoices_apply_advance_sales_response_lines_item.rb +4 -0
  139. data/lib/nordlet/sales/types/invoices_create_sales_response_lines_item.rb +4 -0
  140. data/lib/nordlet/sales/types/invoices_get_sales_response_lines_item.rb +4 -0
  141. data/lib/nordlet/sales/types/invoices_issue_sales_response_lines_item.rb +4 -0
  142. data/lib/nordlet/sales/types/invoices_list_sales_response_rows_item.rb +2 -0
  143. data/lib/nordlet/sales/types/invoices_lock_sales_response_lines_item.rb +4 -0
  144. data/lib/nordlet/sales/types/invoices_unlock_sales_response_lines_item.rb +4 -0
  145. data/lib/nordlet/sales/types/invoices_update_sales_response_lines_item.rb +4 -0
  146. data/lib/nordlet/sales/types/invoices_view_sales_response.rb +2 -0
  147. data/lib/nordlet/transport/types/waybills_create_transport_response_lines_item.rb +4 -0
  148. data/lib/nordlet/transport/types/waybills_get_transport_response_lines_item.rb +4 -0
  149. data/lib/nordlet/transport/types/waybills_issue_transport_response_lines_item.rb +4 -0
  150. data/lib/nordlet/transport/types/waybills_update_transport_response_lines_item.rb +4 -0
  151. data/lib/nordlet/version.rb +1 -1
  152. data/lib/nordlet/webhooks/client.rb +41 -2
  153. data/lib/nordlet/webhooks/types/subscriptions_rotate_secret_webhooks_request.rb +13 -0
  154. data/lib/nordlet/webhooks/types/subscriptions_rotate_secret_webhooks_response.rb +31 -0
  155. data/lib/nordlet/webhooks/types/subscriptions_rotate_secret_webhooks_response_last_delivery_status.rb +15 -0
  156. data/lib/nordlet.rb +55 -0
  157. data/reference.md +1380 -263
  158. metadata +57 -2
@@ -234,12 +234,15 @@ module Nordlet
234
234
 
235
235
  # Match one new bank transaction to a document: an issued sale invoice or advance for incoming money; an issued
236
236
  # sale credit note, a registered purchase invoice or an approved payroll run (company currency only) for outgoing
237
- # money. Posts the payment journal transaction between the bank account and the receivable, payable or net payable
238
- # account, with any exchange difference on the gain or loss account, raises the paid amount of the document and
239
- # sets the line to matched. `invoiceAmount` states the amount settled on an invoice in another currency; in the
240
- # same currency it must equal the payment (422). Answers 409 when the line is already matched, when the amount
241
- # exceeds the remaining balance of the document or when the accounting period of the line date is locked. A
242
- # document that becomes fully paid is announced as `sale_invoice.paid` or `purchase_invoice.paid`.
237
+ # money. Posts the payment journal transaction between the bank account and the receivable or payable account the
238
+ # invoice was posted to (the account of its operation type, else the posting rule) or the net payable account,
239
+ # with any exchange difference on the gain or loss account, raises the paid amount of the document and sets the
240
+ # line to matched. A payment in another currency is converted into the invoice currency at the rate of the line
241
+ # date, and the difference against the invoice's own rate is the exchange difference; `invoiceAmount` states the
242
+ # amount settled instead; in the same currency it must equal the payment (422). Answers 409 when the line is
243
+ # already matched, when the amount (converted, beyond one cent of the payment) exceeds the remaining balance of
244
+ # the document or when the accounting period of the line date is locked. A document that becomes fully paid is
245
+ # announced as `sale_invoice.paid` or `purchase_invoice.paid`.
243
246
  #
244
247
  # @param request_options [Hash]
245
248
  # @param params [Nordlet::Bank::Types::TransactionsMatchBankRequest]
@@ -1325,16 +1328,16 @@ module Nordlet
1325
1328
  end
1326
1329
 
1327
1330
  # Post a settlement batch dated `date` (default: the payout date, else today): the bank account receives the net
1328
- # payout, the matched sale invoices are settled against the receivable (the receivable of each partner in a
1329
- # journal transaction of its own when invoices of several partners are settled), the provider fees, the
1330
- # marketplace commission and the seller payable are booked, and a payout in another currency is converted at the
1331
- # rate of that date with the exchange difference against each invoice's own rate on the gain or loss account. A
1332
- # line without a matched invoice is split by its own rate or amount, else by `commissionPercent`, else parked on
1333
- # the suspense account; a line already imported as a movement of a bank account is posted against that account
1334
- # instead. Answers 409 when the batch is already posted or the period is locked, 422 when it has no lines. The
1335
- # payout is linked to the bank line a match rule recognises. Emits `settlement.posted`, `sale_invoice.paid` for
1336
- # each invoice that becomes paid and `refund_liability.actual` for refunds of invoices carrying a refund
1337
- # liability.
1331
+ # payout, the matched sale invoices are settled against the receivable account each was posted to (its operation
1332
+ # type's account, else the posting rule; the receivable of each partner in a journal transaction of its own when
1333
+ # invoices of several partners are settled), the provider fees, the marketplace commission and the seller payable
1334
+ # are booked, and a payout in another currency is converted at the rate of that date with the exchange difference
1335
+ # against each invoice's own rate on the gain or loss account. A line without a matched invoice is split by its
1336
+ # own rate or amount, else by `commissionPercent`, else parked on the suspense account; a line already imported as
1337
+ # a movement of a bank account is posted against that account instead. Answers 409 when the batch is already
1338
+ # posted or the period is locked, 422 when it has no lines. The payout is linked to the bank line a match rule
1339
+ # recognises. Emits `settlement.posted`, `sale_invoice.paid` for each invoice that becomes paid and
1340
+ # `refund_liability.actual` for refunds of invoices carrying a refund liability.
1338
1341
  #
1339
1342
  # @param request_options [Hash]
1340
1343
  # @param params [Nordlet::Bank::Types::SettlementsPostBankRequest]
@@ -49,7 +49,9 @@ module Nordlet
49
49
 
50
50
  # Change the plan of the user's flat-rate billing account of the request's site; answers 422 when the plan is not
51
51
  # one of that site's plans and 409 when the account type is not `flat_rate`. With a Stripe subscription and
52
- # payments configured, the subscription is moved to the new plan.
52
+ # payments configured, the subscription is moved to the new plan. On the day of the change, the plan fee (without
53
+ # a subscription) and the storage are split by hour, each hour at the plan in force when the hour starts, and the
54
+ # sale invoices of the day count against the plan in force when they were made.
53
55
  #
54
56
  # @param request_options [Hash]
55
57
  # @param params [Nordlet::Billing::Types::AccountSetPlanBillingRequest]
@@ -52,6 +52,8 @@ module Nordlet
52
52
 
53
53
  field :delivery_error, -> { String }, optional: false, nullable: true, api_name: "deliveryError"
54
54
 
55
+ field :confirmation_pending, -> { Internal::Types::Boolean }, optional: false, nullable: false, api_name: "confirmationPending"
56
+
55
57
  field :sent_sha256, -> { String }, optional: false, nullable: true, api_name: "sentSha256"
56
58
 
57
59
  field :certificate_fingerprint, -> { String }, optional: false, nullable: true, api_name: "certificateFingerprint"
@@ -52,6 +52,8 @@ module Nordlet
52
52
 
53
53
  field :delivery_error, -> { String }, optional: false, nullable: true, api_name: "deliveryError"
54
54
 
55
+ field :confirmation_pending, -> { Internal::Types::Boolean }, optional: false, nullable: false, api_name: "confirmationPending"
56
+
55
57
  field :sent_sha256, -> { String }, optional: false, nullable: true, api_name: "sentSha256"
56
58
 
57
59
  field :certificate_fingerprint, -> { String }, optional: false, nullable: true, api_name: "certificateFingerprint"
@@ -52,6 +52,8 @@ module Nordlet
52
52
 
53
53
  field :delivery_error, -> { String }, optional: false, nullable: true, api_name: "deliveryError"
54
54
 
55
+ field :confirmation_pending, -> { Internal::Types::Boolean }, optional: false, nullable: false, api_name: "confirmationPending"
56
+
55
57
  field :sent_sha256, -> { String }, optional: false, nullable: true, api_name: "sentSha256"
56
58
 
57
59
  field :certificate_fingerprint, -> { String }, optional: false, nullable: true, api_name: "certificateFingerprint"
@@ -52,6 +52,8 @@ module Nordlet
52
52
 
53
53
  field :delivery_error, -> { String }, optional: false, nullable: true, api_name: "deliveryError"
54
54
 
55
+ field :confirmation_pending, -> { Internal::Types::Boolean }, optional: false, nullable: false, api_name: "confirmationPending"
56
+
55
57
  field :sent_sha256, -> { String }, optional: false, nullable: true, api_name: "sentSha256"
56
58
 
57
59
  field :certificate_fingerprint, -> { String }, optional: false, nullable: true, api_name: "certificateFingerprint"
@@ -52,6 +52,8 @@ module Nordlet
52
52
 
53
53
  field :delivery_error, -> { String }, optional: false, nullable: true, api_name: "deliveryError"
54
54
 
55
+ field :confirmation_pending, -> { Internal::Types::Boolean }, optional: false, nullable: false, api_name: "confirmationPending"
56
+
55
57
  field :sent_sha256, -> { String }, optional: false, nullable: true, api_name: "sentSha256"
56
58
 
57
59
  field :certificate_fingerprint, -> { String }, optional: false, nullable: true, api_name: "certificateFingerprint"
@@ -52,6 +52,8 @@ module Nordlet
52
52
 
53
53
  field :delivery_error, -> { String }, optional: false, nullable: true, api_name: "deliveryError"
54
54
 
55
+ field :confirmation_pending, -> { Internal::Types::Boolean }, optional: false, nullable: false, api_name: "confirmationPending"
56
+
55
57
  field :sent_sha256, -> { String }, optional: false, nullable: true, api_name: "sentSha256"
56
58
 
57
59
  field :certificate_fingerprint, -> { String }, optional: false, nullable: true, api_name: "certificateFingerprint"
@@ -52,6 +52,8 @@ module Nordlet
52
52
 
53
53
  field :delivery_error, -> { String }, optional: false, nullable: true, api_name: "deliveryError"
54
54
 
55
+ field :confirmation_pending, -> { Internal::Types::Boolean }, optional: false, nullable: false, api_name: "confirmationPending"
56
+
55
57
  field :sent_sha256, -> { String }, optional: false, nullable: true, api_name: "sentSha256"
56
58
 
57
59
  field :certificate_fingerprint, -> { String }, optional: false, nullable: true, api_name: "certificateFingerprint"
@@ -52,6 +52,8 @@ module Nordlet
52
52
 
53
53
  field :delivery_error, -> { String }, optional: false, nullable: true, api_name: "deliveryError"
54
54
 
55
+ field :confirmation_pending, -> { Internal::Types::Boolean }, optional: false, nullable: false, api_name: "confirmationPending"
56
+
55
57
  field :sent_sha256, -> { String }, optional: false, nullable: true, api_name: "sentSha256"
56
58
 
57
59
  field :certificate_fingerprint, -> { String }, optional: false, nullable: true, api_name: "certificateFingerprint"
@@ -52,6 +52,8 @@ module Nordlet
52
52
 
53
53
  field :delivery_error, -> { String }, optional: false, nullable: true, api_name: "deliveryError"
54
54
 
55
+ field :confirmation_pending, -> { Internal::Types::Boolean }, optional: false, nullable: false, api_name: "confirmationPending"
56
+
55
57
  field :sent_sha256, -> { String }, optional: false, nullable: true, api_name: "sentSha256"
56
58
 
57
59
  field :certificate_fingerprint, -> { String }, optional: false, nullable: true, api_name: "certificateFingerprint"
@@ -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
@@ -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"
@@ -15,12 +15,13 @@ module Nordlet
15
15
  # `counterAccountCode`; a receipt debits the cash account, a disbursement credits it. Linked to an invoice -
16
16
  # `saleInvoiceId` for a receipt against an issued invoice or advance invoice or a disbursement against an issued
17
17
  # credit note, `purchaseInvoiceId` for a disbursement against a registered purchase invoice - the counter account
18
- # is the receivable or payable account of the posting rules, the invoice's paid amount and payment status
19
- # (`partial` or `paid`) are updated, and `sale_invoice.paid` or `purchase_invoice.paid` is emitted when the
20
- # invoice becomes fully paid. Answers 422 when both invoice ids are given, a receipt names a purchase invoice,
21
- # `counterAccountCode` differs from the invoice's account, or the invoice is in another currency or belongs to
22
- # another partner; 409 when `amount` exceeds the invoice's remaining amount or the accounting period of `date` is
23
- # locked.
18
+ # is the receivable or payable account the invoice was posted to (its operation type's account, else the posting
19
+ # rule), the invoice's paid amount and payment status (`partial` or `paid`) are updated, and `sale_invoice.paid`
20
+ # or `purchase_invoice.paid` is emitted when the invoice becomes fully paid. Answers 422 when both invoice ids are
21
+ # given, a receipt names a purchase invoice, `counterAccountCode` differs from the invoice's account, or the
22
+ # invoice is in another currency or belongs to another partner; 409 when `amount` exceeds the invoice's remaining
23
+ # amount, a disbursement would take the balance of the cash account below zero on `date` or any later date, or the
24
+ # accounting period of `date` is locked.
24
25
  #
25
26
  # @param request_options [Hash]
26
27
  # @param params [Nordlet::Cash::Types::OrdersCreateCashRequest]
@@ -364,7 +364,8 @@ module Nordlet
364
364
  end
365
365
 
366
366
  # Create a unit of measure of the company's own, in addition to the global measurement units
367
- # (`reference/units/list`). 409 when the code already exists.
367
+ # (`reference/units/list`). `rec20Code` is the UN/ECE Recommendation 20 code e-invoices carry for the unit. 409
368
+ # when the code already exists.
368
369
  #
369
370
  # @param request_options [Hash]
370
371
  # @param params [Nordlet::Catalog::Types::UnitsCreateCatalogRequest]
@@ -398,7 +399,8 @@ module Nordlet
398
399
  end
399
400
  end
400
401
 
401
- # Change the code, name or active flag of a company unit. 409 when the new code already exists.
402
+ # Change the code, name, UN/ECE Recommendation 20 code or active flag of a company unit. 409 when the new code
403
+ # already exists.
402
404
  #
403
405
  # @param request_options [Hash]
404
406
  # @param params [Nordlet::Catalog::Types::UnitsUpdateCatalogRequest]
@@ -777,6 +779,147 @@ module Nordlet
777
779
  end
778
780
  end
779
781
 
782
+ # Add an alternative unit to an item: `factor` is how many of the item's own unit one `unitCode` holds (a box of
783
+ # 12 pieces has factor 12). Document lines entered in that unit keep the entered quantity and unit price and move
784
+ # `quantity × factor` of the item's unit in stock and filings. `isDefaultSale` and `isDefaultPurchase` mark the
785
+ # unit the app offers first on sale and purchase documents; setting one clears it on the item's other units. 422
786
+ # when `unitCode` is the item's own unit or not a known unit; 409 when the item already has that unit.
787
+ #
788
+ # @param request_options [Hash]
789
+ # @param params [Nordlet::Catalog::Types::ItemsUnitsCreateCatalogRequest]
790
+ # @option request_options [String] :base_url
791
+ # @option request_options [Hash{String => Object}] :additional_headers
792
+ # @option request_options [Hash{String => Object}] :additional_query_parameters
793
+ # @option request_options [Hash{String => Object}] :additional_body_parameters
794
+ # @option request_options [Integer] :timeout_in_seconds
795
+ #
796
+ # @return [Nordlet::Catalog::Types::ItemsUnitsCreateCatalogResponse]
797
+ def items_units_create(request_options: {}, **params)
798
+ params = Nordlet::Internal::Types::Utils.normalize_keys(params)
799
+ request = Nordlet::Internal::JSON::Request.new(
800
+ base_url: request_options[:base_url],
801
+ method: "POST",
802
+ path: "v1/catalog/items/units/create",
803
+ body: Nordlet::Catalog::Types::ItemsUnitsCreateCatalogRequest.new(params).to_h,
804
+ request_options: request_options
805
+ )
806
+ begin
807
+ response = @client.send(request)
808
+ rescue Net::HTTPRequestTimeout
809
+ raise Nordlet::Errors::TimeoutError
810
+ end
811
+ code = response.code.to_i
812
+ if code.between?(200, 299)
813
+ Nordlet::Catalog::Types::ItemsUnitsCreateCatalogResponse.load(response.body)
814
+ else
815
+ error_class = Nordlet::Errors::ResponseError.subclass_for_code(code)
816
+ raise error_class.new(response.body, code: code)
817
+ end
818
+ end
819
+
820
+ # Change the factor, default flags or barcode of an alternative unit. Document lines already entered keep the
821
+ # factor they were saved with; the new factor applies to lines entered or recalculated after the change.
822
+ #
823
+ # @param request_options [Hash]
824
+ # @param params [Nordlet::Catalog::Types::ItemsUnitsUpdateCatalogRequest]
825
+ # @option request_options [String] :base_url
826
+ # @option request_options [Hash{String => Object}] :additional_headers
827
+ # @option request_options [Hash{String => Object}] :additional_query_parameters
828
+ # @option request_options [Hash{String => Object}] :additional_body_parameters
829
+ # @option request_options [Integer] :timeout_in_seconds
830
+ #
831
+ # @return [Nordlet::Catalog::Types::ItemsUnitsUpdateCatalogResponse]
832
+ def items_units_update(request_options: {}, **params)
833
+ params = Nordlet::Internal::Types::Utils.normalize_keys(params)
834
+ request = Nordlet::Internal::JSON::Request.new(
835
+ base_url: request_options[:base_url],
836
+ method: "POST",
837
+ path: "v1/catalog/items/units/update",
838
+ body: Nordlet::Catalog::Types::ItemsUnitsUpdateCatalogRequest.new(params).to_h,
839
+ request_options: request_options
840
+ )
841
+ begin
842
+ response = @client.send(request)
843
+ rescue Net::HTTPRequestTimeout
844
+ raise Nordlet::Errors::TimeoutError
845
+ end
846
+ code = response.code.to_i
847
+ if code.between?(200, 299)
848
+ Nordlet::Catalog::Types::ItemsUnitsUpdateCatalogResponse.load(response.body)
849
+ else
850
+ error_class = Nordlet::Errors::ResponseError.subclass_for_code(code)
851
+ raise error_class.new(response.body, code: code)
852
+ end
853
+ end
854
+
855
+ # Delete an alternative unit of an item. Document lines already entered in it keep their unit and factor.
856
+ #
857
+ # @param request_options [Hash]
858
+ # @param params [Nordlet::Catalog::Types::ItemsUnitsDeleteCatalogRequest]
859
+ # @option request_options [String] :base_url
860
+ # @option request_options [Hash{String => Object}] :additional_headers
861
+ # @option request_options [Hash{String => Object}] :additional_query_parameters
862
+ # @option request_options [Hash{String => Object}] :additional_body_parameters
863
+ # @option request_options [Integer] :timeout_in_seconds
864
+ #
865
+ # @return [Nordlet::Catalog::Types::ItemsUnitsDeleteCatalogResponse]
866
+ def items_units_delete(request_options: {}, **params)
867
+ params = Nordlet::Internal::Types::Utils.normalize_keys(params)
868
+ request = Nordlet::Internal::JSON::Request.new(
869
+ base_url: request_options[:base_url],
870
+ method: "POST",
871
+ path: "v1/catalog/items/units/delete",
872
+ body: Nordlet::Catalog::Types::ItemsUnitsDeleteCatalogRequest.new(params).to_h,
873
+ request_options: request_options
874
+ )
875
+ begin
876
+ response = @client.send(request)
877
+ rescue Net::HTTPRequestTimeout
878
+ raise Nordlet::Errors::TimeoutError
879
+ end
880
+ code = response.code.to_i
881
+ if code.between?(200, 299)
882
+ Nordlet::Catalog::Types::ItemsUnitsDeleteCatalogResponse.load(response.body)
883
+ else
884
+ error_class = Nordlet::Errors::ResponseError.subclass_for_code(code)
885
+ raise error_class.new(response.body, code: code)
886
+ end
887
+ end
888
+
889
+ # List the alternative units of an item, ordered by unit code.
890
+ #
891
+ # @param request_options [Hash]
892
+ # @param params [Nordlet::Catalog::Types::ItemsUnitsListCatalogRequest]
893
+ # @option request_options [String] :base_url
894
+ # @option request_options [Hash{String => Object}] :additional_headers
895
+ # @option request_options [Hash{String => Object}] :additional_query_parameters
896
+ # @option request_options [Hash{String => Object}] :additional_body_parameters
897
+ # @option request_options [Integer] :timeout_in_seconds
898
+ #
899
+ # @return [Nordlet::Catalog::Types::ItemsUnitsListCatalogResponse]
900
+ def items_units_list(request_options: {}, **params)
901
+ params = Nordlet::Internal::Types::Utils.normalize_keys(params)
902
+ request = Nordlet::Internal::JSON::Request.new(
903
+ base_url: request_options[:base_url],
904
+ method: "POST",
905
+ path: "v1/catalog/items/units/list",
906
+ body: Nordlet::Catalog::Types::ItemsUnitsListCatalogRequest.new(params).to_h,
907
+ request_options: request_options
908
+ )
909
+ begin
910
+ response = @client.send(request)
911
+ rescue Net::HTTPRequestTimeout
912
+ raise Nordlet::Errors::TimeoutError
913
+ end
914
+ code = response.code.to_i
915
+ if code.between?(200, 299)
916
+ Nordlet::Catalog::Types::ItemsUnitsListCatalogResponse.load(response.body)
917
+ else
918
+ error_class = Nordlet::Errors::ResponseError.subclass_for_code(code)
919
+ raise error_class.new(response.body, code: code)
920
+ end
921
+ end
922
+
780
923
  # Create a price list (currency EUR and active when omitted). 409 when the code already exists.
781
924
  #
782
925
  # @param request_options [Hash]
@@ -48,6 +48,8 @@ module Nordlet
48
48
 
49
49
  field :components, -> { Internal::Types::Array[Nordlet::Catalog::Types::ItemsCreateCatalogResponseComponentsItem] }, optional: false, nullable: false
50
50
 
51
+ field :alternative_units, -> { Internal::Types::Array[Nordlet::Catalog::Types::ItemsCreateCatalogResponseAlternativeUnitsItem] }, optional: false, nullable: false, api_name: "alternativeUnits"
52
+
51
53
  field :kind_id, -> { String }, optional: false, nullable: true, api_name: "kindId"
52
54
 
53
55
  field :sale_account_code, -> { String }, optional: false, nullable: true, api_name: "saleAccountCode"
@@ -0,0 +1,21 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Nordlet
4
+ module Catalog
5
+ module Types
6
+ class ItemsCreateCatalogResponseAlternativeUnitsItem < Internal::Types::Model
7
+ field :unit_code, -> { String }, optional: false, nullable: false, api_name: "unitCode"
8
+
9
+ field :factor, -> { String }, optional: false, nullable: false
10
+
11
+ field :is_default_sale, -> { Internal::Types::Boolean }, optional: false, nullable: false, api_name: "isDefaultSale"
12
+
13
+ field :is_default_purchase, -> { Internal::Types::Boolean }, optional: false, nullable: false, api_name: "isDefaultPurchase"
14
+
15
+ field :sale_price_excl_vat, -> { String }, optional: false, nullable: true, api_name: "salePriceExclVat"
16
+
17
+ field :purchase_price_excl_vat, -> { String }, optional: false, nullable: true, api_name: "purchasePriceExclVat"
18
+ end
19
+ end
20
+ end
21
+ end
@@ -48,6 +48,8 @@ module Nordlet
48
48
 
49
49
  field :components, -> { Internal::Types::Array[Nordlet::Catalog::Types::ItemsGetCatalogResponseComponentsItem] }, optional: false, nullable: false
50
50
 
51
+ field :alternative_units, -> { Internal::Types::Array[Nordlet::Catalog::Types::ItemsGetCatalogResponseAlternativeUnitsItem] }, optional: false, nullable: false, api_name: "alternativeUnits"
52
+
51
53
  field :kind_id, -> { String }, optional: false, nullable: true, api_name: "kindId"
52
54
 
53
55
  field :sale_account_code, -> { String }, optional: false, nullable: true, api_name: "saleAccountCode"
@@ -0,0 +1,21 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Nordlet
4
+ module Catalog
5
+ module Types
6
+ class ItemsGetCatalogResponseAlternativeUnitsItem < Internal::Types::Model
7
+ field :unit_code, -> { String }, optional: false, nullable: false, api_name: "unitCode"
8
+
9
+ field :factor, -> { String }, optional: false, nullable: false
10
+
11
+ field :is_default_sale, -> { Internal::Types::Boolean }, optional: false, nullable: false, api_name: "isDefaultSale"
12
+
13
+ field :is_default_purchase, -> { Internal::Types::Boolean }, optional: false, nullable: false, api_name: "isDefaultPurchase"
14
+
15
+ field :sale_price_excl_vat, -> { String }, optional: false, nullable: true, api_name: "salePriceExclVat"
16
+
17
+ field :purchase_price_excl_vat, -> { String }, optional: false, nullable: true, api_name: "purchasePriceExclVat"
18
+ end
19
+ end
20
+ end
21
+ end
@@ -48,6 +48,8 @@ module Nordlet
48
48
 
49
49
  field :components, -> { Internal::Types::Array[Nordlet::Catalog::Types::ItemsListCatalogResponseRowsItemComponentsItem] }, optional: false, nullable: false
50
50
 
51
+ field :alternative_units, -> { Internal::Types::Array[Nordlet::Catalog::Types::ItemsListCatalogResponseRowsItemAlternativeUnitsItem] }, optional: false, nullable: false, api_name: "alternativeUnits"
52
+
51
53
  field :kind_id, -> { String }, optional: false, nullable: true, api_name: "kindId"
52
54
 
53
55
  field :sale_account_code, -> { String }, optional: false, nullable: true, api_name: "saleAccountCode"
@@ -0,0 +1,21 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Nordlet
4
+ module Catalog
5
+ module Types
6
+ class ItemsListCatalogResponseRowsItemAlternativeUnitsItem < Internal::Types::Model
7
+ field :unit_code, -> { String }, optional: false, nullable: false, api_name: "unitCode"
8
+
9
+ field :factor, -> { String }, optional: false, nullable: false
10
+
11
+ field :is_default_sale, -> { Internal::Types::Boolean }, optional: false, nullable: false, api_name: "isDefaultSale"
12
+
13
+ field :is_default_purchase, -> { Internal::Types::Boolean }, optional: false, nullable: false, api_name: "isDefaultPurchase"
14
+
15
+ field :sale_price_excl_vat, -> { String }, optional: false, nullable: true, api_name: "salePriceExclVat"
16
+
17
+ field :purchase_price_excl_vat, -> { String }, optional: false, nullable: true, api_name: "purchasePriceExclVat"
18
+ end
19
+ end
20
+ end
21
+ end
@@ -0,0 +1,21 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Nordlet
4
+ module Catalog
5
+ module Types
6
+ class ItemsUnitsCreateCatalogRequest < Internal::Types::Model
7
+ field :item_id, -> { String }, optional: false, nullable: false, api_name: "itemId"
8
+
9
+ field :unit_code, -> { String }, optional: false, nullable: false, api_name: "unitCode"
10
+
11
+ field :factor, -> { String }, optional: false, nullable: false
12
+
13
+ field :is_default_sale, -> { Internal::Types::Boolean }, optional: true, nullable: false, api_name: "isDefaultSale"
14
+
15
+ field :is_default_purchase, -> { Internal::Types::Boolean }, optional: true, nullable: false, api_name: "isDefaultPurchase"
16
+
17
+ field :barcode, -> { String }, optional: true, nullable: false
18
+ end
19
+ end
20
+ end
21
+ end
@@ -0,0 +1,27 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Nordlet
4
+ module Catalog
5
+ module Types
6
+ class ItemsUnitsCreateCatalogResponse < Internal::Types::Model
7
+ field :id, -> { String }, optional: false, nullable: false
8
+
9
+ field :item_id, -> { String }, optional: false, nullable: false, api_name: "itemId"
10
+
11
+ field :unit_code, -> { String }, optional: false, nullable: false, api_name: "unitCode"
12
+
13
+ field :factor, -> { String }, optional: false, nullable: false
14
+
15
+ field :is_default_sale, -> { Internal::Types::Boolean }, optional: false, nullable: false, api_name: "isDefaultSale"
16
+
17
+ field :is_default_purchase, -> { Internal::Types::Boolean }, optional: false, nullable: false, api_name: "isDefaultPurchase"
18
+
19
+ field :barcode, -> { String }, optional: false, nullable: true
20
+
21
+ field :created_at, -> { String }, optional: false, nullable: false, api_name: "createdAt"
22
+
23
+ field :updated_at, -> { String }, optional: false, nullable: false, api_name: "updatedAt"
24
+ end
25
+ end
26
+ end
27
+ end
@@ -0,0 +1,11 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Nordlet
4
+ module Catalog
5
+ module Types
6
+ class ItemsUnitsDeleteCatalogRequest < Internal::Types::Model
7
+ field :id, -> { String }, optional: false, nullable: false
8
+ end
9
+ end
10
+ end
11
+ end
@@ -0,0 +1,11 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Nordlet
4
+ module Catalog
5
+ module Types
6
+ class ItemsUnitsDeleteCatalogResponse < Internal::Types::Model
7
+ field :id, -> { String }, optional: false, nullable: false
8
+ end
9
+ end
10
+ end
11
+ end
@@ -0,0 +1,11 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Nordlet
4
+ module Catalog
5
+ module Types
6
+ class ItemsUnitsListCatalogRequest < Internal::Types::Model
7
+ field :item_id, -> { String }, optional: false, nullable: false, api_name: "itemId"
8
+ end
9
+ end
10
+ end
11
+ end
@@ -0,0 +1,11 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Nordlet
4
+ module Catalog
5
+ module Types
6
+ class ItemsUnitsListCatalogResponse < Internal::Types::Model
7
+ field :rows, -> { Internal::Types::Array[Nordlet::Catalog::Types::ItemsUnitsListCatalogResponseRowsItem] }, optional: false, nullable: false
8
+ end
9
+ end
10
+ end
11
+ end