checkbiz 1.0.0

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 (93) hide show
  1. checksums.yaml +7 -0
  2. data/README.md +154 -0
  3. data/checkbiz.gemspec +32 -0
  4. data/lib/checkbiz/resource.rb +23 -0
  5. data/lib/checkbiz/resources/address_information.rb +17 -0
  6. data/lib/checkbiz/resources/bolagsverket.rb +17 -0
  7. data/lib/checkbiz/resources/company_annual_report.rb +13 -0
  8. data/lib/checkbiz/resources/company_annual_reports.rb +13 -0
  9. data/lib/checkbiz/resources/company_articles_of_association.rb +13 -0
  10. data/lib/checkbiz/resources/company_autocomplete.rb +13 -0
  11. data/lib/checkbiz/resources/company_beneficial_owner.rb +15 -0
  12. data/lib/checkbiz/resources/company_certificates_of_registration.rb +13 -0
  13. data/lib/checkbiz/resources/company_credit_template.rb +23 -0
  14. data/lib/checkbiz/resources/company_event.rb +29 -0
  15. data/lib/checkbiz/resources/company_information.rb +41 -0
  16. data/lib/checkbiz/resources/company_information_list.rb +14 -0
  17. data/lib/checkbiz/resources/company_search.rb +13 -0
  18. data/lib/checkbiz/resources/company_search_advanced.rb +13 -0
  19. data/lib/checkbiz/resources/company_worksite.rb +13 -0
  20. data/lib/checkbiz/resources/custom_list.rb +31 -0
  21. data/lib/checkbiz/resources/data_factory_person_search.rb +14 -0
  22. data/lib/checkbiz/resources/extended_search_no.rb +14 -0
  23. data/lib/checkbiz/resources/geomatics.rb +13 -0
  24. data/lib/checkbiz/resources/heartbeat.rb +9 -0
  25. data/lib/checkbiz/resources/lookup_company_no.rb +14 -0
  26. data/lib/checkbiz/resources/lookup_id_no.rb +14 -0
  27. data/lib/checkbiz/resources/lookup_phone_no.rb +14 -0
  28. data/lib/checkbiz/resources/nix.rb +11 -0
  29. data/lib/checkbiz/resources/package_calls.rb +13 -0
  30. data/lib/checkbiz/resources/package_information.rb +13 -0
  31. data/lib/checkbiz/resources/person_beneficial_owner.rb +24 -0
  32. data/lib/checkbiz/resources/person_credit_template.rb +23 -0
  33. data/lib/checkbiz/resources/person_event.rb +18 -0
  34. data/lib/checkbiz/resources/person_information.rb +47 -0
  35. data/lib/checkbiz/resources/person_information_list.rb +14 -0
  36. data/lib/checkbiz/resources/person_search.rb +15 -0
  37. data/lib/checkbiz/resources/person_search_advanced.rb +15 -0
  38. data/lib/checkbiz/resources/person_verify.rb +15 -0
  39. data/lib/checkbiz/resources/pts_info.rb +13 -0
  40. data/lib/checkbiz/resources/safenode_company_credit_report.rb +14 -0
  41. data/lib/checkbiz/resources/safenode_company_remark_control.rb +14 -0
  42. data/lib/checkbiz/resources/safenode_person_credit_report.rb +14 -0
  43. data/lib/checkbiz/resources/safenode_person_remark_control.rb +14 -0
  44. data/lib/checkbiz/resources/search_no.rb +14 -0
  45. data/lib/checkbiz/resources/signatory.rb +15 -0
  46. data/lib/checkbiz/resources/spar.rb +13 -0
  47. data/lib/checkbiz/resources/statistics.rb +14 -0
  48. data/lib/checkbiz/resources/subscriber.rb +17 -0
  49. data/lib/checkbiz/resources/subscriber_list.rb +16 -0
  50. data/lib/checkbiz/resources/url.rb +16 -0
  51. data/lib/checkbiz/resources/url_search.rb +16 -0
  52. data/lib/checkbiz/types/address_information.rb +136 -0
  53. data/lib/checkbiz/types/bolagsverket.rb +1012 -0
  54. data/lib/checkbiz/types/common.rb +503 -0
  55. data/lib/checkbiz/types/company_advanced_search.rb +38 -0
  56. data/lib/checkbiz/types/company_annual_reports.rb +17 -0
  57. data/lib/checkbiz/types/company_autocomplete.rb +25 -0
  58. data/lib/checkbiz/types/company_credit_template.rb +54 -0
  59. data/lib/checkbiz/types/company_event.rb +37 -0
  60. data/lib/checkbiz/types/company_information.rb +460 -0
  61. data/lib/checkbiz/types/company_information_list.rb +15 -0
  62. data/lib/checkbiz/types/company_search.rb +38 -0
  63. data/lib/checkbiz/types/company_worksite.rb +18 -0
  64. data/lib/checkbiz/types/custom_list_add.rb +16 -0
  65. data/lib/checkbiz/types/custom_list_get.rb +17 -0
  66. data/lib/checkbiz/types/data_factory_person_search.rb +117 -0
  67. data/lib/checkbiz/types/geomatic.rb +140 -0
  68. data/lib/checkbiz/types/lookup_company_no.rb +57 -0
  69. data/lib/checkbiz/types/lookup_id_no.rb +22 -0
  70. data/lib/checkbiz/types/lookup_phone_no.rb +29 -0
  71. data/lib/checkbiz/types/package_calls.rb +27 -0
  72. data/lib/checkbiz/types/package_information.rb +23 -0
  73. data/lib/checkbiz/types/person_advanced_search.rb +117 -0
  74. data/lib/checkbiz/types/person_credit_template.rb +61 -0
  75. data/lib/checkbiz/types/person_event.rb +33 -0
  76. data/lib/checkbiz/types/person_information.rb +598 -0
  77. data/lib/checkbiz/types/person_information_list.rb +19 -0
  78. data/lib/checkbiz/types/person_search.rb +88 -0
  79. data/lib/checkbiz/types/person_verify.rb +61 -0
  80. data/lib/checkbiz/types/pts.rb +15 -0
  81. data/lib/checkbiz/types/safenode_company_credit_report.rb +50 -0
  82. data/lib/checkbiz/types/safenode_company_remark_control.rb +29 -0
  83. data/lib/checkbiz/types/safenode_person_credit_report.rb +49 -0
  84. data/lib/checkbiz/types/safenode_person_remark_control.rb +28 -0
  85. data/lib/checkbiz/types/signatory.rb +40 -0
  86. data/lib/checkbiz/types/spar.rb +107 -0
  87. data/lib/checkbiz/types/statistics.rb +33 -0
  88. data/lib/checkbiz/types/subscriber.rb +68 -0
  89. data/lib/checkbiz/types/subscriber_list.rb +49 -0
  90. data/lib/checkbiz/types/subscriber_nix.rb +16 -0
  91. data/lib/checkbiz/version.rb +5 -0
  92. data/lib/checkbiz.rb +26 -0
  93. metadata +233 -0
checksums.yaml ADDED
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA256:
3
+ metadata.gz: b39862dbdbf3fd706db79eac866a201e69d1a238f26bedf7dce37cb4ae9a1a81
4
+ data.tar.gz: ec12732ab50604633fe37c36e5e6f21fb62b776e9ef2cc32c0188fabf8f95b22
5
+ SHA512:
6
+ metadata.gz: '03918bd9aba1fc0a47829b67c5ffbced80785fd989afe21bd8e2472d3e0c5e81fa07b51e73aab57890b863f3403ac3c9e7497ed7732662619bcac4a45482feb5'
7
+ data.tar.gz: ed6c8a084b8c2035b91c0a19f554ccadd4252d62bc03a000692629bf664bee9295dd7398f45c2d4c415b8d093aaabea841503a0eebbdbede23ee22cfbbc1046b
data/README.md ADDED
@@ -0,0 +1,154 @@
1
+ # Checkbiz
2
+
3
+ Ruby wrapper for the [Checkbiz API](https://api.checkbiz.se), built on [rest-easy](https://github.com/accodeing/rest-easy).
4
+
5
+ Provides typed access to Swedish person, company, and credit information services.
6
+
7
+ ## Installation
8
+
9
+ ```ruby
10
+ gem "checkbiz", path: "../checkbiz" # local
11
+ gem "checkbiz", git: "https://github.com/accodeing/checkbiz" # git
12
+ ```
13
+
14
+ ## Configuration
15
+
16
+ ```ruby
17
+ Checkbiz.configure do
18
+ authentication RestEasy::Auth::PSK.new(
19
+ api_key: ENV["CHECKBIZ_API_KEY"],
20
+ header_prefix: "Basic"
21
+ )
22
+ end
23
+ ```
24
+
25
+ ## Usage
26
+
27
+ Every endpoint is a resource class with a `.call` method. Pass query parameters as keyword arguments and the package name via `package:`.
28
+
29
+ ```ruby
30
+ # Company information
31
+ company = Checkbiz::CompanyInformation.call(
32
+ organization_number: "5564866286",
33
+ package: "foretagadress"
34
+ )
35
+ company.name # => PersonNameBlock struct
36
+ company.basic # => CompanyBasicBlock struct
37
+ company.meta.response_code # => "Ok"
38
+
39
+ # Person information
40
+ person = Checkbiz::PersonInformation.call(
41
+ ssn: "194907299289",
42
+ package: "personadress"
43
+ )
44
+ person.basic # => PersonBasicBlock struct
45
+ person.ssn_status # => "Active"
46
+
47
+ # Search
48
+ results = Checkbiz::CompanySearch.call(
49
+ who: "Accodeing",
50
+ max_nr_records: 10,
51
+ package: "sokforetag"
52
+ )
53
+ results.basic_result # => CompanySearchBasicBlock struct
54
+
55
+ # Account info (no package required)
56
+ info = Checkbiz::PackageInformation.call
57
+ info.products # => Array of PackageInformationProductBlock
58
+ ```
59
+
60
+ ### Response metadata
61
+
62
+ `responseCode` and `responseMessage` are extracted into `meta` on every response:
63
+
64
+ ```ruby
65
+ result = Checkbiz::CompanyInformation.call(organization_number: "5564866286", package: "foretagadress")
66
+ result.meta.response_code # => "Ok"
67
+ result.meta.response_message # => nil
68
+ ```
69
+
70
+ ### V2 endpoints
71
+
72
+ Some endpoints have a v2 variant with additional fields:
73
+
74
+ ```ruby
75
+ Checkbiz::CompanyCreditTemplate.call_v2(
76
+ organization_number: "5564866286",
77
+ package: "bas"
78
+ )
79
+ ```
80
+
81
+ ### Custom lists (POST/PUT)
82
+
83
+ ```ruby
84
+ Checkbiz::CustomList.call(package: "bas") # GET
85
+ Checkbiz::CustomList.add(items, package: "bas") # POST
86
+ Checkbiz::CustomList.remove(items, package: "bas") # PUT
87
+ ```
88
+
89
+ ## Available resources
90
+
91
+ ### Account
92
+ - `PackageInformation` - list authorized products and packages
93
+ - `PackageCalls` - usage statistics
94
+
95
+ ### Company
96
+ - `CompanyInformation` - company details by org number
97
+ - `CompanyInformationList` - batch lookup
98
+ - `CompanyCreditTemplate` / `call_v2` - credit reports
99
+ - `CompanyBeneficialOwner` - beneficial ownership
100
+ - `CompanyAnnualReports` - list annual reports
101
+ - `CompanyAnnualReport` - fetch single report by ref number
102
+ - `CompanyArticlesOfAssociation` - articles of association (PDF)
103
+ - `CompanyCertificatesOfRegistration` - registration certificate (PDF)
104
+ - `CompanyWorksite` - worksite info by CFAR number
105
+ - `CompanySearch` - basic company search
106
+ - `CompanySearchAdvanced` - advanced company search
107
+ - `CompanyAutocomplete` - autocomplete suggestions
108
+ - `CompanyEvent` - company events by date range
109
+
110
+ ### Person
111
+ - `PersonInformation` - person details by SSN
112
+ - `PersonInformationList` - batch lookup
113
+ - `PersonCreditTemplate` / `call_v2` - credit reports
114
+ - `PersonBeneficialOwner` - beneficial ownership
115
+ - `PersonSearch` - basic person search
116
+ - `PersonSearchAdvanced` - advanced person search
117
+ - `PersonEvent` - person events by date range
118
+ - `PersonVerify` - identity verification
119
+
120
+ ### Lookups
121
+ - `LookupIdNo` - lookup by ID number
122
+ - `LookupCompanyNo` - lookup by company number
123
+ - `LookupPhoneNo` - lookup by phone number
124
+ - `AddressInformation` - address lookup
125
+ - `Nix` - NIX registry check
126
+
127
+ ### Specialized
128
+ - `Bolagsverket` - Swedish Companies Registration Office data
129
+ - `Signatory` - signatory information
130
+ - `Spar` - SPAR registry
131
+ - `PtsInfo` - PTS phone data
132
+ - `Geomatics` - geographic data
133
+ - `Statistics` - income and economic statistics
134
+ - `DataFactoryPersonSearch` - extended person search
135
+ - `Subscriber` / `SubscriberList` - subscriber info
136
+ - `SearchNo` / `ExtendedSearchNo` - Norwegian registry search
137
+ - `SafenodePersonCreditReport` / `SafenodePersonRemarkControl` - Safenode person reports
138
+ - `SafenodeCompanyCreditReport` / `SafenodeCompanyRemarkControl` - Safenode company reports
139
+ - `Url` / `UrlSearch` - report URL generation
140
+ - `CustomList` - custom list management (GET/POST/PUT)
141
+ - `Heartbeat` - API health check
142
+
143
+ ## Development
144
+
145
+ ```bash
146
+ bundle install
147
+ bundle exec rspec
148
+ ```
149
+
150
+ Tests use VCR cassettes recorded against the staging API. To re-record, delete `spec/vcr_cassettes/` and run the suite with a valid API key configured in `spec/spec_helper.rb`.
151
+
152
+ ## License
153
+
154
+ MIT
data/checkbiz.gemspec ADDED
@@ -0,0 +1,32 @@
1
+ # frozen_string_literal: true
2
+
3
+ lib = File.expand_path("lib", __dir__)
4
+ $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
5
+ require "checkbiz/version"
6
+
7
+ Gem::Specification.new do |spec|
8
+ spec.name = "checkbiz"
9
+ spec.authors = ["Jonas Schubert Erlandsson", "Claude Code"]
10
+ spec.email = ["info@accodeing.com"]
11
+ spec.license = "MIT"
12
+ spec.version = Checkbiz::VERSION.dup
13
+
14
+ spec.summary = "Checkbiz V1 API library, based on rest-easy."
15
+ spec.description = spec.summary
16
+ spec.homepage = "https://github.com/accodeing/checkbiz"
17
+ spec.files = Dir["CHANGELOG.md", "LICENSE", "README.md", "checkbiz.gemspec", "lib/**/*", "config/*.yml"]
18
+ spec.bindir = "bin"
19
+ spec.executables = []
20
+ spec.require_paths = ["lib"]
21
+
22
+ spec.required_ruby_version = ">= 3.1.0"
23
+
24
+ spec.add_runtime_dependency "rest-easy", "~> 1.0.0"
25
+ spec.add_runtime_dependency "dry-struct"
26
+
27
+ spec.add_development_dependency "bundler"
28
+ spec.add_development_dependency "rake"
29
+ spec.add_development_dependency "rspec"
30
+ spec.add_development_dependency "vcr"
31
+ spec.add_development_dependency "webmock"
32
+ end
@@ -0,0 +1,23 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Checkbiz
4
+ class Resource < RestEasy::Resource
5
+ PARAM_CONVENTION = RestEasy::Conventions::PascalCase.new
6
+
7
+ before_parse do |data, meta|
8
+ meta.response_code = data.delete("responseCode")
9
+ meta.response_message = data.delete("responseMessage")
10
+ next data
11
+ end
12
+
13
+ class << self
14
+ def call(**params)
15
+ package = params.delete(:package)
16
+ headers = package ? { "Package" => package } : {}
17
+ api_params = params.transform_keys { |k| PARAM_CONVENTION.serialise(k) }
18
+ response = get(path: config.path, params: api_params, headers:)
19
+ parse(response)
20
+ end
21
+ end
22
+ end
23
+ end
@@ -0,0 +1,17 @@
1
+ # frozen_string_literal: true
2
+
3
+ require_relative "../types/address_information"
4
+
5
+ module Checkbiz
6
+ class AddressInformation < Checkbiz::Resource
7
+ configure do
8
+ path "v1/addressinformation"
9
+ end
10
+
11
+ attr :address_person_information, Types::AddressPersonInformationBlock.optional, :read_only
12
+ attr :address_company_information, Types::AddressCompanyInformationBlock.optional, :read_only
13
+ attr :address_phone_information, Types::AddressPhoneInformationBlock.optional, :read_only
14
+ attr :address_information, Types::AddressInformationBlock.optional, :read_only
15
+ attr :address_residential_information, Types::AddressResidentalInformationBlock.optional, :read_only
16
+ end
17
+ end
@@ -0,0 +1,17 @@
1
+ # frozen_string_literal: true
2
+
3
+ require_relative "../types/bolagsverket"
4
+
5
+ module Checkbiz
6
+ class Bolagsverket < Checkbiz::Resource
7
+ configure do
8
+ path "v1/bolagsverket"
9
+ end
10
+
11
+ attr :arende_forteckning_a6, Types::ArendeForteckningBlock.optional, :read_only
12
+ attr :arende_forteckning_a15, Types::ArendeInformationBlock.optional, :read_only
13
+ attr :samlad_arende_forteckning_a30, Types::ArendeForteckningBlockA30.optional, :read_only
14
+ attr :person_information_p25, Types::PersonInformationBlock.optional, :read_only
15
+ attr :aktiekapitalforandring, Types::AktiekapitalforandringBlock.optional, :read_only
16
+ end
17
+ end
@@ -0,0 +1,13 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Checkbiz
4
+ class CompanyAnnualReport < Checkbiz::Resource
5
+ configure do
6
+ path "v1/companyannualreport"
7
+ end
8
+
9
+ attr :document, Types::String.optional, :read_only
10
+ attr :type, Types::String.optional, :read_only
11
+ attr :encoding, Types::String.optional, :read_only
12
+ end
13
+ end
@@ -0,0 +1,13 @@
1
+ # frozen_string_literal: true
2
+
3
+ require_relative "../types/company_annual_reports"
4
+
5
+ module Checkbiz
6
+ class CompanyAnnualReports < Checkbiz::Resource
7
+ configure do
8
+ path "v1/companyannualreports"
9
+ end
10
+
11
+ attr :documents, Types::Array.of(Types::CompanyAnnualReportsDocument).optional, :read_only
12
+ end
13
+ end
@@ -0,0 +1,13 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Checkbiz
4
+ class CompanyArticlesOfAssociation < Checkbiz::Resource
5
+ configure do
6
+ path "v1/companyarticlesofassociation"
7
+ end
8
+
9
+ attr :document, Types::String.optional, :read_only
10
+ attr :type, Types::String.optional, :read_only
11
+ attr :encoding, Types::String.optional, :read_only
12
+ end
13
+ end
@@ -0,0 +1,13 @@
1
+ # frozen_string_literal: true
2
+
3
+ require_relative "../types/company_autocomplete"
4
+
5
+ module Checkbiz
6
+ class CompanyAutocomplete < Checkbiz::Resource
7
+ configure do
8
+ path "v1/companyautocomplete"
9
+ end
10
+
11
+ attr :basic_result, Types::CompanyAutocompleteBasicBlock.optional, :read_only
12
+ end
13
+ end
@@ -0,0 +1,15 @@
1
+ # frozen_string_literal: true
2
+
3
+ require_relative "../types/company_information"
4
+
5
+ module Checkbiz
6
+ class CompanyBeneficialOwner < Checkbiz::Resource
7
+ configure do
8
+ path "v1/companybeneficialowner"
9
+ end
10
+
11
+ attr :basic, Types::CompanyBasicBeneficialOwnerBlock.optional, :read_only
12
+ attr :extended, Types::CompanyExtendedBlock.optional, :read_only
13
+ attr :persons, Types::Array.of(Types::CompanyBeneficialOwnerPersonBlock).optional, :read_only
14
+ end
15
+ end
@@ -0,0 +1,13 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Checkbiz
4
+ class CompanyCertificatesOfRegistration < Checkbiz::Resource
5
+ configure do
6
+ path "v1/companycertificatesofregistration"
7
+ end
8
+
9
+ attr :document, Types::String.optional, :read_only
10
+ attr :type, Types::String.optional, :read_only
11
+ attr :encoding, Types::String.optional, :read_only
12
+ end
13
+ end
@@ -0,0 +1,23 @@
1
+ # frozen_string_literal: true
2
+
3
+ require_relative "../types/company_credit_template"
4
+
5
+ module Checkbiz
6
+ class CompanyCreditTemplate < Checkbiz::Resource
7
+ configure do
8
+ path "v1/companycredittemplate"
9
+ end
10
+
11
+ attr :credit_template, Types::CompanyCreditTemplateBlock.optional, :read_only
12
+
13
+ class << self
14
+ def call_v2(**params)
15
+ package = params.delete(:package)
16
+ headers = package ? { "Package" => package } : {}
17
+ api_params = params.transform_keys { |k| PARAM_CONVENTION.serialise(k) }
18
+ response = get(path: "v2/companycredittemplate", params: api_params, headers:)
19
+ parse(response)
20
+ end
21
+ end
22
+ end
23
+ end
@@ -0,0 +1,29 @@
1
+ # frozen_string_literal: true
2
+
3
+ require_relative "../types/company_event"
4
+
5
+ module Checkbiz
6
+ class CompanyEvent < Checkbiz::Resource
7
+ configure do
8
+ path "v1/companyevent"
9
+ end
10
+
11
+ attr :pagination, Types::EventPagination.optional, :read_only
12
+ attr :new_registered_companies_basic, Types::Array.of(Types::CompanyEventBasicBlock).optional, :read_only
13
+ attr :new_registered_companies_key, Types::Array.of(Types::CompanyEventKeyBlock).optional, :read_only
14
+ attr :liquidated_companies_basic, Types::Array.of(Types::CompanyEventBasicBlock).optional, :read_only
15
+ attr :liquidated_companies_key, Types::Array.of(Types::CompanyEventKeyBlock).optional, :read_only
16
+ attr :financial_updated_companies_basic, Types::Array.of(Types::CompanyEventBasicBlock).optional, :read_only
17
+ attr :financial_updated_companies_key, Types::Array.of(Types::CompanyEventKeyBlock).optional, :read_only
18
+ attr :status_change_date_companies_key, Types::Array.of(Types::CompanyEventKeyBlock).optional, :read_only
19
+ attr :status_change_date_companies_basic, Types::Array.of(Types::CompanyEventBasicBlock).optional, :read_only
20
+ attr :beneficial_owners_change_date_companies_key, Types::Array.of(Types::CompanyEventKeyBlock).optional, :read_only
21
+ attr :beneficial_owners_change_date_companies_basic, Types::Array.of(Types::CompanyEventBasicBlock).optional, :read_only
22
+ attr :address_change_date_companies_key, Types::Array.of(Types::CompanyEventKeyBlock).optional, :read_only
23
+ attr :address_change_date_companies_basic, Types::Array.of(Types::CompanyEventBasicBlock).optional, :read_only
24
+ attr :company_board_change_date_companies_key, Types::Array.of(Types::CompanyEventKeyBlock).optional, :read_only
25
+ attr :company_board_change_date_companies_basic, Types::Array.of(Types::CompanyEventBasicBlock).optional, :read_only
26
+ attr :company_annual_report_created_date_key, Types::Array.of(Types::CompanyEventKeyBlock).optional, :read_only
27
+ attr :company_annual_report_created_date_basic, Types::Array.of(Types::CompanyEventBasicBlock).optional, :read_only
28
+ end
29
+ end
@@ -0,0 +1,41 @@
1
+ # frozen_string_literal: true
2
+
3
+ require_relative "../types/company_information"
4
+
5
+ module Checkbiz
6
+ class CompanyInformation < Checkbiz::Resource
7
+ configure do
8
+ path "v1/companyinformation"
9
+ end
10
+
11
+ attr :name, Types::CompanyNameBlock.optional, :read_only
12
+ attr :basic, Types::CompanyBasicBlock.optional, :read_only
13
+ attr :extended, Types::CompanyExtendedBlock.optional, :read_only
14
+ attr :remark, Types::CompanyRemarkBlock.optional, :read_only
15
+ attr :remark_extended, Types::CompanyRemarkExtendedBlock.optional, :read_only
16
+ attr :safenode_remark, Types::SafenodeCompanyRemarkBlock.optional, :read_only
17
+ attr :safenode_remark_extended, Types::SafenodeCompanyRemarkExtendedBlock.optional, :read_only
18
+ attr :phone_numbers, Types::CompanyPhoneNumberBlock.optional, :read_only
19
+ attr :economic_basic, Types::CompanyEconomicBasicBlock.optional, :read_only
20
+ attr :economic_basic_company_group, Types::CompanyEconomicBasicBlock.optional, :read_only
21
+ attr :economic_extended, Types::CompanyEconomicExtendedBlock.optional, :read_only
22
+ attr :economic_extended_company_group, Types::CompanyEconomicExtendedBlock.optional, :read_only
23
+ attr :key_numbers, Types::CompanyKeyNumbersBlock.optional, :read_only
24
+ attr :key_numbers_company_group, Types::CompanyKeyNumbersBlock.optional, :read_only
25
+ attr :company_board_of_directors, Types::CompanyBoardOfDirectorsBlock.optional, :read_only
26
+ attr :economic_basic_list, Types::Array.of(Types::CompanyEconomicBasicBlock).optional, :read_only
27
+ attr :economic_basic_list_company_group, Types::Array.of(Types::CompanyEconomicBasicBlock).optional, :read_only
28
+ attr :economic_extended_list, Types::Array.of(Types::CompanyEconomicExtendedBlock).optional, :read_only
29
+ attr :economic_extended_list_company_group, Types::Array.of(Types::CompanyEconomicExtendedBlock).optional, :read_only
30
+ attr :key_numbers_list, Types::Array.of(Types::CompanyKeyNumbersBlock).optional, :read_only
31
+ attr :key_numbers_list_company_group, Types::Array.of(Types::CompanyKeyNumbersBlock).optional, :read_only
32
+ attr :worksites, Types::CompanyWorksitesBlock.optional, :read_only
33
+ attr :controlled_companies, Types::ControlledCompaniesBlock.optional, :read_only
34
+ attr :company_group_basic, Types::CompanyGroupBasicBlock.optional, :read_only
35
+ attr :company_group_extended, Types::CompanyGroupExtendedBlock.optional, :read_only
36
+ attr :beneficial_owners, Types::Array.of(Types::CompanyBeneficialOwnerPersonBlock).optional, :read_only
37
+ attr :beneficial_owner_status, Types::CompanyBeneficialOwnerStatusBlock.optional, :read_only
38
+ attr :company_articles_of_association, Types::CompanyArticlesOfAssociationBlock.optional, :read_only
39
+ attr :company_board_of_directors_history, Types::CompanyBoardOfDirectorsHistoryBlock.optional, :read_only
40
+ end
41
+ end
@@ -0,0 +1,14 @@
1
+ # frozen_string_literal: true
2
+
3
+ require_relative "../types/company_information_list"
4
+
5
+ module Checkbiz
6
+ class CompanyInformationList < Checkbiz::Resource
7
+ configure do
8
+ path "v1/companyinformationlist"
9
+ end
10
+
11
+ attr :records_returned, Types::Integer.optional, :read_only
12
+ attr :records, Types::Array.of(Types::CompanyInformationListCompanyBlock).optional, :read_only
13
+ end
14
+ end
@@ -0,0 +1,13 @@
1
+ # frozen_string_literal: true
2
+
3
+ require_relative "../types/company_search"
4
+
5
+ module Checkbiz
6
+ class CompanySearch < Checkbiz::Resource
7
+ configure do
8
+ path "v1/companysearch"
9
+ end
10
+
11
+ attr :basic_result, Types::CompanySearchBasicBlock.optional, :read_only
12
+ end
13
+ end
@@ -0,0 +1,13 @@
1
+ # frozen_string_literal: true
2
+
3
+ require_relative "../types/company_advanced_search"
4
+
5
+ module Checkbiz
6
+ class CompanySearchAdvanced < Checkbiz::Resource
7
+ configure do
8
+ path "v1/companysearchadvanced"
9
+ end
10
+
11
+ attr :basic_result, Types::CompanyAdvancedSearchBasicBlock.optional, :read_only
12
+ end
13
+ end
@@ -0,0 +1,13 @@
1
+ # frozen_string_literal: true
2
+
3
+ require_relative "../types/company_worksite"
4
+
5
+ module Checkbiz
6
+ class CompanyWorksite < Checkbiz::Resource
7
+ configure do
8
+ path "v1/companyworksite"
9
+ end
10
+
11
+ attr :worksite, Types::CompanyWorksiteBlock.optional, :read_only
12
+ end
13
+ end
@@ -0,0 +1,31 @@
1
+ # frozen_string_literal: true
2
+
3
+ require_relative "../types/custom_list_get"
4
+
5
+ module Checkbiz
6
+ class CustomList < Checkbiz::Resource
7
+ configure do
8
+ path "v1/customlist"
9
+ end
10
+
11
+ attr :total_records, Types::Integer.optional, :read_only
12
+ attr :deleted_records, Types::Integer.optional, :read_only
13
+ attr :list, Types::Array.of(Types::CustomListItem).optional, :read_only
14
+
15
+ class << self
16
+ def add(items, **params)
17
+ package = params.delete(:package)
18
+ headers = package ? { "Package" => package } : {}
19
+ response = post(path: config.path, body: items, headers:)
20
+ parse(response)
21
+ end
22
+
23
+ def remove(items, **params)
24
+ package = params.delete(:package)
25
+ headers = package ? { "Package" => package } : {}
26
+ response = put(path: config.path, body: items, headers:)
27
+ parse(response)
28
+ end
29
+ end
30
+ end
31
+ end
@@ -0,0 +1,14 @@
1
+ # frozen_string_literal: true
2
+
3
+ require_relative "../types/data_factory_person_search"
4
+
5
+ module Checkbiz
6
+ class DataFactoryPersonSearch < Checkbiz::Resource
7
+ configure do
8
+ path "v1/datafactorypersonsearch"
9
+ end
10
+
11
+ attr :count, Types::Integer.optional, :read_only
12
+ attr :persons, Types::Array.of(Types::Person).optional, :read_only
13
+ end
14
+ end
@@ -0,0 +1,14 @@
1
+ # frozen_string_literal: true
2
+
3
+ require_relative "../types/common"
4
+
5
+ module Checkbiz
6
+ class ExtendedSearchNo < Checkbiz::Resource
7
+ configure do
8
+ path "v1/extendedsearchno"
9
+ end
10
+
11
+ attr :count, Types::Integer.optional, :read_only
12
+ attr :contacts, Types::Array.of(Types::SearchNoContact).optional, :read_only
13
+ end
14
+ end
@@ -0,0 +1,13 @@
1
+ # frozen_string_literal: true
2
+
3
+ require_relative "../types/geomatic"
4
+
5
+ module Checkbiz
6
+ class Geomatics < Checkbiz::Resource
7
+ configure do
8
+ path "v1/geomaticse"
9
+ end
10
+
11
+ attr :geomatic_se, Types::GeomaticSEBlock.optional, :read_only
12
+ end
13
+ end
@@ -0,0 +1,9 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Checkbiz
4
+ class Heartbeat < Checkbiz::Resource
5
+ configure do
6
+ path "../heartbeat"
7
+ end
8
+ end
9
+ end
@@ -0,0 +1,14 @@
1
+ # frozen_string_literal: true
2
+
3
+ require_relative "../types/lookup_company_no"
4
+
5
+ module Checkbiz
6
+ class LookupCompanyNo < Checkbiz::Resource
7
+ configure do
8
+ path "v1/lookupcompanyno"
9
+ end
10
+
11
+ attr :count, Types::Integer.optional, :read_only
12
+ attr :contacts, Types::Array.of(Types::LookupCompanyNoContact).optional, :read_only
13
+ end
14
+ end
@@ -0,0 +1,14 @@
1
+ # frozen_string_literal: true
2
+
3
+ require_relative "../types/lookup_id_no"
4
+
5
+ module Checkbiz
6
+ class LookupIdNo < Checkbiz::Resource
7
+ configure do
8
+ path "v1/lookupidno"
9
+ end
10
+
11
+ attr :count, Types::Integer.optional, :read_only
12
+ attr :contacts, Types::Array.of(Types::LookupIdNoContact).optional, :read_only
13
+ end
14
+ end
@@ -0,0 +1,14 @@
1
+ # frozen_string_literal: true
2
+
3
+ require_relative "../types/lookup_phone_no"
4
+
5
+ module Checkbiz
6
+ class LookupPhoneNo < Checkbiz::Resource
7
+ configure do
8
+ path "v1/lookupphoneno"
9
+ end
10
+
11
+ attr :count, Types::Integer.optional, :read_only
12
+ attr :contacts, Types::Array.of(Types::LookupPhoneNoContact).optional, :read_only
13
+ end
14
+ end
@@ -0,0 +1,11 @@
1
+ # frozen_string_literal: true
2
+
3
+ require_relative "../types/subscriber_nix"
4
+
5
+ module Checkbiz
6
+ class Nix < Checkbiz::Resource
7
+ configure do
8
+ path "v1/nix"
9
+ end
10
+ end
11
+ end
@@ -0,0 +1,13 @@
1
+ # frozen_string_literal: true
2
+
3
+ require_relative "../types/package_calls"
4
+
5
+ module Checkbiz
6
+ class PackageCalls < Checkbiz::Resource
7
+ configure do
8
+ path "v1/packagecalls"
9
+ end
10
+
11
+ attr :products, Types::Array.of(Types::PackageCallsProductBlock).optional, :read_only
12
+ end
13
+ end