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.
- checksums.yaml +4 -4
- data/lib/nordlet/bank/client.rb +19 -16
- data/lib/nordlet/billing/client.rb +3 -1
- data/lib/nordlet/calendar/types/create_calendar_response_submission.rb +2 -0
- data/lib/nordlet/calendar/types/create_calendar_response_submissions_item.rb +2 -0
- data/lib/nordlet/calendar/types/get_calendar_response_submission.rb +2 -0
- data/lib/nordlet/calendar/types/get_calendar_response_submissions_item.rb +2 -0
- data/lib/nordlet/calendar/types/list_calendar_response_rows_item_submission.rb +2 -0
- data/lib/nordlet/calendar/types/list_calendar_response_rows_item_submissions_item.rb +2 -0
- data/lib/nordlet/calendar/types/submit_calendar_response.rb +2 -0
- data/lib/nordlet/calendar/types/update_calendar_response_submission.rb +2 -0
- data/lib/nordlet/calendar/types/update_calendar_response_submissions_item.rb +2 -0
- data/lib/nordlet/capture/types/documents_confirm_capture_request_lines_item.rb +4 -0
- data/lib/nordlet/capture/types/documents_confirm_capture_request_opposite_lines_item.rb +4 -0
- data/lib/nordlet/capture/types/documents_confirm_capture_response_invoice_lines_item.rb +8 -0
- data/lib/nordlet/capture/types/documents_confirm_capture_response_opposite_invoice_lines_item.rb +8 -0
- data/lib/nordlet/cash/client.rb +7 -6
- data/lib/nordlet/catalog/client.rb +145 -2
- data/lib/nordlet/catalog/types/items_create_catalog_response.rb +2 -0
- data/lib/nordlet/catalog/types/items_create_catalog_response_alternative_units_item.rb +21 -0
- data/lib/nordlet/catalog/types/items_get_catalog_response.rb +2 -0
- data/lib/nordlet/catalog/types/items_get_catalog_response_alternative_units_item.rb +21 -0
- data/lib/nordlet/catalog/types/items_list_catalog_response_rows_item.rb +2 -0
- data/lib/nordlet/catalog/types/items_list_catalog_response_rows_item_alternative_units_item.rb +21 -0
- data/lib/nordlet/catalog/types/items_units_create_catalog_request.rb +21 -0
- data/lib/nordlet/catalog/types/items_units_create_catalog_response.rb +27 -0
- data/lib/nordlet/catalog/types/items_units_delete_catalog_request.rb +11 -0
- data/lib/nordlet/catalog/types/items_units_delete_catalog_response.rb +11 -0
- data/lib/nordlet/catalog/types/items_units_list_catalog_request.rb +11 -0
- data/lib/nordlet/catalog/types/items_units_list_catalog_response.rb +11 -0
- data/lib/nordlet/catalog/types/items_units_list_catalog_response_rows_item.rb +27 -0
- data/lib/nordlet/catalog/types/items_units_update_catalog_request.rb +19 -0
- data/lib/nordlet/catalog/types/items_units_update_catalog_response.rb +27 -0
- data/lib/nordlet/catalog/types/items_update_catalog_response.rb +2 -0
- data/lib/nordlet/catalog/types/items_update_catalog_response_alternative_units_item.rb +21 -0
- data/lib/nordlet/catalog/types/units_create_catalog_request.rb +2 -0
- data/lib/nordlet/catalog/types/units_create_catalog_response.rb +2 -0
- data/lib/nordlet/catalog/types/units_list_catalog_response_rows_item.rb +2 -0
- data/lib/nordlet/catalog/types/units_update_catalog_request.rb +2 -0
- data/lib/nordlet/catalog/types/units_update_catalog_response.rb +2 -0
- data/lib/nordlet/declarations/client.rb +46 -5
- data/lib/nordlet/declarations/types/lt_ivaz_amend_declarations_request.rb +2 -0
- data/lib/nordlet/declarations/types/lt_ivaz_amend_declarations_request_corrections_item.rb +25 -0
- data/lib/nordlet/declarations/types/lt_ivaz_amend_declarations_request_corrections_item_lines_item.rb +13 -0
- data/lib/nordlet/declarations/types/submissions_confirm_declarations_request.rb +11 -0
- data/lib/nordlet/declarations/types/submissions_confirm_declarations_response.rb +71 -0
- data/lib/nordlet/declarations/types/submissions_confirm_declarations_response_environment.rb +14 -0
- data/lib/nordlet/declarations/types/submissions_confirm_declarations_response_status.rb +16 -0
- data/lib/nordlet/declarations/types/submissions_create_declarations_response.rb +2 -0
- data/lib/nordlet/declarations/types/submissions_list_declarations_response_rows_item.rb +2 -0
- data/lib/nordlet/declarations/types/submissions_mark_declarations_response.rb +2 -0
- data/lib/nordlet/declarations/types/submissions_retry_declarations_response.rb +2 -0
- data/lib/nordlet/ecommerce/client.rb +12 -9
- data/lib/nordlet/fleet/client.rb +8 -4
- data/lib/nordlet/fleet/types/vehicles_create_fleet_request.rb +2 -0
- data/lib/nordlet/fleet/types/vehicles_create_fleet_response.rb +2 -0
- data/lib/nordlet/fleet/types/vehicles_get_fleet_response.rb +2 -0
- data/lib/nordlet/fleet/types/vehicles_list_fleet_response_rows_item.rb +2 -0
- data/lib/nordlet/fleet/types/vehicles_update_fleet_request.rb +2 -0
- data/lib/nordlet/fleet/types/vehicles_update_fleet_response.rb +2 -0
- data/lib/nordlet/inventory/client.rb +28 -23
- data/lib/nordlet/ledger/types/posting_rules_update_ledger_request_rules_item_key.rb +2 -0
- data/lib/nordlet/payroll/client.rb +16 -12
- data/lib/nordlet/pos/client.rb +126 -9
- data/lib/nordlet/pos/types/refunds_create_pos_request.rb +17 -0
- data/lib/nordlet/pos/types/refunds_create_pos_request_lines_item.rb +13 -0
- data/lib/nordlet/pos/types/refunds_create_pos_response.rb +33 -0
- data/lib/nordlet/pos/types/refunds_create_pos_response_lines_item.rb +23 -0
- data/lib/nordlet/pos/types/refunds_get_pos_request.rb +11 -0
- data/lib/nordlet/pos/types/refunds_get_pos_response.rb +33 -0
- data/lib/nordlet/pos/types/refunds_get_pos_response_lines_item.rb +23 -0
- data/lib/nordlet/pos/types/refunds_list_pos_request.rb +19 -0
- data/lib/nordlet/pos/types/refunds_list_pos_request_filter_item.rb +15 -0
- data/lib/nordlet/pos/types/refunds_list_pos_request_filter_item_op.rb +18 -0
- data/lib/nordlet/pos/types/refunds_list_pos_request_filter_item_value.rb +19 -0
- data/lib/nordlet/pos/types/refunds_list_pos_request_filter_item_value_three_item.rb +15 -0
- data/lib/nordlet/pos/types/refunds_list_pos_request_sort_item.rb +13 -0
- data/lib/nordlet/pos/types/refunds_list_pos_request_sort_item_dir.rb +14 -0
- data/lib/nordlet/pos/types/refunds_list_pos_response.rb +21 -0
- data/lib/nordlet/pos/types/refunds_list_pos_response_rows_item.rb +31 -0
- data/lib/nordlet/production/client.rb +20 -14
- data/lib/nordlet/production/types/maintenance_cancel_production_response.rb +2 -0
- data/lib/nordlet/production/types/maintenance_complete_production_request.rb +2 -0
- data/lib/nordlet/production/types/maintenance_complete_production_response.rb +2 -0
- data/lib/nordlet/production/types/maintenance_create_production_request.rb +2 -0
- data/lib/nordlet/production/types/maintenance_create_production_response.rb +2 -0
- data/lib/nordlet/production/types/maintenance_list_production_response_rows_item.rb +2 -0
- data/lib/nordlet/public/client.rb +6 -5
- data/lib/nordlet/public/types/invoices_get_public_response.rb +2 -0
- data/lib/nordlet/purchases/client.rb +12 -9
- data/lib/nordlet/purchases/types/invoices_create_purchases_request_lines_item.rb +4 -0
- data/lib/nordlet/purchases/types/invoices_create_purchases_response_lines_item.rb +8 -0
- data/lib/nordlet/purchases/types/invoices_get_purchases_response_lines_item.rb +8 -0
- data/lib/nordlet/purchases/types/invoices_register_purchases_response_lines_item.rb +8 -0
- data/lib/nordlet/purchases/types/invoices_update_purchases_request_lines_item.rb +4 -0
- data/lib/nordlet/purchases/types/invoices_update_purchases_response_lines_item.rb +8 -0
- data/lib/nordlet/purchases/types/orders_approve_purchases_response_lines_item.rb +4 -0
- data/lib/nordlet/purchases/types/orders_cancel_purchases_response_lines_item.rb +4 -0
- data/lib/nordlet/purchases/types/orders_close_purchases_response_lines_item.rb +4 -0
- data/lib/nordlet/purchases/types/orders_create_purchases_request_lines_item.rb +4 -0
- data/lib/nordlet/purchases/types/orders_create_purchases_response_lines_item.rb +4 -0
- data/lib/nordlet/purchases/types/orders_get_purchases_response_lines_item.rb +4 -0
- data/lib/nordlet/purchases/types/orders_reject_purchases_response_lines_item.rb +4 -0
- data/lib/nordlet/purchases/types/orders_submit_purchases_response_lines_item.rb +4 -0
- data/lib/nordlet/purchases/types/orders_update_purchases_request_lines_item.rb +4 -0
- data/lib/nordlet/purchases/types/orders_update_purchases_response_lines_item.rb +4 -0
- data/lib/nordlet/reports/client.rb +3 -3
- data/lib/nordlet/sales/client.rb +26 -19
- data/lib/nordlet/sales/types/acts_create_sales_response_lines_item.rb +4 -0
- data/lib/nordlet/sales/types/acts_get_sales_response_lines_item.rb +4 -0
- data/lib/nordlet/sales/types/acts_issue_sales_response_lines_item.rb +4 -0
- data/lib/nordlet/sales/types/acts_update_sales_response_lines_item.rb +4 -0
- data/lib/nordlet/sales/types/invoices_apply_advance_sales_response_lines_item.rb +4 -0
- data/lib/nordlet/sales/types/invoices_create_sales_response_lines_item.rb +4 -0
- data/lib/nordlet/sales/types/invoices_get_sales_response_lines_item.rb +4 -0
- data/lib/nordlet/sales/types/invoices_issue_sales_response_lines_item.rb +4 -0
- data/lib/nordlet/sales/types/invoices_list_sales_response_rows_item.rb +2 -0
- data/lib/nordlet/sales/types/invoices_lock_sales_response_lines_item.rb +4 -0
- data/lib/nordlet/sales/types/invoices_unlock_sales_response_lines_item.rb +4 -0
- data/lib/nordlet/sales/types/invoices_update_sales_response_lines_item.rb +4 -0
- data/lib/nordlet/sales/types/invoices_view_sales_response.rb +2 -0
- data/lib/nordlet/transport/types/waybills_create_transport_response_lines_item.rb +4 -0
- data/lib/nordlet/transport/types/waybills_get_transport_response_lines_item.rb +4 -0
- data/lib/nordlet/transport/types/waybills_issue_transport_response_lines_item.rb +4 -0
- data/lib/nordlet/transport/types/waybills_update_transport_response_lines_item.rb +4 -0
- data/lib/nordlet/version.rb +1 -1
- data/lib/nordlet.rb +35 -0
- data/reference.md +728 -37
- 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
|
|
344
|
-
#
|
|
345
|
-
#
|
|
346
|
-
#
|
|
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,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
|
|
159
|
-
#
|
|
160
|
-
#
|
|
161
|
-
# a
|
|
162
|
-
# `
|
|
163
|
-
#
|
|
164
|
-
#
|
|
165
|
-
#
|
|
166
|
-
#
|
|
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]
|
data/lib/nordlet/fleet/client.rb
CHANGED
|
@@ -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
|
|
49
|
-
# value. A plate number already used by another
|
|
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
|
|
261
|
-
#
|
|
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
|