nordlet 0.6.9 → 0.6.11
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/account/client.rb +42 -0
- data/lib/nordlet/account/types/companies_context_account_request.rb +9 -0
- data/lib/nordlet/account/types/companies_context_account_response.rb +23 -0
- data/lib/nordlet/account/types/companies_context_account_response_bank_accounts_item.rb +23 -0
- data/lib/nordlet/account/types/companies_context_account_response_filings_item.rb +27 -0
- data/lib/nordlet/account/types/companies_context_account_response_filings_item_missing_settings.rb +17 -0
- data/lib/nordlet/account/types/companies_context_account_response_filings_item_missing_settings_operation.rb +13 -0
- data/lib/nordlet/account/types/companies_context_account_response_payroll.rb +15 -0
- data/lib/nordlet/account/types/companies_context_account_response_payroll_employee_fields_item.rb +17 -0
- data/lib/nordlet/account/types/companies_context_account_response_payroll_employee_fields_item_kind.rb +15 -0
- data/lib/nordlet/account/types/companies_context_account_response_periods.rb +13 -0
- data/lib/nordlet/account/types/companies_context_account_response_periods_locked_item.rb +13 -0
- data/lib/nordlet/account/types/companies_context_account_response_periods_open_item.rb +13 -0
- data/lib/nordlet/account/types/companies_context_account_response_profile.rb +95 -0
- data/lib/nordlet/account/types/companies_context_account_response_profile_accounts_kept_by.rb +14 -0
- data/lib/nordlet/account/types/companies_context_account_response_profile_address.rb +17 -0
- data/lib/nordlet/account/types/companies_context_account_response_profile_status.rb +15 -0
- data/lib/nordlet/account/types/companies_context_account_response_profile_vat_period.rb +17 -0
- data/lib/nordlet/account/types/companies_context_account_response_vat_types_used_item.rb +19 -0
- data/lib/nordlet/agreements/client.rb +3 -1
- data/lib/nordlet/assets/client.rb +9 -2
- data/lib/nordlet/assets/types/assets_create_assets_response.rb +2 -0
- data/lib/nordlet/assets/types/assets_dispose_assets_request.rb +2 -0
- data/lib/nordlet/assets/types/assets_dispose_assets_response.rb +2 -0
- data/lib/nordlet/assets/types/assets_get_assets_response.rb +2 -0
- data/lib/nordlet/assets/types/assets_input_vat_assets_response.rb +2 -0
- data/lib/nordlet/assets/types/assets_list_assets_response_rows_item.rb +2 -0
- data/lib/nordlet/assets/types/assets_modernize_assets_response.rb +2 -0
- data/lib/nordlet/assets/types/assets_update_assets_response.rb +2 -0
- data/lib/nordlet/audit/client.rb +3 -2
- data/lib/nordlet/bank/client.rb +40 -26
- data/lib/nordlet/bank/types/transactions_match_bank_request_document_type.rb +1 -0
- data/lib/nordlet/calendar/client.rb +6 -1
- data/lib/nordlet/calendar/types/create_calendar_response.rb +2 -0
- data/lib/nordlet/calendar/types/create_calendar_response_correction.rb +17 -0
- data/lib/nordlet/calendar/types/create_calendar_response_correction_optional_item.rb +16 -0
- data/lib/nordlet/calendar/types/create_calendar_response_correction_reason_codes_item.rb +13 -0
- data/lib/nordlet/calendar/types/create_calendar_response_correction_required_item.rb +16 -0
- data/lib/nordlet/calendar/types/create_calendar_response_submission.rb +4 -0
- data/lib/nordlet/calendar/types/create_calendar_response_submission_correction_input.rb +17 -0
- data/lib/nordlet/calendar/types/create_calendar_response_submissions_item.rb +4 -0
- data/lib/nordlet/calendar/types/create_calendar_response_submissions_item_correction_input.rb +17 -0
- data/lib/nordlet/calendar/types/get_calendar_response.rb +2 -0
- data/lib/nordlet/calendar/types/get_calendar_response_correction.rb +17 -0
- data/lib/nordlet/calendar/types/get_calendar_response_correction_optional_item.rb +16 -0
- data/lib/nordlet/calendar/types/get_calendar_response_correction_reason_codes_item.rb +13 -0
- data/lib/nordlet/calendar/types/get_calendar_response_correction_required_item.rb +16 -0
- data/lib/nordlet/calendar/types/get_calendar_response_submission.rb +4 -0
- data/lib/nordlet/calendar/types/get_calendar_response_submission_correction_input.rb +17 -0
- data/lib/nordlet/calendar/types/get_calendar_response_submissions_item.rb +4 -0
- data/lib/nordlet/calendar/types/get_calendar_response_submissions_item_correction_input.rb +17 -0
- data/lib/nordlet/calendar/types/list_calendar_response_rows_item.rb +2 -0
- data/lib/nordlet/calendar/types/list_calendar_response_rows_item_correction.rb +17 -0
- data/lib/nordlet/calendar/types/list_calendar_response_rows_item_correction_optional_item.rb +16 -0
- data/lib/nordlet/calendar/types/list_calendar_response_rows_item_correction_reason_codes_item.rb +13 -0
- data/lib/nordlet/calendar/types/list_calendar_response_rows_item_correction_required_item.rb +16 -0
- data/lib/nordlet/calendar/types/list_calendar_response_rows_item_submission.rb +4 -0
- data/lib/nordlet/calendar/types/list_calendar_response_rows_item_submission_correction_input.rb +17 -0
- data/lib/nordlet/calendar/types/list_calendar_response_rows_item_submissions_item.rb +4 -0
- data/lib/nordlet/calendar/types/list_calendar_response_rows_item_submissions_item_correction_input.rb +17 -0
- data/lib/nordlet/calendar/types/submit_calendar_request.rb +4 -0
- data/lib/nordlet/calendar/types/submit_calendar_request_correction.rb +17 -0
- data/lib/nordlet/calendar/types/submit_calendar_response.rb +4 -0
- data/lib/nordlet/calendar/types/submit_calendar_response_correction_input.rb +17 -0
- data/lib/nordlet/calendar/types/update_calendar_response.rb +2 -0
- data/lib/nordlet/calendar/types/update_calendar_response_correction.rb +17 -0
- data/lib/nordlet/calendar/types/update_calendar_response_correction_optional_item.rb +16 -0
- data/lib/nordlet/calendar/types/update_calendar_response_correction_reason_codes_item.rb +13 -0
- data/lib/nordlet/calendar/types/update_calendar_response_correction_required_item.rb +16 -0
- data/lib/nordlet/calendar/types/update_calendar_response_submission.rb +4 -0
- data/lib/nordlet/calendar/types/update_calendar_response_submission_correction_input.rb +17 -0
- data/lib/nordlet/calendar/types/update_calendar_response_submissions_item.rb +4 -0
- data/lib/nordlet/calendar/types/update_calendar_response_submissions_item_correction_input.rb +17 -0
- data/lib/nordlet/cash/client.rb +7 -5
- data/lib/nordlet/catalog/client.rb +3 -2
- data/lib/nordlet/client.rb +5 -0
- data/lib/nordlet/declarations/client.rb +154 -1
- data/lib/nordlet/declarations/types/submissions_confirm_declarations_response.rb +4 -0
- data/lib/nordlet/declarations/types/submissions_confirm_declarations_response_correction_input.rb +17 -0
- data/lib/nordlet/declarations/types/submissions_correction_preview_declarations_request.rb +11 -0
- data/lib/nordlet/declarations/types/submissions_correction_preview_declarations_response.rb +15 -0
- data/lib/nordlet/declarations/types/submissions_correction_preview_declarations_response_changes_item.rb +17 -0
- data/lib/nordlet/declarations/types/submissions_create_declarations_response.rb +4 -0
- data/lib/nordlet/declarations/types/submissions_create_declarations_response_correction_input.rb +17 -0
- data/lib/nordlet/declarations/types/submissions_list_declarations_response_rows_item.rb +8 -0
- data/lib/nordlet/declarations/types/submissions_list_declarations_response_rows_item_correction.rb +17 -0
- data/lib/nordlet/declarations/types/submissions_list_declarations_response_rows_item_correction_input.rb +17 -0
- data/lib/nordlet/declarations/types/submissions_list_declarations_response_rows_item_correction_optional_item.rb +16 -0
- data/lib/nordlet/declarations/types/submissions_list_declarations_response_rows_item_correction_reason_codes_item.rb +13 -0
- data/lib/nordlet/declarations/types/submissions_list_declarations_response_rows_item_correction_required_item.rb +16 -0
- data/lib/nordlet/declarations/types/submissions_mark_declarations_response.rb +4 -0
- data/lib/nordlet/declarations/types/submissions_mark_declarations_response_correction_input.rb +17 -0
- data/lib/nordlet/declarations/types/submissions_retry_declarations_response.rb +4 -0
- data/lib/nordlet/declarations/types/submissions_retry_declarations_response_correction_input.rb +17 -0
- data/lib/nordlet/declarations/types/vat_prorata_get_declarations_request.rb +11 -0
- data/lib/nordlet/declarations/types/vat_prorata_get_declarations_response.rb +13 -0
- data/lib/nordlet/declarations/types/vat_prorata_list_declarations_request.rb +9 -0
- data/lib/nordlet/declarations/types/vat_prorata_list_declarations_response.rb +11 -0
- data/lib/nordlet/declarations/types/vat_prorata_list_declarations_response_rows_item.rb +13 -0
- data/lib/nordlet/declarations/types/vat_prorata_set_declarations_request.rb +13 -0
- data/lib/nordlet/declarations/types/vat_prorata_set_declarations_response.rb +13 -0
- data/lib/nordlet/document_series/client.rb +2 -1
- data/lib/nordlet/files/client.rb +2 -2
- data/lib/nordlet/fleet/client.rb +3 -1
- data/lib/nordlet/hr/client.rb +10 -5
- data/lib/nordlet/inventory/client.rb +14 -6
- data/lib/nordlet/inventory/types/stock_receive_inventory_request.rb +2 -0
- data/lib/nordlet/inventory/types/stock_receive_inventory_response.rb +4 -0
- data/lib/nordlet/inventory/types/stock_receive_inventory_response_warnings_item.rb +15 -0
- data/lib/nordlet/leads/client.rb +2 -1
- data/lib/nordlet/ledger/client.rb +176 -10
- data/lib/nordlet/ledger/types/accruals_create_ledger_request.rb +15 -0
- data/lib/nordlet/ledger/types/accruals_create_ledger_request_lines_item.rb +19 -0
- data/lib/nordlet/ledger/types/accruals_create_ledger_response.rb +17 -0
- data/lib/nordlet/ledger/types/fx_revaluation_reverse_ledger_request.rb +13 -0
- data/lib/nordlet/ledger/types/fx_revaluation_reverse_ledger_response.rb +13 -0
- data/lib/nordlet/ledger/types/fx_revaluation_run_ledger_request.rb +11 -0
- data/lib/nordlet/ledger/types/fx_revaluation_run_ledger_response.rb +25 -0
- data/lib/nordlet/ledger/types/fx_revaluation_run_ledger_response_lines_item.rb +19 -0
- data/lib/nordlet/ledger/types/fx_revaluation_run_ledger_response_lines_item_kind.rb +15 -0
- data/lib/nordlet/ledger/types/journal_transactions_create_ledger_request_entries_item.rb +2 -0
- data/lib/nordlet/ledger/types/journal_transactions_get_ledger_response_entries_item.rb +2 -0
- data/lib/nordlet/ledger/types/posting_rules_update_ledger_request_rules_item_key.rb +7 -0
- data/lib/nordlet/ledger/types/tax_provision_post_ledger_request.rb +13 -0
- data/lib/nordlet/ledger/types/tax_provision_post_ledger_response.rb +17 -0
- data/lib/nordlet/migration/client.rb +5 -1
- data/lib/nordlet/operation_types/client.rb +4 -1
- data/lib/nordlet/partners/client.rb +14 -10
- data/lib/nordlet/partners/types/find_or_create_partners_request.rb +2 -0
- data/lib/nordlet/payroll/client.rb +24 -19
- data/lib/nordlet/payroll/types/runs_approve_payroll_request.rb +4 -0
- data/lib/nordlet/platform_sellers/client.rb +3 -1
- data/lib/nordlet/production/client.rb +4 -2
- data/lib/nordlet/projects/client.rb +3 -2
- data/lib/nordlet/public/types/invoices_get_public_response_status.rb +1 -0
- data/lib/nordlet/purchases/client.rb +26 -13
- data/lib/nordlet/purchases/types/invoices_create_purchases_response_warnings_item.rb +2 -0
- data/lib/nordlet/purchases/types/invoices_register_purchases_response_warnings_item.rb +2 -0
- data/lib/nordlet/reference/client.rb +4 -1
- data/lib/nordlet/review/client.rb +55 -0
- data/lib/nordlet/review/types/queue_list_review_request.rb +9 -0
- data/lib/nordlet/review/types/queue_list_review_response.rb +13 -0
- data/lib/nordlet/review/types/queue_list_review_response_items_item.rb +19 -0
- data/lib/nordlet/review/types/queue_list_review_response_items_item_kind.rb +16 -0
- data/lib/nordlet/sales/client.rb +65 -17
- data/lib/nordlet/sales/types/invoices_apply_advance_sales_response.rb +6 -0
- data/lib/nordlet/sales/types/invoices_apply_advance_sales_response_lines_item.rb +2 -0
- data/lib/nordlet/sales/types/invoices_apply_advance_sales_response_status.rb +1 -0
- data/lib/nordlet/sales/types/invoices_create_sales_request_lines_item.rb +2 -0
- data/lib/nordlet/sales/types/invoices_create_sales_response.rb +6 -0
- data/lib/nordlet/sales/types/invoices_create_sales_response_lines_item.rb +2 -0
- data/lib/nordlet/sales/types/invoices_create_sales_response_status.rb +1 -0
- data/lib/nordlet/sales/types/invoices_create_sales_response_warnings_item.rb +2 -0
- data/lib/nordlet/sales/types/invoices_get_sales_response.rb +6 -0
- data/lib/nordlet/sales/types/invoices_get_sales_response_lines_item.rb +2 -0
- data/lib/nordlet/sales/types/invoices_get_sales_response_status.rb +1 -0
- data/lib/nordlet/sales/types/invoices_issue_sales_response.rb +6 -0
- data/lib/nordlet/sales/types/invoices_issue_sales_response_lines_item.rb +2 -0
- data/lib/nordlet/sales/types/invoices_issue_sales_response_status.rb +1 -0
- data/lib/nordlet/sales/types/invoices_issue_sales_response_warnings_item.rb +2 -0
- data/lib/nordlet/sales/types/invoices_list_sales_response_rows_item.rb +6 -0
- data/lib/nordlet/sales/types/invoices_list_sales_response_rows_item_status.rb +1 -0
- data/lib/nordlet/sales/types/invoices_lock_sales_response.rb +6 -0
- data/lib/nordlet/sales/types/invoices_lock_sales_response_lines_item.rb +2 -0
- data/lib/nordlet/sales/types/invoices_lock_sales_response_status.rb +1 -0
- data/lib/nordlet/sales/types/invoices_reverse_sales_request.rb +13 -0
- data/lib/nordlet/sales/types/invoices_reverse_sales_response.rb +149 -0
- data/lib/nordlet/sales/types/invoices_reverse_sales_response_lines_item.rb +61 -0
- data/lib/nordlet/sales/types/invoices_reverse_sales_response_lines_item_recognition_method.rb +16 -0
- data/lib/nordlet/sales/types/invoices_reverse_sales_response_lines_item_recognition_milestones_item.rb +15 -0
- data/lib/nordlet/sales/types/invoices_reverse_sales_response_payment_status.rb +15 -0
- data/lib/nordlet/sales/types/invoices_reverse_sales_response_status.rb +15 -0
- data/lib/nordlet/sales/types/invoices_reverse_sales_response_type.rb +16 -0
- data/lib/nordlet/sales/types/invoices_reverse_sales_response_vat_evidence.rb +25 -0
- data/lib/nordlet/sales/types/invoices_reverse_sales_response_vat_evidence_location.rb +13 -0
- data/lib/nordlet/sales/types/invoices_reverse_sales_response_vat_evidence_partner.rb +17 -0
- data/lib/nordlet/sales/types/invoices_reverse_sales_response_vat_evidence_rate_table.rb +17 -0
- data/lib/nordlet/sales/types/invoices_reverse_sales_response_vat_evidence_rates_item.rb +15 -0
- data/lib/nordlet/sales/types/invoices_reverse_sales_response_vat_evidence_scheme.rb +15 -0
- data/lib/nordlet/sales/types/invoices_reverse_sales_response_vat_evidence_vies.rb +23 -0
- data/lib/nordlet/sales/types/invoices_reverse_sales_response_vat_scheme.rb +21 -0
- data/lib/nordlet/sales/types/invoices_unlock_sales_response.rb +6 -0
- data/lib/nordlet/sales/types/invoices_unlock_sales_response_lines_item.rb +2 -0
- data/lib/nordlet/sales/types/invoices_unlock_sales_response_status.rb +1 -0
- data/lib/nordlet/sales/types/invoices_update_sales_request_lines_item.rb +2 -0
- data/lib/nordlet/sales/types/invoices_update_sales_response.rb +6 -0
- data/lib/nordlet/sales/types/invoices_update_sales_response_lines_item.rb +2 -0
- data/lib/nordlet/sales/types/invoices_update_sales_response_status.rb +1 -0
- data/lib/nordlet/sales/types/invoices_view_sales_response_status.rb +1 -0
- data/lib/nordlet/transport/client.rb +2 -1
- data/lib/nordlet/version.rb +1 -1
- data/lib/nordlet/webhooks/types/subscriptions_create_webhooks_request_events_item.rb +3 -0
- data/lib/nordlet/webhooks/types/subscriptions_update_webhooks_request_events_item.rb +3 -0
- data/lib/nordlet.rb +96 -0
- data/reference.md +1259 -481
- metadata +98 -2
data/lib/nordlet/declarations/types/submissions_retry_declarations_response_correction_input.rb
ADDED
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module Nordlet
|
|
4
|
+
module Declarations
|
|
5
|
+
module Types
|
|
6
|
+
class SubmissionsRetryDeclarationsResponseCorrectionInput < Internal::Types::Model
|
|
7
|
+
field :reason, -> { String }, optional: true, nullable: false
|
|
8
|
+
|
|
9
|
+
field :reason_code, -> { String }, optional: true, nullable: false, api_name: "reasonCode"
|
|
10
|
+
|
|
11
|
+
field :authority_reference, -> { String }, optional: true, nullable: false, api_name: "authorityReference"
|
|
12
|
+
|
|
13
|
+
field :discovered_on, -> { String }, optional: true, nullable: false, api_name: "discoveredOn"
|
|
14
|
+
end
|
|
15
|
+
end
|
|
16
|
+
end
|
|
17
|
+
end
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module Nordlet
|
|
4
|
+
module Declarations
|
|
5
|
+
module Types
|
|
6
|
+
class VatProrataGetDeclarationsRequest < Internal::Types::Model
|
|
7
|
+
field :fiscal_year, -> { Integer }, optional: false, nullable: false, api_name: "fiscalYear"
|
|
8
|
+
end
|
|
9
|
+
end
|
|
10
|
+
end
|
|
11
|
+
end
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module Nordlet
|
|
4
|
+
module Declarations
|
|
5
|
+
module Types
|
|
6
|
+
class VatProrataGetDeclarationsResponse < Internal::Types::Model
|
|
7
|
+
field :fiscal_year, -> { Integer }, optional: false, nullable: false, api_name: "fiscalYear"
|
|
8
|
+
|
|
9
|
+
field :percent, -> { 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 VatProrataListDeclarationsResponse < Internal::Types::Model
|
|
7
|
+
field :rows, -> { Internal::Types::Array[Nordlet::Declarations::Types::VatProrataListDeclarationsResponseRowsItem] }, optional: false, nullable: false
|
|
8
|
+
end
|
|
9
|
+
end
|
|
10
|
+
end
|
|
11
|
+
end
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module Nordlet
|
|
4
|
+
module Declarations
|
|
5
|
+
module Types
|
|
6
|
+
class VatProrataListDeclarationsResponseRowsItem < Internal::Types::Model
|
|
7
|
+
field :fiscal_year, -> { Integer }, optional: false, nullable: false, api_name: "fiscalYear"
|
|
8
|
+
|
|
9
|
+
field :percent, -> { String }, optional: false, nullable: false
|
|
10
|
+
end
|
|
11
|
+
end
|
|
12
|
+
end
|
|
13
|
+
end
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module Nordlet
|
|
4
|
+
module Declarations
|
|
5
|
+
module Types
|
|
6
|
+
class VatProrataSetDeclarationsRequest < Internal::Types::Model
|
|
7
|
+
field :fiscal_year, -> { Integer }, optional: false, nullable: false, api_name: "fiscalYear"
|
|
8
|
+
|
|
9
|
+
field :percent, -> { String }, optional: false, nullable: false
|
|
10
|
+
end
|
|
11
|
+
end
|
|
12
|
+
end
|
|
13
|
+
end
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module Nordlet
|
|
4
|
+
module Declarations
|
|
5
|
+
module Types
|
|
6
|
+
class VatProrataSetDeclarationsResponse < Internal::Types::Model
|
|
7
|
+
field :fiscal_year, -> { Integer }, optional: false, nullable: false, api_name: "fiscalYear"
|
|
8
|
+
|
|
9
|
+
field :percent, -> { String }, optional: false, nullable: false
|
|
10
|
+
end
|
|
11
|
+
end
|
|
12
|
+
end
|
|
13
|
+
end
|
|
@@ -156,7 +156,8 @@ module Nordlet
|
|
|
156
156
|
end
|
|
157
157
|
|
|
158
158
|
# List document series. Filterable by documentType, prefix, operationTypeId and isActive; sortable by prefix,
|
|
159
|
-
# documentType and
|
|
159
|
+
# name, label, documentType, operationTypeName (the code and name of the operation type), nextNumber,
|
|
160
|
+
# numberLength, isDefault, isActive and createdAt.
|
|
160
161
|
#
|
|
161
162
|
# @param request_options [Hash]
|
|
162
163
|
# @param params [Nordlet::DocumentSeries::Types::ListDocumentSeriesRequest]
|
data/lib/nordlet/files/client.rb
CHANGED
|
@@ -79,8 +79,8 @@ module Nordlet
|
|
|
79
79
|
end
|
|
80
80
|
end
|
|
81
81
|
|
|
82
|
-
# List the company's files. Filterable by `entity`, `entityId` and `fileName`; sortable by `createdAt`,
|
|
83
|
-
# and `
|
|
82
|
+
# List the company's files. Filterable by `entity`, `entityId` and `fileName`; sortable by `createdAt`,
|
|
83
|
+
# `fileName`, `sizeBytes`, `entity`, `entityId` and `mimeType`.
|
|
84
84
|
#
|
|
85
85
|
# @param request_options [Hash]
|
|
86
86
|
# @param params [Nordlet::Files::Types::ListFilesRequest]
|
data/lib/nordlet/fleet/client.rb
CHANGED
|
@@ -117,7 +117,9 @@ module Nordlet
|
|
|
117
117
|
end
|
|
118
118
|
|
|
119
119
|
# List vehicles with their current assignment. Filterable by `plateNumber`, `make`, `model` and `status`; sortable
|
|
120
|
-
# by `plateNumber`, `make`
|
|
120
|
+
# by `plateNumber`, `make`, `createdAt`, `fixedAssetCode` (the code of the linked fixed asset), `fuelType`,
|
|
121
|
+
# `marketValue`, `technicalInspectionDue`, `insuranceDue`, `status` and `assignedEmployeeName` (the name of the
|
|
122
|
+
# employee the vehicle is assigned to today).
|
|
121
123
|
#
|
|
122
124
|
# @param request_options [Hash]
|
|
123
125
|
# @param params [Nordlet::Fleet::Types::VehiclesListFleetRequest]
|
data/lib/nordlet/hr/client.rb
CHANGED
|
@@ -114,7 +114,8 @@ module Nordlet
|
|
|
114
114
|
|
|
115
115
|
# Creates an employee record. `payrollOptions` holds the country-specific settings the payroll engine reads for
|
|
116
116
|
# the person (see `hr/employees/fields`); `applyAllowance` defaults to true and `pensionAccumulation` to false. An
|
|
117
|
-
# `iban` whose check digits fail (ISO 13616)
|
|
117
|
+
# `iban` whose check digits fail (ISO 13616), a `birthDate` in the future or before 1900, and a `personalCode`
|
|
118
|
+
# that is not a valid OIB (Croatia) or DNI/NIE (Spain) are refused with 422.
|
|
118
119
|
#
|
|
119
120
|
# @param request_options [Hash]
|
|
120
121
|
# @param params [Nordlet::Hr::Types::EmployeesCreateHrRequest]
|
|
@@ -150,7 +151,8 @@ module Nordlet
|
|
|
150
151
|
|
|
151
152
|
# Changes the given fields of an employee; a null clears the fields that allow it (code, personal code, birth
|
|
152
153
|
# date, contact details, address, IBAN, social insurance number and start, hire date, notes). `status` and
|
|
153
|
-
# `terminationDate` are set here too. An `iban` whose check digits fail (ISO 13616)
|
|
154
|
+
# `terminationDate` are set here too. An `iban` whose check digits fail (ISO 13616), a `birthDate` in the future
|
|
155
|
+
# or before 1900, and a `personalCode` that is not a valid OIB (Croatia) or DNI/NIE (Spain) are refused with 422.
|
|
154
156
|
#
|
|
155
157
|
# @param request_options [Hash]
|
|
156
158
|
# @param params [Nordlet::Hr::Types::EmployeesUpdateHrRequest]
|
|
@@ -255,7 +257,8 @@ module Nordlet
|
|
|
255
257
|
end
|
|
256
258
|
|
|
257
259
|
# Lists the employees that are not deleted; filterable by `firstName`, `lastName`, `code`, `status` and `email`,
|
|
258
|
-
# sortable by `lastName`, `code` and `
|
|
260
|
+
# sortable by `lastName`, `code`, `email`, `hireDate`, `status`, `createdAt` and `activeContractNo` (the number of
|
|
261
|
+
# the latest active contract).
|
|
259
262
|
#
|
|
260
263
|
# @param request_options [Hash]
|
|
261
264
|
# @param params [Nordlet::Hr::Types::EmployeesListHrRequest]
|
|
@@ -642,7 +645,7 @@ module Nordlet
|
|
|
642
645
|
end
|
|
643
646
|
end
|
|
644
647
|
|
|
645
|
-
# Lists per diem rates; filterable by `countryCode`, sortable by `countryCode` and `
|
|
648
|
+
# Lists per diem rates; filterable by `countryCode`, sortable by `countryCode`, `validFrom` and `dailyAmount`.
|
|
646
649
|
#
|
|
647
650
|
# @param request_options [Hash]
|
|
648
651
|
# @param params [Nordlet::Hr::Types::PerDiemRatesListHrRequest]
|
|
@@ -781,7 +784,9 @@ module Nordlet
|
|
|
781
784
|
end
|
|
782
785
|
end
|
|
783
786
|
|
|
784
|
-
# Lists business trips; filterable by `employeeId`, `status` and `
|
|
787
|
+
# Lists business trips; filterable by `employeeId`, `status`, `payrollRunId` and `purpose`, sortable by
|
|
788
|
+
# `startDate`, `employeeName` (the first and last name of the employee), `destinationCountryCode`, `purpose`,
|
|
789
|
+
# `perDiemAmount` and `status`.
|
|
785
790
|
#
|
|
786
791
|
# @param request_options [Hash]
|
|
787
792
|
# @param params [Nordlet::Hr::Types::BusinessTripsListHrRequest]
|
|
@@ -189,7 +189,11 @@ module Nordlet
|
|
|
189
189
|
# `expiryDate` is stored on a lot that has none. A serial-tracked item is received one unit at a time (422), and
|
|
190
190
|
# 409 when that serial number is already in stock. Open shortages of the item in the warehouse (negative stock
|
|
191
191
|
# policy `allow`) are settled from the receipt. Emits `stock.changed`. Receipts against a purchase order go
|
|
192
|
-
# through `purchases/receipts/create`.
|
|
192
|
+
# through `purchases/receipts/create`. With `counterAccountCode` the receipt also posts a journal entry (debit the
|
|
193
|
+
# `inventory.stock` posting rule account, credit the counter-account; 422 for an unknown or non-postable account,
|
|
194
|
+
# 409 when the accounting period of `date` is locked) and answers its `journalTransactionId`; without it nothing
|
|
195
|
+
# is posted and `warnings` holds `stock_receipt_not_posted`, because a purchase invoice already receives its goods
|
|
196
|
+
# into stock and must not be posted twice.
|
|
193
197
|
#
|
|
194
198
|
# @param request_options [Hash]
|
|
195
199
|
# @param params [Nordlet::Inventory::Types::StockReceiveInventoryRequest]
|
|
@@ -383,7 +387,8 @@ module Nordlet
|
|
|
383
387
|
end
|
|
384
388
|
|
|
385
389
|
# List the stock movements. Filterable: itemId, warehouseId, lotId, direction, documentType, date, quantity,
|
|
386
|
-
# totalCost. Sortable: date, createdAt, quantity, totalCost
|
|
390
|
+
# totalCost. Sortable: date, createdAt, quantity, totalCost, itemName (the name of the item), warehouseName (the
|
|
391
|
+
# name of the warehouse), direction, documentType; default newest first.
|
|
387
392
|
#
|
|
388
393
|
# @param request_options [Hash]
|
|
389
394
|
# @param params [Nordlet::Inventory::Types::StockMovementsListInventoryRequest]
|
|
@@ -418,7 +423,8 @@ module Nordlet
|
|
|
418
423
|
end
|
|
419
424
|
|
|
420
425
|
# List the lots with their quantity on hand (the remaining quantity of the lot's incoming movements). Filterable:
|
|
421
|
-
# itemId, lotNumber, expiryDate. Sortable: lotNumber, expiryDate, createdAt
|
|
426
|
+
# itemId, lotNumber, expiryDate. Sortable: lotNumber, expiryDate, createdAt, itemName (the name of the item),
|
|
427
|
+
# onHand; default newest first.
|
|
422
428
|
#
|
|
423
429
|
# @param request_options [Hash]
|
|
424
430
|
# @param params [Nordlet::Inventory::Types::LotsListInventoryRequest]
|
|
@@ -599,7 +605,8 @@ module Nordlet
|
|
|
599
605
|
end
|
|
600
606
|
|
|
601
607
|
# List the landed costs without their lines. Filterable: date, method, goodsReceiptId, sourceInvoiceId. Sortable:
|
|
602
|
-
# date, createdAt, amount; default newest
|
|
608
|
+
# date, createdAt, amount, method, notes, goodsReceiptNumber (the number of the goods receipt); default newest
|
|
609
|
+
# first.
|
|
603
610
|
#
|
|
604
611
|
# @param request_options [Hash]
|
|
605
612
|
# @param params [Nordlet::Inventory::Types::LandedCostsListInventoryRequest]
|
|
@@ -740,8 +747,9 @@ module Nordlet
|
|
|
740
747
|
end
|
|
741
748
|
end
|
|
742
749
|
|
|
743
|
-
# List the reorder rules. Filterable: itemId, warehouseId, isActive. Sortable: createdAt, minQty
|
|
744
|
-
#
|
|
750
|
+
# List the reorder rules. Filterable: itemId, warehouseId, isActive. Sortable: createdAt, minQty, reorderQty,
|
|
751
|
+
# itemName (the name of the item), warehouseName (the name of the warehouse, empty for all warehouses); default
|
|
752
|
+
# newest first.
|
|
745
753
|
#
|
|
746
754
|
# @param request_options [Hash]
|
|
747
755
|
# @param params [Nordlet::Inventory::Types::ReorderRulesListInventoryRequest]
|
|
@@ -14,6 +14,8 @@ module Nordlet
|
|
|
14
14
|
|
|
15
15
|
field :unit_cost, -> { String }, optional: false, nullable: false, api_name: "unitCost"
|
|
16
16
|
|
|
17
|
+
field :counter_account_code, -> { String }, optional: true, nullable: false, api_name: "counterAccountCode"
|
|
18
|
+
|
|
17
19
|
field :lot_number, -> { String }, optional: true, nullable: false, api_name: "lotNumber"
|
|
18
20
|
|
|
19
21
|
field :expiry_date, -> { String }, optional: true, nullable: false, api_name: "expiryDate"
|
|
@@ -7,6 +7,10 @@ module Nordlet
|
|
|
7
7
|
field :movement_id, -> { String }, optional: false, nullable: false, api_name: "movementId"
|
|
8
8
|
|
|
9
9
|
field :total_cost, -> { String }, optional: false, nullable: false, api_name: "totalCost"
|
|
10
|
+
|
|
11
|
+
field :journal_transaction_id, -> { String }, optional: true, nullable: false, api_name: "journalTransactionId"
|
|
12
|
+
|
|
13
|
+
field :warnings, -> { Internal::Types::Array[Nordlet::Inventory::Types::StockReceiveInventoryResponseWarningsItem] }, optional: false, nullable: false
|
|
10
14
|
end
|
|
11
15
|
end
|
|
12
16
|
end
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module Nordlet
|
|
4
|
+
module Inventory
|
|
5
|
+
module Types
|
|
6
|
+
class StockReceiveInventoryResponseWarningsItem < Internal::Types::Model
|
|
7
|
+
field :code, -> { String }, optional: false, nullable: false
|
|
8
|
+
|
|
9
|
+
field :message, -> { String }, optional: false, nullable: false
|
|
10
|
+
|
|
11
|
+
field :fix, -> { String }, optional: false, nullable: false
|
|
12
|
+
end
|
|
13
|
+
end
|
|
14
|
+
end
|
|
15
|
+
end
|
data/lib/nordlet/leads/client.rb
CHANGED
|
@@ -153,7 +153,8 @@ module Nordlet
|
|
|
153
153
|
|
|
154
154
|
# Lists leads with their source and type names; filterable by `name`, `contactName`, `email`, `phone`, `status`,
|
|
155
155
|
# `sourceId`, `typeId`, `countryCode`, `assignedUserId`, `partnerId`, `estimatedValue` and `createdAt`, sortable
|
|
156
|
-
# by `name`, `
|
|
156
|
+
# by `name`, `contactName`, `email`, `phone`, `status`, `typeName` (the name of the lead type), `sourceName` (the
|
|
157
|
+
# name of the lead source), `estimatedValue`, `createdAt` and `updatedAt`.
|
|
157
158
|
#
|
|
158
159
|
# @param request_options [Hash]
|
|
159
160
|
# @param params [Nordlet::Leads::Types::ListLeadsRequest]
|
|
@@ -10,8 +10,9 @@ module Nordlet
|
|
|
10
10
|
@client = client
|
|
11
11
|
end
|
|
12
12
|
|
|
13
|
-
# Lists the company's chart of accounts. Filterable by `code`, `name`, `type` and `isPostable`; sortable by
|
|
14
|
-
# and `name
|
|
13
|
+
# Lists the company's chart of accounts. Filterable by `code`, `name`, `type` and `isPostable`; sortable by
|
|
14
|
+
# `code`, `name`, `type` and `isPostable`. A `name` filter with `contains` matches the stored name and the name
|
|
15
|
+
# shown in the language of the request (`displayName`).
|
|
15
16
|
#
|
|
16
17
|
# @param request_options [Hash]
|
|
17
18
|
# @param params [Nordlet::Ledger::Types::AccountsListLedgerRequest]
|
|
@@ -301,7 +302,8 @@ module Nordlet
|
|
|
301
302
|
end
|
|
302
303
|
|
|
303
304
|
# Lists journal transactions with the partner name. Filterable by `date`, `status`, `documentType`, `partnerId`
|
|
304
|
-
# and `documentId`; sortable by `date`
|
|
305
|
+
# and `documentId`; sortable by `date`, `createdAt`, `description`, `partnerName` (the name of the partner),
|
|
306
|
+
# `documentType` and `status`.
|
|
305
307
|
#
|
|
306
308
|
# @param request_options [Hash]
|
|
307
309
|
# @param params [Nordlet::Ledger::Types::JournalTransactionsListLedgerRequest]
|
|
@@ -748,7 +750,9 @@ module Nordlet
|
|
|
748
750
|
end
|
|
749
751
|
end
|
|
750
752
|
|
|
751
|
-
# Lists the company's owners. Filterable by `name` and `code`; sortable by `name`
|
|
753
|
+
# Lists the company's owners. Filterable by `name` and `code`; sortable by `name`, `createdAt`, `code`,
|
|
754
|
+
# `sharesQuantity`, `sharesAmount`, `sharesType`, `sharesAcquisitionDate`, `partnerLiability` and
|
|
755
|
+
# `withholdingTaxPercent`.
|
|
752
756
|
#
|
|
753
757
|
# @param request_options [Hash]
|
|
754
758
|
# @param params [Nordlet::Ledger::Types::OwnersListLedgerRequest]
|
|
@@ -819,9 +823,13 @@ module Nordlet
|
|
|
819
823
|
|
|
820
824
|
# Posts a manual journal transaction (`documentType` `manual`, status `posted`) in the company's base currency.
|
|
821
825
|
# Every `accountCode` must be a postable account of the chart, cost centers must exist and be active, projects
|
|
822
|
-
# must exist,
|
|
823
|
-
#
|
|
824
|
-
#
|
|
826
|
+
# must exist, an entry `partnerId` must be a partner of the company (422), and the debits must equal the credits.
|
|
827
|
+
# An entry with a `partnerId` on the receivable or payable account (posting rules `sales.receivable`,
|
|
828
|
+
# `purchases.payables`) is counted by `reports/partner-balances` and `reports/debt-aging`. Answers 422 for an
|
|
829
|
+
# unknown or non-postable account, an unknown cost center or project, debits that differ from the credits, an
|
|
830
|
+
# amount that is not whole cents (a third or fourth decimal other than zero; `10.5000` is accepted), for a
|
|
831
|
+
# `currency` other than the base currency and for an inactive cost center, and 409 when the accounting period of
|
|
832
|
+
# `date` is locked.
|
|
825
833
|
#
|
|
826
834
|
# @param request_options [Hash]
|
|
827
835
|
# @param params [Nordlet::Ledger::Types::JournalTransactionsCreateLedgerRequest]
|
|
@@ -857,9 +865,9 @@ module Nordlet
|
|
|
857
865
|
|
|
858
866
|
# Posts a journal transaction (`documentType` `manual_reversal`, `documentId` the original) dated `date` (default
|
|
859
867
|
# the original date) whose entries mirror the original's (debits and credits swapped). Only a `manual` transaction
|
|
860
|
-
#
|
|
861
|
-
#
|
|
862
|
-
# 400 when `date` is before the original date.
|
|
868
|
+
# or a `tax_provision` (posted by `ledger/tax-provision/post`) is reversed here; a transaction posted by a
|
|
869
|
+
# document is reversed through that document. Answers 409 when the transaction is neither, when it is already
|
|
870
|
+
# reversed and when the accounting period of `date` is locked, and 400 when `date` is before the original date.
|
|
863
871
|
#
|
|
864
872
|
# @param request_options [Hash]
|
|
865
873
|
# @param params [Nordlet::Ledger::Types::JournalTransactionsReverseLedgerRequest]
|
|
@@ -893,6 +901,164 @@ module Nordlet
|
|
|
893
901
|
end
|
|
894
902
|
end
|
|
895
903
|
|
|
904
|
+
# Revalues the open sale and purchase documents in a currency other than the base currency (open amount at `date`,
|
|
905
|
+
# payments up to `date` deducted) and the balances of the foreign-currency bank accounts at the stored exchange
|
|
906
|
+
# rate of `date` against the rate of each document or the booked base balance, and posts one journal transaction
|
|
907
|
+
# dated `date` (`documentType` `fx_revaluation`): the difference on each receivable or payable account with the
|
|
908
|
+
# partner on the entry, and the unrealised gain or loss on the `bank.fxUnrealisedGain` and `bank.fxUnrealisedLoss`
|
|
909
|
+
# posting rule accounts. A second transaction (`documentType` `fx_revaluation_reversal`) reverses it on the next
|
|
910
|
+
# calendar day. Nothing is posted and `runId` is null when nothing differs. The payment match keeps booking the
|
|
911
|
+
# realised difference against the rate of the document. Runs only on request, once per `date`: 409 when `date` is
|
|
912
|
+
# already revalued (reverse that run first) and when `date` or the next day is in a locked accounting period; 422
|
|
913
|
+
# when a stored rate is missing.
|
|
914
|
+
#
|
|
915
|
+
# @param request_options [Hash]
|
|
916
|
+
# @param params [Nordlet::Ledger::Types::FxRevaluationRunLedgerRequest]
|
|
917
|
+
# @option request_options [String] :base_url
|
|
918
|
+
# @option request_options [Hash{String => Object}] :additional_headers
|
|
919
|
+
# @option request_options [Hash{String => Object}] :additional_query_parameters
|
|
920
|
+
# @option request_options [Hash{String => Object}] :additional_body_parameters
|
|
921
|
+
# @option request_options [Integer] :timeout_in_seconds
|
|
922
|
+
#
|
|
923
|
+
# @return [Nordlet::Ledger::Types::FxRevaluationRunLedgerResponse]
|
|
924
|
+
def fx_revaluation_run(request_options: {}, **params)
|
|
925
|
+
params = Nordlet::Internal::Types::Utils.normalize_keys(params)
|
|
926
|
+
request = Nordlet::Internal::JSON::Request.new(
|
|
927
|
+
base_url: request_options[:base_url],
|
|
928
|
+
method: "POST",
|
|
929
|
+
path: "v1/ledger/fx-revaluation/run",
|
|
930
|
+
body: Nordlet::Ledger::Types::FxRevaluationRunLedgerRequest.new(params).to_h,
|
|
931
|
+
request_options: request_options
|
|
932
|
+
)
|
|
933
|
+
begin
|
|
934
|
+
response = @client.send(request)
|
|
935
|
+
rescue Net::HTTPRequestTimeout
|
|
936
|
+
raise Nordlet::Errors::TimeoutError
|
|
937
|
+
end
|
|
938
|
+
code = response.code.to_i
|
|
939
|
+
if code.between?(200, 299)
|
|
940
|
+
Nordlet::Ledger::Types::FxRevaluationRunLedgerResponse.load(response.body)
|
|
941
|
+
else
|
|
942
|
+
error_class = Nordlet::Errors::ResponseError.subclass_for_code(code)
|
|
943
|
+
raise error_class.new(response.body, code: code)
|
|
944
|
+
end
|
|
945
|
+
end
|
|
946
|
+
|
|
947
|
+
# Cancels the run `id` of `ledger/fx-revaluation/run`: posts a mirror of the revaluation transaction on the run
|
|
948
|
+
# date (`documentType` `fx_revaluation_undo`) and a mirror of its next-day reversal on the reversal date
|
|
949
|
+
# (`documentType` `fx_revaluation_undo_reversal`), so the net effect is zero, and frees the date for a new run.
|
|
950
|
+
# Answers 404 for an unknown run, 409 when the run is already reversed or when the run date or the next day is in
|
|
951
|
+
# a locked accounting period.
|
|
952
|
+
#
|
|
953
|
+
# @param request_options [Hash]
|
|
954
|
+
# @param params [Nordlet::Ledger::Types::FxRevaluationReverseLedgerRequest]
|
|
955
|
+
# @option request_options [String] :base_url
|
|
956
|
+
# @option request_options [Hash{String => Object}] :additional_headers
|
|
957
|
+
# @option request_options [Hash{String => Object}] :additional_query_parameters
|
|
958
|
+
# @option request_options [Hash{String => Object}] :additional_body_parameters
|
|
959
|
+
# @option request_options [Integer] :timeout_in_seconds
|
|
960
|
+
#
|
|
961
|
+
# @return [Nordlet::Ledger::Types::FxRevaluationReverseLedgerResponse]
|
|
962
|
+
def fx_revaluation_reverse(request_options: {}, **params)
|
|
963
|
+
params = Nordlet::Internal::Types::Utils.normalize_keys(params)
|
|
964
|
+
request = Nordlet::Internal::JSON::Request.new(
|
|
965
|
+
base_url: request_options[:base_url],
|
|
966
|
+
method: "POST",
|
|
967
|
+
path: "v1/ledger/fx-revaluation/reverse",
|
|
968
|
+
body: Nordlet::Ledger::Types::FxRevaluationReverseLedgerRequest.new(params).to_h,
|
|
969
|
+
request_options: request_options
|
|
970
|
+
)
|
|
971
|
+
begin
|
|
972
|
+
response = @client.send(request)
|
|
973
|
+
rescue Net::HTTPRequestTimeout
|
|
974
|
+
raise Nordlet::Errors::TimeoutError
|
|
975
|
+
end
|
|
976
|
+
code = response.code.to_i
|
|
977
|
+
if code.between?(200, 299)
|
|
978
|
+
Nordlet::Ledger::Types::FxRevaluationReverseLedgerResponse.load(response.body)
|
|
979
|
+
else
|
|
980
|
+
error_class = Nordlet::Errors::ResponseError.subclass_for_code(code)
|
|
981
|
+
raise error_class.new(response.body, code: code)
|
|
982
|
+
end
|
|
983
|
+
end
|
|
984
|
+
|
|
985
|
+
# Posts a journal transaction (`documentType` `accrual`) dated `date` from `lines` (each line either a debit or a
|
|
986
|
+
# credit, whole cents, balanced; an optional `partnerId` is counted by the partner reports on the receivable and
|
|
987
|
+
# payable accounts) and a mirror transaction (`documentType` `accrual_reversal`, `documentId` the accrual) dated
|
|
988
|
+
# the first day of the next month. 422 for an unknown or non-postable account, an unknown partner, an unbalanced
|
|
989
|
+
# or one-sided line; 409 when the accounting period of `date` or of the reversal date is locked.
|
|
990
|
+
#
|
|
991
|
+
# @param request_options [Hash]
|
|
992
|
+
# @param params [Nordlet::Ledger::Types::AccrualsCreateLedgerRequest]
|
|
993
|
+
# @option request_options [String] :base_url
|
|
994
|
+
# @option request_options [Hash{String => Object}] :additional_headers
|
|
995
|
+
# @option request_options [Hash{String => Object}] :additional_query_parameters
|
|
996
|
+
# @option request_options [Hash{String => Object}] :additional_body_parameters
|
|
997
|
+
# @option request_options [Integer] :timeout_in_seconds
|
|
998
|
+
#
|
|
999
|
+
# @return [Nordlet::Ledger::Types::AccrualsCreateLedgerResponse]
|
|
1000
|
+
def accruals_create(request_options: {}, **params)
|
|
1001
|
+
params = Nordlet::Internal::Types::Utils.normalize_keys(params)
|
|
1002
|
+
request = Nordlet::Internal::JSON::Request.new(
|
|
1003
|
+
base_url: request_options[:base_url],
|
|
1004
|
+
method: "POST",
|
|
1005
|
+
path: "v1/ledger/accruals/create",
|
|
1006
|
+
body: Nordlet::Ledger::Types::AccrualsCreateLedgerRequest.new(params).to_h,
|
|
1007
|
+
request_options: request_options
|
|
1008
|
+
)
|
|
1009
|
+
begin
|
|
1010
|
+
response = @client.send(request)
|
|
1011
|
+
rescue Net::HTTPRequestTimeout
|
|
1012
|
+
raise Nordlet::Errors::TimeoutError
|
|
1013
|
+
end
|
|
1014
|
+
code = response.code.to_i
|
|
1015
|
+
if code.between?(200, 299)
|
|
1016
|
+
Nordlet::Ledger::Types::AccrualsCreateLedgerResponse.load(response.body)
|
|
1017
|
+
else
|
|
1018
|
+
error_class = Nordlet::Errors::ResponseError.subclass_for_code(code)
|
|
1019
|
+
raise error_class.new(response.body, code: code)
|
|
1020
|
+
end
|
|
1021
|
+
end
|
|
1022
|
+
|
|
1023
|
+
# Posts a journal transaction (`documentType` `tax_provision`, `documentId` the fiscal year) dated the last day of
|
|
1024
|
+
# the fiscal year `fiscalYear`: debit the `tax.corporateExpense` posting rule account, credit
|
|
1025
|
+
# `tax.corporatePayable`. `amount` defaults to the tax payable of the year's corporate tax return for Lithuanian
|
|
1026
|
+
# (PLN204) and Romanian (D101) companies; for other countries it is required (422). 422 when the amount is zero or
|
|
1027
|
+
# not whole cents; 409 when the accounting period is locked and when the year already has a provision that is not
|
|
1028
|
+
# reversed (reverse it with `ledger/journal/transactions/reverse`).
|
|
1029
|
+
#
|
|
1030
|
+
# @param request_options [Hash]
|
|
1031
|
+
# @param params [Nordlet::Ledger::Types::TaxProvisionPostLedgerRequest]
|
|
1032
|
+
# @option request_options [String] :base_url
|
|
1033
|
+
# @option request_options [Hash{String => Object}] :additional_headers
|
|
1034
|
+
# @option request_options [Hash{String => Object}] :additional_query_parameters
|
|
1035
|
+
# @option request_options [Hash{String => Object}] :additional_body_parameters
|
|
1036
|
+
# @option request_options [Integer] :timeout_in_seconds
|
|
1037
|
+
#
|
|
1038
|
+
# @return [Nordlet::Ledger::Types::TaxProvisionPostLedgerResponse]
|
|
1039
|
+
def tax_provision_post(request_options: {}, **params)
|
|
1040
|
+
params = Nordlet::Internal::Types::Utils.normalize_keys(params)
|
|
1041
|
+
request = Nordlet::Internal::JSON::Request.new(
|
|
1042
|
+
base_url: request_options[:base_url],
|
|
1043
|
+
method: "POST",
|
|
1044
|
+
path: "v1/ledger/tax-provision/post",
|
|
1045
|
+
body: Nordlet::Ledger::Types::TaxProvisionPostLedgerRequest.new(params).to_h,
|
|
1046
|
+
request_options: request_options
|
|
1047
|
+
)
|
|
1048
|
+
begin
|
|
1049
|
+
response = @client.send(request)
|
|
1050
|
+
rescue Net::HTTPRequestTimeout
|
|
1051
|
+
raise Nordlet::Errors::TimeoutError
|
|
1052
|
+
end
|
|
1053
|
+
code = response.code.to_i
|
|
1054
|
+
if code.between?(200, 299)
|
|
1055
|
+
Nordlet::Ledger::Types::TaxProvisionPostLedgerResponse.load(response.body)
|
|
1056
|
+
else
|
|
1057
|
+
error_class = Nordlet::Errors::ResponseError.subclass_for_code(code)
|
|
1058
|
+
raise error_class.new(response.body, code: code)
|
|
1059
|
+
end
|
|
1060
|
+
end
|
|
1061
|
+
|
|
896
1062
|
# The rows or codes of each return or registry deposit of the company country that are filled from account
|
|
897
1063
|
# balances. Accounts fall into a row by the layout defaults for the standard chart of accounts unless mapped under
|
|
898
1064
|
# Account → Statement rows.
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module Nordlet
|
|
4
|
+
module Ledger
|
|
5
|
+
module Types
|
|
6
|
+
class AccrualsCreateLedgerRequest < Internal::Types::Model
|
|
7
|
+
field :date, -> { String }, optional: false, nullable: false
|
|
8
|
+
|
|
9
|
+
field :reason, -> { String }, optional: false, nullable: false
|
|
10
|
+
|
|
11
|
+
field :lines, -> { Internal::Types::Array[Nordlet::Ledger::Types::AccrualsCreateLedgerRequestLinesItem] }, optional: false, nullable: false
|
|
12
|
+
end
|
|
13
|
+
end
|
|
14
|
+
end
|
|
15
|
+
end
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module Nordlet
|
|
4
|
+
module Ledger
|
|
5
|
+
module Types
|
|
6
|
+
class AccrualsCreateLedgerRequestLinesItem < Internal::Types::Model
|
|
7
|
+
field :account_code, -> { String }, optional: false, nullable: false, api_name: "accountCode"
|
|
8
|
+
|
|
9
|
+
field :debit, -> { String }, optional: true, nullable: false
|
|
10
|
+
|
|
11
|
+
field :credit, -> { String }, optional: true, nullable: false
|
|
12
|
+
|
|
13
|
+
field :partner_id, -> { String }, optional: true, nullable: false, api_name: "partnerId"
|
|
14
|
+
|
|
15
|
+
field :description, -> { String }, optional: true, nullable: false
|
|
16
|
+
end
|
|
17
|
+
end
|
|
18
|
+
end
|
|
19
|
+
end
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module Nordlet
|
|
4
|
+
module Ledger
|
|
5
|
+
module Types
|
|
6
|
+
class AccrualsCreateLedgerResponse < Internal::Types::Model
|
|
7
|
+
field :id, -> { String }, optional: false, nullable: false
|
|
8
|
+
|
|
9
|
+
field :reversal_id, -> { String }, optional: false, nullable: false, api_name: "reversalId"
|
|
10
|
+
|
|
11
|
+
field :date, -> { String }, optional: false, nullable: false
|
|
12
|
+
|
|
13
|
+
field :reversal_date, -> { String }, optional: false, nullable: false, api_name: "reversalDate"
|
|
14
|
+
end
|
|
15
|
+
end
|
|
16
|
+
end
|
|
17
|
+
end
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module Nordlet
|
|
4
|
+
module Ledger
|
|
5
|
+
module Types
|
|
6
|
+
class FxRevaluationReverseLedgerRequest < Internal::Types::Model
|
|
7
|
+
field :id, -> { String }, optional: false, nullable: false
|
|
8
|
+
|
|
9
|
+
field :reason, -> { String }, optional: false, nullable: false
|
|
10
|
+
end
|
|
11
|
+
end
|
|
12
|
+
end
|
|
13
|
+
end
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module Nordlet
|
|
4
|
+
module Ledger
|
|
5
|
+
module Types
|
|
6
|
+
class FxRevaluationReverseLedgerResponse < Internal::Types::Model
|
|
7
|
+
field :id, -> { String }, optional: false, nullable: false
|
|
8
|
+
|
|
9
|
+
field :undo_journal_transaction_ids, -> { Internal::Types::Array[String] }, optional: false, nullable: false, api_name: "undoJournalTransactionIds"
|
|
10
|
+
end
|
|
11
|
+
end
|
|
12
|
+
end
|
|
13
|
+
end
|