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
@@ -0,0 +1,27 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Nordlet
4
+ module Catalog
5
+ module Types
6
+ class ItemsUnitsListCatalogResponseRowsItem < 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,19 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Nordlet
4
+ module Catalog
5
+ module Types
6
+ class ItemsUnitsUpdateCatalogRequest < Internal::Types::Model
7
+ field :id, -> { String }, optional: false, nullable: false
8
+
9
+ field :factor, -> { String }, optional: true, nullable: false
10
+
11
+ field :is_default_sale, -> { Internal::Types::Boolean }, optional: true, nullable: false, api_name: "isDefaultSale"
12
+
13
+ field :is_default_purchase, -> { Internal::Types::Boolean }, optional: true, nullable: false, api_name: "isDefaultPurchase"
14
+
15
+ field :barcode, -> { String }, optional: true, nullable: false
16
+ end
17
+ end
18
+ end
19
+ end
@@ -0,0 +1,27 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Nordlet
4
+ module Catalog
5
+ module Types
6
+ class ItemsUnitsUpdateCatalogResponse < 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
@@ -48,6 +48,8 @@ module Nordlet
48
48
 
49
49
  field :components, -> { Internal::Types::Array[Nordlet::Catalog::Types::ItemsUpdateCatalogResponseComponentsItem] }, optional: false, nullable: false
50
50
 
51
+ field :alternative_units, -> { Internal::Types::Array[Nordlet::Catalog::Types::ItemsUpdateCatalogResponseAlternativeUnitsItem] }, 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 ItemsUpdateCatalogResponseAlternativeUnitsItem < 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
@@ -8,6 +8,8 @@ module Nordlet
8
8
 
9
9
  field :name, -> { String }, optional: false, nullable: false
10
10
 
11
+ field :rec20code, -> { String }, optional: true, nullable: false, api_name: "rec20Code"
12
+
11
13
  field :is_active, -> { Internal::Types::Boolean }, optional: true, nullable: false, api_name: "isActive"
12
14
  end
13
15
  end
@@ -10,6 +10,8 @@ module Nordlet
10
10
 
11
11
  field :name, -> { String }, optional: false, nullable: false
12
12
 
13
+ field :rec20code, -> { String }, optional: false, nullable: true, api_name: "rec20Code"
14
+
13
15
  field :is_active, -> { Internal::Types::Boolean }, optional: false, nullable: false, api_name: "isActive"
14
16
 
15
17
  field :created_at, -> { String }, optional: false, nullable: false, api_name: "createdAt"
@@ -10,6 +10,8 @@ module Nordlet
10
10
 
11
11
  field :name, -> { String }, optional: false, nullable: false
12
12
 
13
+ field :rec20code, -> { String }, optional: false, nullable: true, api_name: "rec20Code"
14
+
13
15
  field :is_active, -> { Internal::Types::Boolean }, optional: false, nullable: false, api_name: "isActive"
14
16
 
15
17
  field :created_at, -> { String }, optional: false, nullable: false, api_name: "createdAt"
@@ -10,6 +10,8 @@ module Nordlet
10
10
 
11
11
  field :name, -> { String }, optional: true, nullable: false
12
12
 
13
+ field :rec20code, -> { String }, optional: true, nullable: false, api_name: "rec20Code"
14
+
13
15
  field :is_active, -> { Internal::Types::Boolean }, optional: true, nullable: false, api_name: "isActive"
14
16
  end
15
17
  end
@@ -10,6 +10,8 @@ module Nordlet
10
10
 
11
11
  field :name, -> { String }, optional: false, nullable: false
12
12
 
13
+ field :rec20code, -> { String }, optional: false, nullable: true, api_name: "rec20Code"
14
+
13
15
  field :is_active, -> { Internal::Types::Boolean }, optional: false, nullable: false, api_name: "isActive"
14
16
 
15
17
  field :created_at, -> { String }, optional: false, nullable: false, api_name: "createdAt"
@@ -340,10 +340,14 @@ module Nordlet
340
340
  end
341
341
  end
342
342
 
343
- # Builds an i.VAZ amendment message for up to 100 issued waybills, carrying their current data as
344
- # TransportDocumentAmendment elements. Answers 422 when the registration code of the company is not numeric or
345
- # when a waybill is not issued. With `persist`, the file is stored and a submission for `lt-ivaz-amendment` is
346
- # created.
343
+ # Builds an i.VAZ amendment message for up to 100 issued waybills as TransportDocumentAmendment elements.
344
+ # `corrections` carries corrected values per waybill: `consigneePartnerId`, `unloadAddress`, `vehiclePlate`,
345
+ # `trailerPlate`, `driverName`, `driverSurname` (the last three can be cleared with null) and line `quantity` by
346
+ # line id; the message carries the waybill with them applied, and with `persist` they are also stored on the
347
+ # waybill. Answers 422 when the registration code of the company is not numeric, when a waybill is not issued, or
348
+ # when a correction names a waybill not in `waybillIds`, a waybill twice, a line not on its waybill or a consignee
349
+ # partner the company does not have. With `persist`, the file is stored and a submission for `lt-ivaz-amendment`
350
+ # is created.
347
351
  #
348
352
  # @param request_options [Hash]
349
353
  # @param params [Nordlet::Declarations::Types::LtIvazAmendDeclarationsRequest]
@@ -2734,7 +2738,7 @@ module Nordlet
2734
2738
  # Generate CIT-8(34), the annual corporate income tax return, from the ledger of the year and the recorded tax
2735
2739
  # adjustments. The tax office code and the small-taxpayer setting come from the e-Deklaracje compliance settings,
2736
2740
  # the seat address from the JPK gateway settings. Names the annexes the figures would need, which are not
2737
- # produced.
2741
+ # produced. Answers 422 for a tax year that starts before 2025-01-01, which the CIT-8(34) schema does not accept.
2738
2742
  #
2739
2743
  # @param request_options [Hash]
2740
2744
  # @param params [Nordlet::Declarations::Types::PlCit8GenerateDeclarationsRequest]
@@ -3346,6 +3350,43 @@ module Nordlet
3346
3350
  end
3347
3351
  end
3348
3352
 
3353
+ # Sends a submission whose `confirmationPending` is true once more with the stored file and the token the
3354
+ # administration handed back with its warnings (the advis of Erhvervsstyrelsen's Regnskab Indberet, which files
3355
+ # the annual report only when it is sent again with that token), and returns the updated submission. Answers 409
3356
+ # when the submission is not waiting for a confirmation.
3357
+ #
3358
+ # @param request_options [Hash]
3359
+ # @param params [Nordlet::Declarations::Types::SubmissionsConfirmDeclarationsRequest]
3360
+ # @option request_options [String] :base_url
3361
+ # @option request_options [Hash{String => Object}] :additional_headers
3362
+ # @option request_options [Hash{String => Object}] :additional_query_parameters
3363
+ # @option request_options [Hash{String => Object}] :additional_body_parameters
3364
+ # @option request_options [Integer] :timeout_in_seconds
3365
+ #
3366
+ # @return [Nordlet::Declarations::Types::SubmissionsConfirmDeclarationsResponse]
3367
+ def submissions_confirm(request_options: {}, **params)
3368
+ params = Nordlet::Internal::Types::Utils.normalize_keys(params)
3369
+ request = Nordlet::Internal::JSON::Request.new(
3370
+ base_url: request_options[:base_url],
3371
+ method: "POST",
3372
+ path: "v1/declarations/submissions/confirm",
3373
+ body: Nordlet::Declarations::Types::SubmissionsConfirmDeclarationsRequest.new(params).to_h,
3374
+ request_options: request_options
3375
+ )
3376
+ begin
3377
+ response = @client.send(request)
3378
+ rescue Net::HTTPRequestTimeout
3379
+ raise Nordlet::Errors::TimeoutError
3380
+ end
3381
+ code = response.code.to_i
3382
+ if code.between?(200, 299)
3383
+ Nordlet::Declarations::Types::SubmissionsConfirmDeclarationsResponse.load(response.body)
3384
+ else
3385
+ error_class = Nordlet::Errors::ResponseError.subclass_for_code(code)
3386
+ raise error_class.new(response.body, code: code)
3387
+ end
3388
+ end
3389
+
3349
3390
  # Builds the Lithuanian i.SAF register file of a month (`dataType` F both registers, S sale invoices only, P
3350
3391
  # purchase invoices only), stores it and creates a submission in status `generated` for the obligation `lt-isaf`,
3351
3392
  # the only obligation accepted. The XML alone comes from `declarations/lt/isaf/generate`; the submission is moved
@@ -7,6 +7,8 @@ module Nordlet
7
7
  field :waybill_ids, -> { Internal::Types::Array[String] }, optional: false, nullable: false, api_name: "waybillIds"
8
8
 
9
9
  field :persist, -> { Internal::Types::Boolean }, optional: true, nullable: false
10
+
11
+ field :corrections, -> { Internal::Types::Array[Nordlet::Declarations::Types::LtIvazAmendDeclarationsRequestCorrectionsItem] }, optional: true, nullable: false
10
12
  end
11
13
  end
12
14
  end
@@ -0,0 +1,25 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Nordlet
4
+ module Declarations
5
+ module Types
6
+ class LtIvazAmendDeclarationsRequestCorrectionsItem < Internal::Types::Model
7
+ field :waybill_id, -> { String }, optional: false, nullable: false, api_name: "waybillId"
8
+
9
+ field :consignee_partner_id, -> { String }, optional: true, nullable: false, api_name: "consigneePartnerId"
10
+
11
+ field :unload_address, -> { String }, optional: true, nullable: false, api_name: "unloadAddress"
12
+
13
+ field :vehicle_plate, -> { String }, optional: true, nullable: false, api_name: "vehiclePlate"
14
+
15
+ field :trailer_plate, -> { String }, optional: true, nullable: false, api_name: "trailerPlate"
16
+
17
+ field :driver_name, -> { String }, optional: true, nullable: false, api_name: "driverName"
18
+
19
+ field :driver_surname, -> { String }, optional: true, nullable: false, api_name: "driverSurname"
20
+
21
+ field :lines, -> { Internal::Types::Array[Nordlet::Declarations::Types::LtIvazAmendDeclarationsRequestCorrectionsItemLinesItem] }, optional: true, nullable: false
22
+ end
23
+ end
24
+ end
25
+ end
@@ -0,0 +1,13 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Nordlet
4
+ module Declarations
5
+ module Types
6
+ class LtIvazAmendDeclarationsRequestCorrectionsItemLinesItem < Internal::Types::Model
7
+ field :id, -> { String }, optional: false, nullable: false
8
+
9
+ field :quantity, -> { String }, optional: false, nullable: false
10
+ end
11
+ end
12
+ end
13
+ end
@@ -0,0 +1,11 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Nordlet
4
+ module Declarations
5
+ module Types
6
+ class SubmissionsConfirmDeclarationsRequest < Internal::Types::Model
7
+ field :id, -> { String }, optional: false, nullable: false
8
+ end
9
+ end
10
+ end
11
+ end
@@ -0,0 +1,71 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Nordlet
4
+ module Declarations
5
+ module Types
6
+ class SubmissionsConfirmDeclarationsResponse < Internal::Types::Model
7
+ field :id, -> { String }, optional: false, nullable: false
8
+
9
+ field :obligation, -> { String }, optional: false, nullable: false
10
+
11
+ field :period_year, -> { Integer }, optional: false, nullable: false, api_name: "periodYear"
12
+
13
+ field :period_month, -> { Integer }, optional: false, nullable: true, api_name: "periodMonth"
14
+
15
+ field :variant, -> { String }, optional: false, nullable: true
16
+
17
+ field :status, -> { Nordlet::Declarations::Types::SubmissionsConfirmDeclarationsResponseStatus }, optional: false, nullable: false
18
+
19
+ field :file_name, -> { String }, optional: false, nullable: false, api_name: "fileName"
20
+
21
+ field :file_id, -> { String }, optional: false, nullable: true, api_name: "fileId"
22
+
23
+ field :external_ref, -> { String }, optional: false, nullable: true, api_name: "externalRef"
24
+
25
+ field :message, -> { String }, optional: false, nullable: true
26
+
27
+ field :rule_key, -> { String }, optional: false, nullable: true, api_name: "ruleKey"
28
+
29
+ field :period, -> { String }, optional: false, nullable: true
30
+
31
+ field :document_key, -> { String }, optional: false, nullable: true, api_name: "documentKey"
32
+
33
+ field :amendment, -> { Integer }, optional: false, nullable: false
34
+
35
+ field :origin, -> { String }, optional: false, nullable: false
36
+
37
+ field :transport_system, -> { String }, optional: false, nullable: true, api_name: "transportSystem"
38
+
39
+ field :environment, -> { Nordlet::Declarations::Types::SubmissionsConfirmDeclarationsResponseEnvironment }, optional: false, nullable: true
40
+
41
+ field :submitted_at, -> { String }, optional: false, nullable: true, api_name: "submittedAt"
42
+
43
+ field :accepted_at, -> { String }, optional: false, nullable: true, api_name: "acceptedAt"
44
+
45
+ field :rejected_at, -> { String }, optional: false, nullable: true, api_name: "rejectedAt"
46
+
47
+ field :checked_at, -> { String }, optional: false, nullable: true, api_name: "checkedAt"
48
+
49
+ field :next_check_at, -> { String }, optional: false, nullable: true, api_name: "nextCheckAt"
50
+
51
+ field :attempts, -> { Integer }, optional: false, nullable: false
52
+
53
+ field :delivery_error, -> { String }, optional: false, nullable: true, api_name: "deliveryError"
54
+
55
+ field :confirmation_pending, -> { Internal::Types::Boolean }, optional: false, nullable: false, api_name: "confirmationPending"
56
+
57
+ field :sent_sha256, -> { String }, optional: false, nullable: true, api_name: "sentSha256"
58
+
59
+ field :certificate_fingerprint, -> { String }, optional: false, nullable: true, api_name: "certificateFingerprint"
60
+
61
+ field :submitted_by_actor_type, -> { String }, optional: false, nullable: true, api_name: "submittedByActorType"
62
+
63
+ field :submitted_by_actor_id, -> { String }, optional: false, nullable: true, api_name: "submittedByActorId"
64
+
65
+ field :created_at, -> { String }, optional: false, nullable: false, api_name: "createdAt"
66
+
67
+ field :updated_at, -> { String }, optional: false, nullable: false, api_name: "updatedAt"
68
+ end
69
+ end
70
+ end
71
+ end
@@ -0,0 +1,14 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Nordlet
4
+ module Declarations
5
+ module Types
6
+ module SubmissionsConfirmDeclarationsResponseEnvironment
7
+ extend Nordlet::Internal::Types::Enum
8
+
9
+ TEST = "test"
10
+ PRODUCTION = "production"
11
+ end
12
+ end
13
+ end
14
+ end
@@ -0,0 +1,16 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Nordlet
4
+ module Declarations
5
+ module Types
6
+ module SubmissionsConfirmDeclarationsResponseStatus
7
+ extend Nordlet::Internal::Types::Enum
8
+
9
+ GENERATED = "generated"
10
+ SUBMITTED = "submitted"
11
+ ACCEPTED = "accepted"
12
+ REJECTED = "rejected"
13
+ end
14
+ end
15
+ end
16
+ end
@@ -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"
@@ -155,15 +155,18 @@ module Nordlet
155
155
  end
156
156
  end
157
157
 
158
- # Fulfil a `new` or `reserved` order: its reservations are released, the stock lines are consumed FIFO from the
159
- # order's warehouse on `date` (default: the company's today), the cost of goods sold is posted as a journal entry
160
- # debiting `cogsAccountCode` and crediting the stock accounts of the consumed layers (`inventoryAccountCode` when
161
- # a layer has none), and a draft sale invoice for the order lines is created and linked as `invoiceId`, ready for
162
- # `sales/invoices/issue`. With a `shipToCountryCode` on the order the invoice's VAT scheme is resolved for goods
163
- # shipped there, as a marketplace sale when `marketplace` is set. Account codes default to the company's chart.
164
- # Refused with 422 when the stock lines have no warehouse or stock is insufficient (unless the company allows
165
- # negative stock), with 409 when the accounting period is locked or the order is already `fulfilled` or
166
- # `cancelled`. Emits `sales_order.fulfilled` and `stock.changed`.
158
+ # Fulfil a `new` or `reserved` order: its reservations are released, the stock lines are consumed from the order's
159
+ # warehouse on `date` (default: the company's today), the first-expiring lot first (lots without an expiry date
160
+ # after those with one, then the oldest layers first) and expired lots left out, the cost of goods sold is posted
161
+ # as a journal entry debiting `cogsAccountCode` and crediting the stock accounts of the consumed layers
162
+ # (`inventoryAccountCode` when a layer has none), and a draft sale invoice for the order lines is created and
163
+ # linked as `invoiceId`, ready for `sales/invoices/issue`. With a `shipToCountryCode` on the order the invoice's
164
+ # VAT scheme is resolved for goods shipped there, as a marketplace sale when `marketplace` is set. Account codes
165
+ # default to the posting rules `inventory.cogs` and `inventory.stock`. Refused with 422 when the stock lines have
166
+ # no warehouse, when stock is insufficient (unless the company allows negative stock), when the quantity on hand
167
+ # less the reservations of other orders does not cover the order (unless the company allows negative stock), with
168
+ # 409 when the accounting period is locked or the order is already `fulfilled` or `cancelled`. Emits
169
+ # `sales_order.fulfilled` and `stock.changed`.
167
170
  #
168
171
  # @param request_options [Hash]
169
172
  # @param params [Nordlet::Ecommerce::Types::OrdersFulfillEcommerceRequest]
@@ -12,6 +12,7 @@ module Nordlet
12
12
 
13
13
  # Register a vehicle. The plate number is stored in upper case and must be unique in the company (409 otherwise);
14
14
  # `fixedAssetId` must name an existing fixed asset. Uploaded `documents` are attached to the vehicle.
15
+ # `disposalDate`, the day the vehicle was sold or scrapped, is the last day of its car benefit in kind.
15
16
  #
16
17
  # @param request_options [Hash]
17
18
  # @param params [Nordlet::Fleet::Types::VehiclesCreateFleetRequest]
@@ -45,8 +46,9 @@ module Nordlet
45
46
  end
46
47
  end
47
48
 
48
- # Change a vehicle's details or set its `status` to `active`, `sold` or `scrapped`; omitted fields keep their
49
- # value. A plate number already used by another vehicle is refused with 409.
49
+ # Change a vehicle's details or set its `status` to `active`, `sold` or `scrapped` and its `disposalDate`, the
50
+ # last day of its car benefit in kind; omitted fields keep their value. A plate number already used by another
51
+ # vehicle is refused with 409.
50
52
  #
51
53
  # @param request_options [Hash]
52
54
  # @param params [Nordlet::Fleet::Types::VehiclesUpdateFleetRequest]
@@ -257,8 +259,10 @@ module Nordlet
257
259
 
258
260
  # Preview the car benefit in kind of a month for a Lithuanian company: every assignment with `privateUse` that
259
261
  # overlaps the month is valued at 0.75 % of the vehicle's market value when the employer pays the fuel, else 0.70
260
- # %, one row per employee and vehicle, with the total. A company registered in another country is refused with
261
- # 422. The same amounts are added to a payroll run created with `includeNatura` (`payroll/runs/create`).
262
+ # %, one row per employee and vehicle, with the total. A month the assignment starts or ends in, or the vehicle's
263
+ # `disposalDate` falls in, is valued by its calendar days with the car; after the `disposalDate` there is no
264
+ # benefit. A company registered in another country is refused with 422. The same amounts are added to a payroll
265
+ # run created with `includeNatura` (`payroll/runs/create`).
262
266
  #
263
267
  # @param request_options [Hash]
264
268
  # @param params [Nordlet::Fleet::Types::NaturaPreviewFleetRequest]
@@ -26,6 +26,8 @@ module Nordlet
26
26
 
27
27
  field :insurance_due, -> { String }, optional: true, nullable: false, api_name: "insuranceDue"
28
28
 
29
+ field :disposal_date, -> { String }, optional: true, nullable: false, api_name: "disposalDate"
30
+
29
31
  field :notes, -> { String }, optional: true, nullable: false
30
32
 
31
33
  field :documents, -> { Internal::Types::Array[Nordlet::Fleet::Types::VehiclesCreateFleetRequestDocumentsItem] }, optional: true, nullable: false
@@ -30,6 +30,8 @@ module Nordlet
30
30
 
31
31
  field :status, -> { Nordlet::Fleet::Types::VehiclesCreateFleetResponseStatus }, optional: false, nullable: false
32
32
 
33
+ field :disposal_date, -> { String }, optional: false, nullable: true, api_name: "disposalDate"
34
+
33
35
  field :notes, -> { String }, optional: false, nullable: true
34
36
 
35
37
  field :documents, -> { Internal::Types::Array[Nordlet::Fleet::Types::VehiclesCreateFleetResponseDocumentsItem] }, optional: false, nullable: true
@@ -30,6 +30,8 @@ module Nordlet
30
30
 
31
31
  field :status, -> { Nordlet::Fleet::Types::VehiclesGetFleetResponseStatus }, optional: false, nullable: false
32
32
 
33
+ field :disposal_date, -> { String }, optional: false, nullable: true, api_name: "disposalDate"
34
+
33
35
  field :notes, -> { String }, optional: false, nullable: true
34
36
 
35
37
  field :documents, -> { Internal::Types::Array[Nordlet::Fleet::Types::VehiclesGetFleetResponseDocumentsItem] }, optional: false, nullable: true
@@ -30,6 +30,8 @@ module Nordlet
30
30
 
31
31
  field :status, -> { Nordlet::Fleet::Types::VehiclesListFleetResponseRowsItemStatus }, optional: false, nullable: false
32
32
 
33
+ field :disposal_date, -> { String }, optional: false, nullable: true, api_name: "disposalDate"
34
+
33
35
  field :notes, -> { String }, optional: false, nullable: true
34
36
 
35
37
  field :documents, -> { Internal::Types::Array[Nordlet::Fleet::Types::VehiclesListFleetResponseRowsItemDocumentsItem] }, optional: false, nullable: true
@@ -30,6 +30,8 @@ module Nordlet
30
30
 
31
31
  field :status, -> { Nordlet::Fleet::Types::VehiclesUpdateFleetRequestStatus }, optional: true, nullable: false
32
32
 
33
+ field :disposal_date, -> { String }, optional: true, nullable: false, api_name: "disposalDate"
34
+
33
35
  field :notes, -> { String }, optional: true, nullable: false
34
36
  end
35
37
  end
@@ -30,6 +30,8 @@ module Nordlet
30
30
 
31
31
  field :status, -> { Nordlet::Fleet::Types::VehiclesUpdateFleetResponseStatus }, optional: false, nullable: false
32
32
 
33
+ field :disposal_date, -> { String }, optional: false, nullable: true, api_name: "disposalDate"
34
+
33
35
  field :notes, -> { String }, optional: false, nullable: true
34
36
 
35
37
  field :documents, -> { Internal::Types::Array[Nordlet::Fleet::Types::VehiclesUpdateFleetResponseDocumentsItem] }, optional: false, nullable: true