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.
Files changed (197) hide show
  1. checksums.yaml +4 -4
  2. data/lib/nordlet/account/client.rb +42 -0
  3. data/lib/nordlet/account/types/companies_context_account_request.rb +9 -0
  4. data/lib/nordlet/account/types/companies_context_account_response.rb +23 -0
  5. data/lib/nordlet/account/types/companies_context_account_response_bank_accounts_item.rb +23 -0
  6. data/lib/nordlet/account/types/companies_context_account_response_filings_item.rb +27 -0
  7. data/lib/nordlet/account/types/companies_context_account_response_filings_item_missing_settings.rb +17 -0
  8. data/lib/nordlet/account/types/companies_context_account_response_filings_item_missing_settings_operation.rb +13 -0
  9. data/lib/nordlet/account/types/companies_context_account_response_payroll.rb +15 -0
  10. data/lib/nordlet/account/types/companies_context_account_response_payroll_employee_fields_item.rb +17 -0
  11. data/lib/nordlet/account/types/companies_context_account_response_payroll_employee_fields_item_kind.rb +15 -0
  12. data/lib/nordlet/account/types/companies_context_account_response_periods.rb +13 -0
  13. data/lib/nordlet/account/types/companies_context_account_response_periods_locked_item.rb +13 -0
  14. data/lib/nordlet/account/types/companies_context_account_response_periods_open_item.rb +13 -0
  15. data/lib/nordlet/account/types/companies_context_account_response_profile.rb +95 -0
  16. data/lib/nordlet/account/types/companies_context_account_response_profile_accounts_kept_by.rb +14 -0
  17. data/lib/nordlet/account/types/companies_context_account_response_profile_address.rb +17 -0
  18. data/lib/nordlet/account/types/companies_context_account_response_profile_status.rb +15 -0
  19. data/lib/nordlet/account/types/companies_context_account_response_profile_vat_period.rb +17 -0
  20. data/lib/nordlet/account/types/companies_context_account_response_vat_types_used_item.rb +19 -0
  21. data/lib/nordlet/agreements/client.rb +3 -1
  22. data/lib/nordlet/assets/client.rb +9 -2
  23. data/lib/nordlet/assets/types/assets_create_assets_response.rb +2 -0
  24. data/lib/nordlet/assets/types/assets_dispose_assets_request.rb +2 -0
  25. data/lib/nordlet/assets/types/assets_dispose_assets_response.rb +2 -0
  26. data/lib/nordlet/assets/types/assets_get_assets_response.rb +2 -0
  27. data/lib/nordlet/assets/types/assets_input_vat_assets_response.rb +2 -0
  28. data/lib/nordlet/assets/types/assets_list_assets_response_rows_item.rb +2 -0
  29. data/lib/nordlet/assets/types/assets_modernize_assets_response.rb +2 -0
  30. data/lib/nordlet/assets/types/assets_update_assets_response.rb +2 -0
  31. data/lib/nordlet/audit/client.rb +3 -2
  32. data/lib/nordlet/bank/client.rb +40 -26
  33. data/lib/nordlet/bank/types/transactions_match_bank_request_document_type.rb +1 -0
  34. data/lib/nordlet/calendar/client.rb +6 -1
  35. data/lib/nordlet/calendar/types/create_calendar_response.rb +2 -0
  36. data/lib/nordlet/calendar/types/create_calendar_response_correction.rb +17 -0
  37. data/lib/nordlet/calendar/types/create_calendar_response_correction_optional_item.rb +16 -0
  38. data/lib/nordlet/calendar/types/create_calendar_response_correction_reason_codes_item.rb +13 -0
  39. data/lib/nordlet/calendar/types/create_calendar_response_correction_required_item.rb +16 -0
  40. data/lib/nordlet/calendar/types/create_calendar_response_submission.rb +4 -0
  41. data/lib/nordlet/calendar/types/create_calendar_response_submission_correction_input.rb +17 -0
  42. data/lib/nordlet/calendar/types/create_calendar_response_submissions_item.rb +4 -0
  43. data/lib/nordlet/calendar/types/create_calendar_response_submissions_item_correction_input.rb +17 -0
  44. data/lib/nordlet/calendar/types/get_calendar_response.rb +2 -0
  45. data/lib/nordlet/calendar/types/get_calendar_response_correction.rb +17 -0
  46. data/lib/nordlet/calendar/types/get_calendar_response_correction_optional_item.rb +16 -0
  47. data/lib/nordlet/calendar/types/get_calendar_response_correction_reason_codes_item.rb +13 -0
  48. data/lib/nordlet/calendar/types/get_calendar_response_correction_required_item.rb +16 -0
  49. data/lib/nordlet/calendar/types/get_calendar_response_submission.rb +4 -0
  50. data/lib/nordlet/calendar/types/get_calendar_response_submission_correction_input.rb +17 -0
  51. data/lib/nordlet/calendar/types/get_calendar_response_submissions_item.rb +4 -0
  52. data/lib/nordlet/calendar/types/get_calendar_response_submissions_item_correction_input.rb +17 -0
  53. data/lib/nordlet/calendar/types/list_calendar_response_rows_item.rb +2 -0
  54. data/lib/nordlet/calendar/types/list_calendar_response_rows_item_correction.rb +17 -0
  55. data/lib/nordlet/calendar/types/list_calendar_response_rows_item_correction_optional_item.rb +16 -0
  56. data/lib/nordlet/calendar/types/list_calendar_response_rows_item_correction_reason_codes_item.rb +13 -0
  57. data/lib/nordlet/calendar/types/list_calendar_response_rows_item_correction_required_item.rb +16 -0
  58. data/lib/nordlet/calendar/types/list_calendar_response_rows_item_submission.rb +4 -0
  59. data/lib/nordlet/calendar/types/list_calendar_response_rows_item_submission_correction_input.rb +17 -0
  60. data/lib/nordlet/calendar/types/list_calendar_response_rows_item_submissions_item.rb +4 -0
  61. data/lib/nordlet/calendar/types/list_calendar_response_rows_item_submissions_item_correction_input.rb +17 -0
  62. data/lib/nordlet/calendar/types/submit_calendar_request.rb +4 -0
  63. data/lib/nordlet/calendar/types/submit_calendar_request_correction.rb +17 -0
  64. data/lib/nordlet/calendar/types/submit_calendar_response.rb +4 -0
  65. data/lib/nordlet/calendar/types/submit_calendar_response_correction_input.rb +17 -0
  66. data/lib/nordlet/calendar/types/update_calendar_response.rb +2 -0
  67. data/lib/nordlet/calendar/types/update_calendar_response_correction.rb +17 -0
  68. data/lib/nordlet/calendar/types/update_calendar_response_correction_optional_item.rb +16 -0
  69. data/lib/nordlet/calendar/types/update_calendar_response_correction_reason_codes_item.rb +13 -0
  70. data/lib/nordlet/calendar/types/update_calendar_response_correction_required_item.rb +16 -0
  71. data/lib/nordlet/calendar/types/update_calendar_response_submission.rb +4 -0
  72. data/lib/nordlet/calendar/types/update_calendar_response_submission_correction_input.rb +17 -0
  73. data/lib/nordlet/calendar/types/update_calendar_response_submissions_item.rb +4 -0
  74. data/lib/nordlet/calendar/types/update_calendar_response_submissions_item_correction_input.rb +17 -0
  75. data/lib/nordlet/cash/client.rb +7 -5
  76. data/lib/nordlet/catalog/client.rb +3 -2
  77. data/lib/nordlet/client.rb +5 -0
  78. data/lib/nordlet/declarations/client.rb +154 -1
  79. data/lib/nordlet/declarations/types/submissions_confirm_declarations_response.rb +4 -0
  80. data/lib/nordlet/declarations/types/submissions_confirm_declarations_response_correction_input.rb +17 -0
  81. data/lib/nordlet/declarations/types/submissions_correction_preview_declarations_request.rb +11 -0
  82. data/lib/nordlet/declarations/types/submissions_correction_preview_declarations_response.rb +15 -0
  83. data/lib/nordlet/declarations/types/submissions_correction_preview_declarations_response_changes_item.rb +17 -0
  84. data/lib/nordlet/declarations/types/submissions_create_declarations_response.rb +4 -0
  85. data/lib/nordlet/declarations/types/submissions_create_declarations_response_correction_input.rb +17 -0
  86. data/lib/nordlet/declarations/types/submissions_list_declarations_response_rows_item.rb +8 -0
  87. data/lib/nordlet/declarations/types/submissions_list_declarations_response_rows_item_correction.rb +17 -0
  88. data/lib/nordlet/declarations/types/submissions_list_declarations_response_rows_item_correction_input.rb +17 -0
  89. data/lib/nordlet/declarations/types/submissions_list_declarations_response_rows_item_correction_optional_item.rb +16 -0
  90. data/lib/nordlet/declarations/types/submissions_list_declarations_response_rows_item_correction_reason_codes_item.rb +13 -0
  91. data/lib/nordlet/declarations/types/submissions_list_declarations_response_rows_item_correction_required_item.rb +16 -0
  92. data/lib/nordlet/declarations/types/submissions_mark_declarations_response.rb +4 -0
  93. data/lib/nordlet/declarations/types/submissions_mark_declarations_response_correction_input.rb +17 -0
  94. data/lib/nordlet/declarations/types/submissions_retry_declarations_response.rb +4 -0
  95. data/lib/nordlet/declarations/types/submissions_retry_declarations_response_correction_input.rb +17 -0
  96. data/lib/nordlet/declarations/types/vat_prorata_get_declarations_request.rb +11 -0
  97. data/lib/nordlet/declarations/types/vat_prorata_get_declarations_response.rb +13 -0
  98. data/lib/nordlet/declarations/types/vat_prorata_list_declarations_request.rb +9 -0
  99. data/lib/nordlet/declarations/types/vat_prorata_list_declarations_response.rb +11 -0
  100. data/lib/nordlet/declarations/types/vat_prorata_list_declarations_response_rows_item.rb +13 -0
  101. data/lib/nordlet/declarations/types/vat_prorata_set_declarations_request.rb +13 -0
  102. data/lib/nordlet/declarations/types/vat_prorata_set_declarations_response.rb +13 -0
  103. data/lib/nordlet/document_series/client.rb +2 -1
  104. data/lib/nordlet/files/client.rb +2 -2
  105. data/lib/nordlet/fleet/client.rb +3 -1
  106. data/lib/nordlet/hr/client.rb +10 -5
  107. data/lib/nordlet/inventory/client.rb +14 -6
  108. data/lib/nordlet/inventory/types/stock_receive_inventory_request.rb +2 -0
  109. data/lib/nordlet/inventory/types/stock_receive_inventory_response.rb +4 -0
  110. data/lib/nordlet/inventory/types/stock_receive_inventory_response_warnings_item.rb +15 -0
  111. data/lib/nordlet/leads/client.rb +2 -1
  112. data/lib/nordlet/ledger/client.rb +176 -10
  113. data/lib/nordlet/ledger/types/accruals_create_ledger_request.rb +15 -0
  114. data/lib/nordlet/ledger/types/accruals_create_ledger_request_lines_item.rb +19 -0
  115. data/lib/nordlet/ledger/types/accruals_create_ledger_response.rb +17 -0
  116. data/lib/nordlet/ledger/types/fx_revaluation_reverse_ledger_request.rb +13 -0
  117. data/lib/nordlet/ledger/types/fx_revaluation_reverse_ledger_response.rb +13 -0
  118. data/lib/nordlet/ledger/types/fx_revaluation_run_ledger_request.rb +11 -0
  119. data/lib/nordlet/ledger/types/fx_revaluation_run_ledger_response.rb +25 -0
  120. data/lib/nordlet/ledger/types/fx_revaluation_run_ledger_response_lines_item.rb +19 -0
  121. data/lib/nordlet/ledger/types/fx_revaluation_run_ledger_response_lines_item_kind.rb +15 -0
  122. data/lib/nordlet/ledger/types/journal_transactions_create_ledger_request_entries_item.rb +2 -0
  123. data/lib/nordlet/ledger/types/journal_transactions_get_ledger_response_entries_item.rb +2 -0
  124. data/lib/nordlet/ledger/types/posting_rules_update_ledger_request_rules_item_key.rb +7 -0
  125. data/lib/nordlet/ledger/types/tax_provision_post_ledger_request.rb +13 -0
  126. data/lib/nordlet/ledger/types/tax_provision_post_ledger_response.rb +17 -0
  127. data/lib/nordlet/migration/client.rb +5 -1
  128. data/lib/nordlet/operation_types/client.rb +4 -1
  129. data/lib/nordlet/partners/client.rb +14 -10
  130. data/lib/nordlet/partners/types/find_or_create_partners_request.rb +2 -0
  131. data/lib/nordlet/payroll/client.rb +24 -19
  132. data/lib/nordlet/payroll/types/runs_approve_payroll_request.rb +4 -0
  133. data/lib/nordlet/platform_sellers/client.rb +3 -1
  134. data/lib/nordlet/production/client.rb +4 -2
  135. data/lib/nordlet/projects/client.rb +3 -2
  136. data/lib/nordlet/public/types/invoices_get_public_response_status.rb +1 -0
  137. data/lib/nordlet/purchases/client.rb +26 -13
  138. data/lib/nordlet/purchases/types/invoices_create_purchases_response_warnings_item.rb +2 -0
  139. data/lib/nordlet/purchases/types/invoices_register_purchases_response_warnings_item.rb +2 -0
  140. data/lib/nordlet/reference/client.rb +4 -1
  141. data/lib/nordlet/review/client.rb +55 -0
  142. data/lib/nordlet/review/types/queue_list_review_request.rb +9 -0
  143. data/lib/nordlet/review/types/queue_list_review_response.rb +13 -0
  144. data/lib/nordlet/review/types/queue_list_review_response_items_item.rb +19 -0
  145. data/lib/nordlet/review/types/queue_list_review_response_items_item_kind.rb +16 -0
  146. data/lib/nordlet/sales/client.rb +65 -17
  147. data/lib/nordlet/sales/types/invoices_apply_advance_sales_response.rb +6 -0
  148. data/lib/nordlet/sales/types/invoices_apply_advance_sales_response_lines_item.rb +2 -0
  149. data/lib/nordlet/sales/types/invoices_apply_advance_sales_response_status.rb +1 -0
  150. data/lib/nordlet/sales/types/invoices_create_sales_request_lines_item.rb +2 -0
  151. data/lib/nordlet/sales/types/invoices_create_sales_response.rb +6 -0
  152. data/lib/nordlet/sales/types/invoices_create_sales_response_lines_item.rb +2 -0
  153. data/lib/nordlet/sales/types/invoices_create_sales_response_status.rb +1 -0
  154. data/lib/nordlet/sales/types/invoices_create_sales_response_warnings_item.rb +2 -0
  155. data/lib/nordlet/sales/types/invoices_get_sales_response.rb +6 -0
  156. data/lib/nordlet/sales/types/invoices_get_sales_response_lines_item.rb +2 -0
  157. data/lib/nordlet/sales/types/invoices_get_sales_response_status.rb +1 -0
  158. data/lib/nordlet/sales/types/invoices_issue_sales_response.rb +6 -0
  159. data/lib/nordlet/sales/types/invoices_issue_sales_response_lines_item.rb +2 -0
  160. data/lib/nordlet/sales/types/invoices_issue_sales_response_status.rb +1 -0
  161. data/lib/nordlet/sales/types/invoices_issue_sales_response_warnings_item.rb +2 -0
  162. data/lib/nordlet/sales/types/invoices_list_sales_response_rows_item.rb +6 -0
  163. data/lib/nordlet/sales/types/invoices_list_sales_response_rows_item_status.rb +1 -0
  164. data/lib/nordlet/sales/types/invoices_lock_sales_response.rb +6 -0
  165. data/lib/nordlet/sales/types/invoices_lock_sales_response_lines_item.rb +2 -0
  166. data/lib/nordlet/sales/types/invoices_lock_sales_response_status.rb +1 -0
  167. data/lib/nordlet/sales/types/invoices_reverse_sales_request.rb +13 -0
  168. data/lib/nordlet/sales/types/invoices_reverse_sales_response.rb +149 -0
  169. data/lib/nordlet/sales/types/invoices_reverse_sales_response_lines_item.rb +61 -0
  170. data/lib/nordlet/sales/types/invoices_reverse_sales_response_lines_item_recognition_method.rb +16 -0
  171. data/lib/nordlet/sales/types/invoices_reverse_sales_response_lines_item_recognition_milestones_item.rb +15 -0
  172. data/lib/nordlet/sales/types/invoices_reverse_sales_response_payment_status.rb +15 -0
  173. data/lib/nordlet/sales/types/invoices_reverse_sales_response_status.rb +15 -0
  174. data/lib/nordlet/sales/types/invoices_reverse_sales_response_type.rb +16 -0
  175. data/lib/nordlet/sales/types/invoices_reverse_sales_response_vat_evidence.rb +25 -0
  176. data/lib/nordlet/sales/types/invoices_reverse_sales_response_vat_evidence_location.rb +13 -0
  177. data/lib/nordlet/sales/types/invoices_reverse_sales_response_vat_evidence_partner.rb +17 -0
  178. data/lib/nordlet/sales/types/invoices_reverse_sales_response_vat_evidence_rate_table.rb +17 -0
  179. data/lib/nordlet/sales/types/invoices_reverse_sales_response_vat_evidence_rates_item.rb +15 -0
  180. data/lib/nordlet/sales/types/invoices_reverse_sales_response_vat_evidence_scheme.rb +15 -0
  181. data/lib/nordlet/sales/types/invoices_reverse_sales_response_vat_evidence_vies.rb +23 -0
  182. data/lib/nordlet/sales/types/invoices_reverse_sales_response_vat_scheme.rb +21 -0
  183. data/lib/nordlet/sales/types/invoices_unlock_sales_response.rb +6 -0
  184. data/lib/nordlet/sales/types/invoices_unlock_sales_response_lines_item.rb +2 -0
  185. data/lib/nordlet/sales/types/invoices_unlock_sales_response_status.rb +1 -0
  186. data/lib/nordlet/sales/types/invoices_update_sales_request_lines_item.rb +2 -0
  187. data/lib/nordlet/sales/types/invoices_update_sales_response.rb +6 -0
  188. data/lib/nordlet/sales/types/invoices_update_sales_response_lines_item.rb +2 -0
  189. data/lib/nordlet/sales/types/invoices_update_sales_response_status.rb +1 -0
  190. data/lib/nordlet/sales/types/invoices_view_sales_response_status.rb +1 -0
  191. data/lib/nordlet/transport/client.rb +2 -1
  192. data/lib/nordlet/version.rb +1 -1
  193. data/lib/nordlet/webhooks/types/subscriptions_create_webhooks_request_events_item.rb +3 -0
  194. data/lib/nordlet/webhooks/types/subscriptions_update_webhooks_request_events_item.rb +3 -0
  195. data/lib/nordlet.rb +96 -0
  196. data/reference.md +1259 -481
  197. metadata +98 -2
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 8cd4322ecb70ae6e7a92415d8e62784d375470eb0542dabac4e9e680f1029c6e
4
- data.tar.gz: 54c385e52e560d090c103e905435f94f60dec78fc14365e2021da4281f23e72e
3
+ metadata.gz: 5766e5ba4733482b118fd0ae0cfc53256ca5f44dd697ba123d79ee881d151524
4
+ data.tar.gz: ebd31cdd13cd5f50fe5655d115cb19be52634bcad53371d7eef74fcd89c0241e
5
5
  SHA512:
6
- metadata.gz: bb9a1bcef9a194b5331be8d6cf2d94a628c642841f23b142e731b3aa348ce5ac6aa45f44bb2dfb17ae34f0bae0bd438d3156d7eeff07aad114145df70ee2aff0
7
- data.tar.gz: fb54c998c3149283d2db58cc0457ef75bfaef8dd12b19138388d7f3bc9b01c93c992fad645056ed4dfe49ee4790f9460575ba5260e8cdeac34668cdf946923e8
6
+ metadata.gz: c32ecda6bda2cb1c87f2894b04387383cc3116236ac6504b6b6cde787b081ceee65f532b66e629130f428026e5ff5208757e15d0f3242781ce75b3e0a8933017
7
+ data.tar.gz: f7503e6e6d24022fef8be4f2ad3107f118f303e74da590208f25c24e3e856aae1c097c4f0482fb11e22360e25c1bd4dda9eb99dbcd5c2839744e878e211f5bbd
@@ -633,6 +633,48 @@ module Nordlet
633
633
  end
634
634
  end
635
635
 
636
+ # Return what an agent needs to start working in the active company in one answer: the `profile` (as
637
+ # `account/companies/profile`), the accounting `periods` that are open and locked, the `postingRules` (rule key to
638
+ # account code), the `bankAccounts`, the `vatTypesUsed` on the company's invoice lines with their line counts, the
639
+ # country's `filings` due from 45 days back to 120 days ahead with their calendar `key` (as `calendar/list`
640
+ # returns it), the filing `system`, whether the file can be built (`canDownload`) or sent (`canSubmit`) and the
641
+ # `missingSettings` of the filing system (`declarations/configs/update` with the `system` and the `keys` that have
642
+ # no stored value; a filing may not need every key of its system), and the `payroll` options: the employee fields
643
+ # (`hr/employees/fields`) the country's payroll engine reads. An API key reads the company named in the
644
+ # `x-nordlet-company` header and needs the `account:read` scope.
645
+ #
646
+ # @param request_options [Hash]
647
+ # @param params [Nordlet::Account::Types::CompaniesContextAccountRequest]
648
+ # @option request_options [String] :base_url
649
+ # @option request_options [Hash{String => Object}] :additional_headers
650
+ # @option request_options [Hash{String => Object}] :additional_query_parameters
651
+ # @option request_options [Hash{String => Object}] :additional_body_parameters
652
+ # @option request_options [Integer] :timeout_in_seconds
653
+ #
654
+ # @return [Nordlet::Account::Types::CompaniesContextAccountResponse]
655
+ def companies_context(request_options: {}, **params)
656
+ params = Nordlet::Internal::Types::Utils.normalize_keys(params)
657
+ request = Nordlet::Internal::JSON::Request.new(
658
+ base_url: request_options[:base_url],
659
+ method: "POST",
660
+ path: "v1/account/companies/context",
661
+ body: Nordlet::Account::Types::CompaniesContextAccountRequest.new(params).to_h,
662
+ request_options: request_options
663
+ )
664
+ begin
665
+ response = @client.send(request)
666
+ rescue Net::HTTPRequestTimeout
667
+ raise Nordlet::Errors::TimeoutError
668
+ end
669
+ code = response.code.to_i
670
+ if code.between?(200, 299)
671
+ Nordlet::Account::Types::CompaniesContextAccountResponse.load(response.body)
672
+ else
673
+ error_class = Nordlet::Errors::ResponseError.subclass_for_code(code)
674
+ raise error_class.new(response.body, code: code)
675
+ end
676
+ end
677
+
636
678
  # Change the profile of the active company; owners and admins may call it. Only the fields sent are changed, and
637
679
  # the nullable ones can be sent as null to clear them. `logo` stores a base64-encoded image as a file of the
638
680
  # company and sets `logoFileId`. The country, base currency, sandbox flag and cash-basis flag are fixed at
@@ -0,0 +1,9 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Nordlet
4
+ module Account
5
+ module Types
6
+ class CompaniesContextAccountRequest < Internal::Types::Model; end
7
+ end
8
+ end
9
+ end
@@ -0,0 +1,23 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Nordlet
4
+ module Account
5
+ module Types
6
+ class CompaniesContextAccountResponse < Internal::Types::Model
7
+ field :periods, -> { Nordlet::Account::Types::CompaniesContextAccountResponsePeriods }, optional: false, nullable: false
8
+
9
+ field :posting_rules, -> { Internal::Types::Hash[String, String] }, optional: false, nullable: false, api_name: "postingRules"
10
+
11
+ field :bank_accounts, -> { Internal::Types::Array[Nordlet::Account::Types::CompaniesContextAccountResponseBankAccountsItem] }, optional: false, nullable: false, api_name: "bankAccounts"
12
+
13
+ field :vat_types_used, -> { Internal::Types::Array[Nordlet::Account::Types::CompaniesContextAccountResponseVatTypesUsedItem] }, optional: false, nullable: false, api_name: "vatTypesUsed"
14
+
15
+ field :filings, -> { Internal::Types::Array[Nordlet::Account::Types::CompaniesContextAccountResponseFilingsItem] }, optional: false, nullable: false
16
+
17
+ field :payroll, -> { Nordlet::Account::Types::CompaniesContextAccountResponsePayroll }, optional: false, nullable: false
18
+
19
+ field :profile, -> { Nordlet::Account::Types::CompaniesContextAccountResponseProfile }, optional: false, nullable: false
20
+ end
21
+ end
22
+ end
23
+ end
@@ -0,0 +1,23 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Nordlet
4
+ module Account
5
+ module Types
6
+ class CompaniesContextAccountResponseBankAccountsItem < Internal::Types::Model
7
+ field :id, -> { String }, optional: false, nullable: false
8
+
9
+ field :name, -> { String }, optional: false, nullable: false
10
+
11
+ field :type, -> { String }, optional: false, nullable: false
12
+
13
+ field :iban, -> { String }, optional: false, nullable: true
14
+
15
+ field :currency, -> { String }, optional: false, nullable: false
16
+
17
+ field :account_code, -> { String }, optional: false, nullable: false, api_name: "accountCode"
18
+
19
+ field :is_active, -> { Internal::Types::Boolean }, optional: false, nullable: false, api_name: "isActive"
20
+ end
21
+ end
22
+ end
23
+ end
@@ -0,0 +1,27 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Nordlet
4
+ module Account
5
+ module Types
6
+ class CompaniesContextAccountResponseFilingsItem < Internal::Types::Model
7
+ field :key, -> { String }, optional: false, nullable: false
8
+
9
+ field :rule_key, -> { String }, optional: false, nullable: false, api_name: "ruleKey"
10
+
11
+ field :period, -> { String }, optional: false, nullable: false
12
+
13
+ field :title, -> { String }, optional: false, nullable: false
14
+
15
+ field :due_date, -> { String }, optional: false, nullable: false, api_name: "dueDate"
16
+
17
+ field :system, -> { String }, optional: false, nullable: true
18
+
19
+ field :can_download, -> { Internal::Types::Boolean }, optional: false, nullable: false, api_name: "canDownload"
20
+
21
+ field :can_submit, -> { Internal::Types::Boolean }, optional: false, nullable: false, api_name: "canSubmit"
22
+
23
+ field :missing_settings, -> { Nordlet::Account::Types::CompaniesContextAccountResponseFilingsItemMissingSettings }, optional: false, nullable: true, api_name: "missingSettings"
24
+ end
25
+ end
26
+ end
27
+ end
@@ -0,0 +1,17 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Nordlet
4
+ module Account
5
+ module Types
6
+ class CompaniesContextAccountResponseFilingsItemMissingSettings < Internal::Types::Model
7
+ field :operation, -> { Nordlet::Account::Types::CompaniesContextAccountResponseFilingsItemMissingSettingsOperation }, optional: false, nullable: false
8
+
9
+ field :system, -> { String }, optional: false, nullable: false
10
+
11
+ field :keys, -> { Internal::Types::Array[String] }, optional: false, nullable: false
12
+
13
+ field :call, -> { String }, optional: false, nullable: false
14
+ end
15
+ end
16
+ end
17
+ end
@@ -0,0 +1,13 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Nordlet
4
+ module Account
5
+ module Types
6
+ module CompaniesContextAccountResponseFilingsItemMissingSettingsOperation
7
+ extend Nordlet::Internal::Types::Enum
8
+
9
+ DECLARATIONS_CONFIGS_UPDATE = "declarations/configs/update"
10
+ end
11
+ end
12
+ end
13
+ end
@@ -0,0 +1,15 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Nordlet
4
+ module Account
5
+ module Types
6
+ class CompaniesContextAccountResponsePayroll < Internal::Types::Model
7
+ field :country, -> { String }, optional: false, nullable: false
8
+
9
+ field :engine, -> { Internal::Types::Boolean }, optional: false, nullable: false
10
+
11
+ field :employee_fields, -> { Internal::Types::Array[Nordlet::Account::Types::CompaniesContextAccountResponsePayrollEmployeeFieldsItem] }, optional: false, nullable: false, api_name: "employeeFields"
12
+ end
13
+ end
14
+ end
15
+ end
@@ -0,0 +1,17 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Nordlet
4
+ module Account
5
+ module Types
6
+ class CompaniesContextAccountResponsePayrollEmployeeFieldsItem < Internal::Types::Model
7
+ field :key, -> { String }, optional: false, nullable: false
8
+
9
+ field :kind, -> { Nordlet::Account::Types::CompaniesContextAccountResponsePayrollEmployeeFieldsItemKind }, optional: false, nullable: false
10
+
11
+ field :options, -> { Internal::Types::Array[String] }, optional: true, nullable: false
12
+
13
+ field :max_length, -> { Integer }, optional: true, nullable: false, api_name: "maxLength"
14
+ end
15
+ end
16
+ end
17
+ end
@@ -0,0 +1,15 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Nordlet
4
+ module Account
5
+ module Types
6
+ module CompaniesContextAccountResponsePayrollEmployeeFieldsItemKind
7
+ extend Nordlet::Internal::Types::Enum
8
+
9
+ TEXT = "text"
10
+ SELECT = "select"
11
+ DATE = "date"
12
+ end
13
+ end
14
+ end
15
+ end
@@ -0,0 +1,13 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Nordlet
4
+ module Account
5
+ module Types
6
+ class CompaniesContextAccountResponsePeriods < Internal::Types::Model
7
+ field :open, -> { Internal::Types::Array[Nordlet::Account::Types::CompaniesContextAccountResponsePeriodsOpenItem] }, optional: false, nullable: false
8
+
9
+ field :locked, -> { Internal::Types::Array[Nordlet::Account::Types::CompaniesContextAccountResponsePeriodsLockedItem] }, 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 Account
5
+ module Types
6
+ class CompaniesContextAccountResponsePeriodsLockedItem < Internal::Types::Model
7
+ field :year, -> { Integer }, optional: false, nullable: false
8
+
9
+ field :month, -> { Integer }, 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 Account
5
+ module Types
6
+ class CompaniesContextAccountResponsePeriodsOpenItem < Internal::Types::Model
7
+ field :year, -> { Integer }, optional: false, nullable: false
8
+
9
+ field :month, -> { Integer }, optional: false, nullable: false
10
+ end
11
+ end
12
+ end
13
+ end
@@ -0,0 +1,95 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Nordlet
4
+ module Account
5
+ module Types
6
+ class CompaniesContextAccountResponseProfile < Internal::Types::Model
7
+ field :id, -> { String }, optional: false, nullable: false
8
+
9
+ field :name, -> { String }, optional: false, nullable: false
10
+
11
+ field :code, -> { String }, optional: false, nullable: true
12
+
13
+ field :vat_code, -> { String }, optional: false, nullable: true, api_name: "vatCode"
14
+
15
+ field :sme_exemption_number, -> { String }, optional: false, nullable: true, api_name: "smeExemptionNumber"
16
+
17
+ field :is_vat_payer, -> { Internal::Types::Boolean }, optional: false, nullable: false, api_name: "isVatPayer"
18
+
19
+ field :is_sandbox, -> { Internal::Types::Boolean }, optional: false, nullable: false, api_name: "isSandbox"
20
+
21
+ field :cash_basis, -> { Internal::Types::Boolean }, optional: false, nullable: false, api_name: "cashBasis"
22
+
23
+ field :country_code, -> { String }, optional: false, nullable: false, api_name: "countryCode"
24
+
25
+ field :chart_template, -> { String }, optional: false, nullable: false, api_name: "chartTemplate"
26
+
27
+ field :country_chart_template, -> { String }, optional: false, nullable: false, api_name: "countryChartTemplate"
28
+
29
+ field :base_currency, -> { String }, optional: false, nullable: false, api_name: "baseCurrency"
30
+
31
+ field :default_invoice_currency, -> { String }, optional: false, nullable: false, api_name: "defaultInvoiceCurrency"
32
+
33
+ field :status, -> { Nordlet::Account::Types::CompaniesContextAccountResponseProfileStatus }, optional: false, nullable: false
34
+
35
+ field :address, -> { Nordlet::Account::Types::CompaniesContextAccountResponseProfileAddress }, optional: false, nullable: true
36
+
37
+ field :email, -> { String }, optional: false, nullable: true
38
+
39
+ field :phone, -> { String }, optional: false, nullable: true
40
+
41
+ field :iban, -> { String }, optional: false, nullable: true
42
+
43
+ field :bank_name, -> { String }, optional: false, nullable: true, api_name: "bankName"
44
+
45
+ field :bank_bic, -> { String }, optional: false, nullable: true, api_name: "bankBic"
46
+
47
+ field :bank_code, -> { String }, optional: false, nullable: true, api_name: "bankCode"
48
+
49
+ field :bank_branch_code, -> { String }, optional: false, nullable: true, api_name: "bankBranchCode"
50
+
51
+ field :bank_account_number, -> { String }, optional: false, nullable: true, api_name: "bankAccountNumber"
52
+
53
+ field :invoice_prefix, -> { String }, optional: false, nullable: false, api_name: "invoicePrefix"
54
+
55
+ field :next_invoice_number, -> { String }, optional: false, nullable: false, api_name: "nextInvoiceNumber"
56
+
57
+ field :default_invoice_locale, -> { String }, optional: false, nullable: true, api_name: "defaultInvoiceLocale"
58
+
59
+ field :default_invoice_note, -> { String }, optional: false, nullable: true, api_name: "defaultInvoiceNote"
60
+
61
+ field :peppol_id, -> { String }, optional: false, nullable: true, api_name: "peppolId"
62
+
63
+ field :sepa_creditor_id, -> { String }, optional: false, nullable: true, api_name: "sepaCreditorId"
64
+
65
+ field :logo_file_id, -> { String }, optional: false, nullable: true, api_name: "logoFileId"
66
+
67
+ field :legal_form, -> { String }, optional: false, nullable: true, api_name: "legalForm"
68
+
69
+ field :registry_name, -> { String }, optional: false, nullable: true, api_name: "registryName"
70
+
71
+ field :incorporated_on, -> { String }, optional: false, nullable: true, api_name: "incorporatedOn"
72
+
73
+ field :share_capital, -> { String }, optional: false, nullable: true, api_name: "shareCapital"
74
+
75
+ field :accounts_kept_by, -> { Nordlet::Account::Types::CompaniesContextAccountResponseProfileAccountsKeptBy }, optional: false, nullable: true, api_name: "accountsKeptBy"
76
+
77
+ field :vat_period, -> { Nordlet::Account::Types::CompaniesContextAccountResponseProfileVatPeriod }, optional: false, nullable: true, api_name: "vatPeriod"
78
+
79
+ field :fiscal_year_end_month, -> { Integer }, optional: false, nullable: true, api_name: "fiscalYearEndMonth"
80
+
81
+ field :time_zone, -> { String }, optional: false, nullable: false, api_name: "timeZone"
82
+
83
+ field :filing_options, -> { Internal::Types::Hash[String, String] }, optional: false, nullable: true, api_name: "filingOptions"
84
+
85
+ field :bookkeeper_name, -> { String }, optional: false, nullable: true, api_name: "bookkeeperName"
86
+
87
+ field :auditor_name, -> { String }, optional: false, nullable: true, api_name: "auditorName"
88
+
89
+ field :auditor_registration_number, -> { String }, optional: false, nullable: true, api_name: "auditorRegistrationNumber"
90
+
91
+ field :audit_required, -> { Internal::Types::Boolean }, optional: false, nullable: false, api_name: "auditRequired"
92
+ end
93
+ end
94
+ end
95
+ end
@@ -0,0 +1,14 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Nordlet
4
+ module Account
5
+ module Types
6
+ module CompaniesContextAccountResponseProfileAccountsKeptBy
7
+ extend Nordlet::Internal::Types::Enum
8
+
9
+ COMPANY = "company"
10
+ EXTERNAL = "external"
11
+ end
12
+ end
13
+ end
14
+ end
@@ -0,0 +1,17 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Nordlet
4
+ module Account
5
+ module Types
6
+ class CompaniesContextAccountResponseProfileAddress < Internal::Types::Model
7
+ field :street, -> { String }, optional: true, nullable: false
8
+
9
+ field :city, -> { String }, optional: true, nullable: false
10
+
11
+ field :postal_code, -> { String }, optional: true, nullable: false, api_name: "postalCode"
12
+
13
+ field :country_code, -> { String }, optional: true, nullable: false, api_name: "countryCode"
14
+ end
15
+ end
16
+ end
17
+ end
@@ -0,0 +1,15 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Nordlet
4
+ module Account
5
+ module Types
6
+ module CompaniesContextAccountResponseProfileStatus
7
+ extend Nordlet::Internal::Types::Enum
8
+
9
+ ACTIVE = "active"
10
+ ARCHIVED = "archived"
11
+ DELETED = "deleted"
12
+ end
13
+ end
14
+ end
15
+ end
@@ -0,0 +1,17 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Nordlet
4
+ module Account
5
+ module Types
6
+ module CompaniesContextAccountResponseProfileVatPeriod
7
+ extend Nordlet::Internal::Types::Enum
8
+
9
+ MONTHLY = "monthly"
10
+ BIMONTHLY = "bimonthly"
11
+ QUARTERLY = "quarterly"
12
+ SEMIANNUAL = "semiannual"
13
+ ANNUAL = "annual"
14
+ end
15
+ end
16
+ end
17
+ end
@@ -0,0 +1,19 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Nordlet
4
+ module Account
5
+ module Types
6
+ class CompaniesContextAccountResponseVatTypesUsedItem < Internal::Types::Model
7
+ field :code, -> { String }, optional: false, nullable: false
8
+
9
+ field :name, -> { String }, optional: false, nullable: true
10
+
11
+ field :rate_percent, -> { String }, optional: false, nullable: true, api_name: "ratePercent"
12
+
13
+ field :sale_lines, -> { Integer }, optional: false, nullable: false, api_name: "saleLines"
14
+
15
+ field :purchase_lines, -> { Integer }, optional: false, nullable: false, api_name: "purchaseLines"
16
+ end
17
+ end
18
+ end
19
+ end
@@ -290,7 +290,9 @@ module Nordlet
290
290
 
291
291
  # List the company's agreements without their items, each with `partnerName`. Filterable by `number`, `name`,
292
292
  # `partnerId`, `employeeId`, `bankAccountId`, `kind`, `typeId`, `status`, `startDate`, `endDate` and `value`;
293
- # sortable by `number`, `startDate` and `createdAt` (default `startDate` descending).
293
+ # sortable by `number`, `startDate`, `createdAt`, `name`, `partyName` (the partner name, else the employee name,
294
+ # else the bank account name), `kind`, `endDate`, `status`, `value` and `documentRef` (default `startDate`
295
+ # descending).
294
296
  #
295
297
  # @param request_options [Hash]
296
298
  # @param params [Nordlet::Agreements::Types::AgreementsListAgreementsRequest]
@@ -297,7 +297,10 @@ module Nordlet
297
297
  end
298
298
 
299
299
  # List the fixed assets; filterable by `code`, `name`, `groupId`, `status`, `acquisitionDate`, `acquisitionCost`
300
- # and `accumulatedDepreciation`, sortable by `code`, `name`, `acquisitionDate` and `acquisitionCost`.
300
+ # and `accumulatedDepreciation`, sortable by `code`, `name`, `acquisitionDate`, `acquisitionCost`, `groupName`
301
+ # (the name of the asset group), `vehiclePlate` (the plate number of the linked vehicle), `status`, `totalCost`
302
+ # (the acquisition cost plus the modernisations), `accumulatedDepreciation` and `netBookValue` (the total cost
303
+ # less the accumulated depreciation, zero when disposed).
301
304
  #
302
305
  # @param request_options [Hash]
303
306
  # @param params [Nordlet::Assets::Types::AssetsListAssetsRequest]
@@ -371,7 +374,11 @@ module Nordlet
371
374
  # Dispose of a fixed asset (sold, scrapped or written off). Removes its cost and accumulated depreciation, books
372
375
  # the net book value as a disposal loss and the proceeds as a disposal gain (posting rules assets.disposalLoss,
373
376
  # assets.disposalGain, assets.disposalProceeds), and stops its depreciation. Depreciation must be posted for every
374
- # month before the disposal month.
377
+ # month before the disposal month. With `saleInvoiceId` (reason `sold`) the proceeds are the net of the issued
378
+ # invoice lines that name this asset (`assetId` on the sales invoice line, converted to the base currency at the
379
+ # invoice rate), `proceeds` must then be omitted, the buyer is the partner of the disposal entry, and the
380
+ # receivable and the VAT stay on the invoice; 422 when the invoice is not an issued invoice, has no line for the
381
+ # asset, or when `proceeds` is given with it.
375
382
  #
376
383
  # @param request_options [Hash]
377
384
  # @param params [Nordlet::Assets::Types::AssetsDisposeAssetsRequest]
@@ -56,6 +56,8 @@ module Nordlet
56
56
 
57
57
  field :disposal_journal_transaction_id, -> { String }, optional: false, nullable: true, api_name: "disposalJournalTransactionId"
58
58
 
59
+ field :disposal_sale_invoice_id, -> { String }, optional: false, nullable: true, api_name: "disposalSaleInvoiceId"
60
+
59
61
  field :created_at, -> { String }, optional: false, nullable: false, api_name: "createdAt"
60
62
  end
61
63
  end
@@ -12,6 +12,8 @@ module Nordlet
12
12
 
13
13
  field :proceeds, -> { String }, optional: true, nullable: false
14
14
 
15
+ field :sale_invoice_id, -> { String }, optional: true, nullable: false, api_name: "saleInvoiceId"
16
+
15
17
  field :notes, -> { String }, optional: true, nullable: false
16
18
  end
17
19
  end
@@ -56,6 +56,8 @@ module Nordlet
56
56
 
57
57
  field :disposal_journal_transaction_id, -> { String }, optional: false, nullable: true, api_name: "disposalJournalTransactionId"
58
58
 
59
+ field :disposal_sale_invoice_id, -> { String }, optional: false, nullable: true, api_name: "disposalSaleInvoiceId"
60
+
59
61
  field :created_at, -> { String }, optional: false, nullable: false, api_name: "createdAt"
60
62
  end
61
63
  end
@@ -56,6 +56,8 @@ module Nordlet
56
56
 
57
57
  field :disposal_journal_transaction_id, -> { String }, optional: false, nullable: true, api_name: "disposalJournalTransactionId"
58
58
 
59
+ field :disposal_sale_invoice_id, -> { String }, optional: false, nullable: true, api_name: "disposalSaleInvoiceId"
60
+
59
61
  field :created_at, -> { String }, optional: false, nullable: false, api_name: "createdAt"
60
62
  end
61
63
  end
@@ -56,6 +56,8 @@ module Nordlet
56
56
 
57
57
  field :disposal_journal_transaction_id, -> { String }, optional: false, nullable: true, api_name: "disposalJournalTransactionId"
58
58
 
59
+ field :disposal_sale_invoice_id, -> { String }, optional: false, nullable: true, api_name: "disposalSaleInvoiceId"
60
+
59
61
  field :created_at, -> { String }, optional: false, nullable: false, api_name: "createdAt"
60
62
  end
61
63
  end
@@ -56,6 +56,8 @@ module Nordlet
56
56
 
57
57
  field :disposal_journal_transaction_id, -> { String }, optional: false, nullable: true, api_name: "disposalJournalTransactionId"
58
58
 
59
+ field :disposal_sale_invoice_id, -> { String }, optional: false, nullable: true, api_name: "disposalSaleInvoiceId"
60
+
59
61
  field :created_at, -> { String }, optional: false, nullable: false, api_name: "createdAt"
60
62
  end
61
63
  end
@@ -56,6 +56,8 @@ module Nordlet
56
56
 
57
57
  field :disposal_journal_transaction_id, -> { String }, optional: false, nullable: true, api_name: "disposalJournalTransactionId"
58
58
 
59
+ field :disposal_sale_invoice_id, -> { String }, optional: false, nullable: true, api_name: "disposalSaleInvoiceId"
60
+
59
61
  field :created_at, -> { String }, optional: false, nullable: false, api_name: "createdAt"
60
62
  end
61
63
  end
@@ -56,6 +56,8 @@ module Nordlet
56
56
 
57
57
  field :disposal_journal_transaction_id, -> { String }, optional: false, nullable: true, api_name: "disposalJournalTransactionId"
58
58
 
59
+ field :disposal_sale_invoice_id, -> { String }, optional: false, nullable: true, api_name: "disposalSaleInvoiceId"
60
+
59
61
  field :created_at, -> { String }, optional: false, nullable: false, api_name: "createdAt"
60
62
  end
61
63
  end
@@ -11,8 +11,9 @@ module Nordlet
11
11
  end
12
12
 
13
13
  # List the audit log of the company: who did what to which entity, with the recorded change in `diff`. Filterable
14
- # by `action`, `entity`, `entityId`, `actorType` and `actorId`; sortable by `createdAt` and `id`, newest first by
15
- # default.
14
+ # by `action`, `entity`, `entityId`, `actorType` and `actorId`; sortable by `createdAt`, `id`, `actor` (the actor
15
+ # type, then the start of the actor id), `action`, `entity` (the entity, then the start of the entity id) and
16
+ # `diff` (the recorded change as text), newest first by default.
16
17
  #
17
18
  # @param request_options [Hash]
18
19
  # @param params [Nordlet::Audit::Types::ListAuditRequest]