dataleon 0.1.0.pre.alpha.1
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 +7 -0
- data/.ignore +2 -0
- data/CHANGELOG.md +50 -0
- data/README.md +257 -0
- data/SECURITY.md +27 -0
- data/lib/dataleon/client.rb +80 -0
- data/lib/dataleon/errors.rb +214 -0
- data/lib/dataleon/file_part.rb +55 -0
- data/lib/dataleon/internal/transport/base_client.rb +563 -0
- data/lib/dataleon/internal/transport/pooled_net_requester.rb +201 -0
- data/lib/dataleon/internal/type/array_of.rb +168 -0
- data/lib/dataleon/internal/type/base_model.rb +531 -0
- data/lib/dataleon/internal/type/base_page.rb +55 -0
- data/lib/dataleon/internal/type/boolean.rb +77 -0
- data/lib/dataleon/internal/type/converter.rb +327 -0
- data/lib/dataleon/internal/type/enum.rb +131 -0
- data/lib/dataleon/internal/type/file_input.rb +108 -0
- data/lib/dataleon/internal/type/hash_of.rb +188 -0
- data/lib/dataleon/internal/type/request_parameters.rb +42 -0
- data/lib/dataleon/internal/type/union.rb +237 -0
- data/lib/dataleon/internal/type/unknown.rb +81 -0
- data/lib/dataleon/internal/util.rb +914 -0
- data/lib/dataleon/internal.rb +20 -0
- data/lib/dataleon/models/check.rb +50 -0
- data/lib/dataleon/models/companies/document_list_params.rb +16 -0
- data/lib/dataleon/models/companies/document_upload_params.rb +82 -0
- data/lib/dataleon/models/company_create_params.rb +228 -0
- data/lib/dataleon/models/company_delete_params.rb +14 -0
- data/lib/dataleon/models/company_list_params.rb +108 -0
- data/lib/dataleon/models/company_list_response.rb +8 -0
- data/lib/dataleon/models/company_registration.rb +964 -0
- data/lib/dataleon/models/company_retrieve_params.rb +30 -0
- data/lib/dataleon/models/company_update_params.rb +228 -0
- data/lib/dataleon/models/individual.rb +805 -0
- data/lib/dataleon/models/individual_create_params.rb +174 -0
- data/lib/dataleon/models/individual_delete_params.rb +14 -0
- data/lib/dataleon/models/individual_list_params.rb +108 -0
- data/lib/dataleon/models/individual_list_response.rb +8 -0
- data/lib/dataleon/models/individual_retrieve_params.rb +30 -0
- data/lib/dataleon/models/individual_update_params.rb +174 -0
- data/lib/dataleon/models/individuals/document_list_params.rb +16 -0
- data/lib/dataleon/models/individuals/document_response.rb +98 -0
- data/lib/dataleon/models/individuals/document_upload_params.rb +82 -0
- data/lib/dataleon/models/individuals/generic_document.rb +132 -0
- data/lib/dataleon/models/individuals/kbis.rb +326 -0
- data/lib/dataleon/models.rb +71 -0
- data/lib/dataleon/request_options.rb +77 -0
- data/lib/dataleon/resources/companies/documents.rb +65 -0
- data/lib/dataleon/resources/companies.rb +164 -0
- data/lib/dataleon/resources/individuals/documents.rb +65 -0
- data/lib/dataleon/resources/individuals.rb +164 -0
- data/lib/dataleon/version.rb +5 -0
- data/lib/dataleon.rb +79 -0
- data/manifest.yaml +15 -0
- data/rbi/dataleon/client.rbi +56 -0
- data/rbi/dataleon/errors.rbi +178 -0
- data/rbi/dataleon/file_part.rbi +37 -0
- data/rbi/dataleon/internal/transport/base_client.rbi +293 -0
- data/rbi/dataleon/internal/transport/pooled_net_requester.rbi +79 -0
- data/rbi/dataleon/internal/type/array_of.rbi +104 -0
- data/rbi/dataleon/internal/type/base_model.rbi +302 -0
- data/rbi/dataleon/internal/type/base_page.rbi +42 -0
- data/rbi/dataleon/internal/type/boolean.rbi +58 -0
- data/rbi/dataleon/internal/type/converter.rbi +216 -0
- data/rbi/dataleon/internal/type/enum.rbi +82 -0
- data/rbi/dataleon/internal/type/file_input.rbi +59 -0
- data/rbi/dataleon/internal/type/hash_of.rbi +104 -0
- data/rbi/dataleon/internal/type/request_parameters.rbi +29 -0
- data/rbi/dataleon/internal/type/union.rbi +128 -0
- data/rbi/dataleon/internal/type/unknown.rbi +58 -0
- data/rbi/dataleon/internal/util.rbi +487 -0
- data/rbi/dataleon/internal.rbi +16 -0
- data/rbi/dataleon/models/check.rbi +83 -0
- data/rbi/dataleon/models/companies/document_list_params.rbi +32 -0
- data/rbi/dataleon/models/companies/document_upload_params.rbi +266 -0
- data/rbi/dataleon/models/company_create_params.rbi +361 -0
- data/rbi/dataleon/models/company_delete_params.rbi +27 -0
- data/rbi/dataleon/models/company_list_params.rbi +182 -0
- data/rbi/dataleon/models/company_list_response.rbi +11 -0
- data/rbi/dataleon/models/company_registration.rbi +1628 -0
- data/rbi/dataleon/models/company_retrieve_params.rbi +57 -0
- data/rbi/dataleon/models/company_update_params.rbi +361 -0
- data/rbi/dataleon/models/individual.rbi +1281 -0
- data/rbi/dataleon/models/individual_create_params.rbi +323 -0
- data/rbi/dataleon/models/individual_delete_params.rbi +27 -0
- data/rbi/dataleon/models/individual_list_params.rbi +193 -0
- data/rbi/dataleon/models/individual_list_response.rbi +11 -0
- data/rbi/dataleon/models/individual_retrieve_params.rbi +57 -0
- data/rbi/dataleon/models/individual_update_params.rbi +323 -0
- data/rbi/dataleon/models/individuals/document_list_params.rbi +32 -0
- data/rbi/dataleon/models/individuals/document_response.rbi +190 -0
- data/rbi/dataleon/models/individuals/document_upload_params.rbi +266 -0
- data/rbi/dataleon/models/individuals/generic_document.rbi +252 -0
- data/rbi/dataleon/models/individuals/kbis.rbi +513 -0
- data/rbi/dataleon/models.rbi +33 -0
- data/rbi/dataleon/request_options.rbi +59 -0
- data/rbi/dataleon/resources/companies/documents.rbi +52 -0
- data/rbi/dataleon/resources/companies.rbi +135 -0
- data/rbi/dataleon/resources/individuals/documents.rbi +52 -0
- data/rbi/dataleon/resources/individuals.rbi +137 -0
- data/rbi/dataleon/version.rbi +5 -0
- data/sig/dataleon/client.rbs +28 -0
- data/sig/dataleon/errors.rbs +110 -0
- data/sig/dataleon/file_part.rbs +21 -0
- data/sig/dataleon/internal/transport/base_client.rbs +131 -0
- data/sig/dataleon/internal/transport/pooled_net_requester.rbs +45 -0
- data/sig/dataleon/internal/type/array_of.rbs +48 -0
- data/sig/dataleon/internal/type/base_model.rbs +102 -0
- data/sig/dataleon/internal/type/base_page.rbs +24 -0
- data/sig/dataleon/internal/type/boolean.rbs +26 -0
- data/sig/dataleon/internal/type/converter.rbs +79 -0
- data/sig/dataleon/internal/type/enum.rbs +32 -0
- data/sig/dataleon/internal/type/file_input.rbs +25 -0
- data/sig/dataleon/internal/type/hash_of.rbs +48 -0
- data/sig/dataleon/internal/type/request_parameters.rbs +17 -0
- data/sig/dataleon/internal/type/union.rbs +52 -0
- data/sig/dataleon/internal/type/unknown.rbs +26 -0
- data/sig/dataleon/internal/util.rbs +185 -0
- data/sig/dataleon/internal.rbs +9 -0
- data/sig/dataleon/models/check.rbs +50 -0
- data/sig/dataleon/models/companies/document_list_params.rbs +17 -0
- data/sig/dataleon/models/companies/document_upload_params.rbs +119 -0
- data/sig/dataleon/models/company_create_params.rbs +209 -0
- data/sig/dataleon/models/company_delete_params.rbs +15 -0
- data/sig/dataleon/models/company_list_params.rbs +120 -0
- data/sig/dataleon/models/company_list_response.rbs +7 -0
- data/sig/dataleon/models/company_registration.rbs +847 -0
- data/sig/dataleon/models/company_retrieve_params.rbs +32 -0
- data/sig/dataleon/models/company_update_params.rbs +209 -0
- data/sig/dataleon/models/individual.rbs +717 -0
- data/sig/dataleon/models/individual_create_params.rbs +172 -0
- data/sig/dataleon/models/individual_delete_params.rbs +15 -0
- data/sig/dataleon/models/individual_list_params.rbs +120 -0
- data/sig/dataleon/models/individual_list_response.rbs +7 -0
- data/sig/dataleon/models/individual_retrieve_params.rbs +32 -0
- data/sig/dataleon/models/individual_update_params.rbs +172 -0
- data/sig/dataleon/models/individuals/document_list_params.rbs +17 -0
- data/sig/dataleon/models/individuals/document_response.rbs +101 -0
- data/sig/dataleon/models/individuals/document_upload_params.rbs +119 -0
- data/sig/dataleon/models/individuals/generic_document.rbs +132 -0
- data/sig/dataleon/models/individuals/kbis.rbs +303 -0
- data/sig/dataleon/models.rbs +31 -0
- data/sig/dataleon/request_options.rbs +34 -0
- data/sig/dataleon/resources/companies/documents.rbs +22 -0
- data/sig/dataleon/resources/companies.rbs +50 -0
- data/sig/dataleon/resources/individuals/documents.rbs +22 -0
- data/sig/dataleon/resources/individuals.rbs +50 -0
- data/sig/dataleon/version.rbs +3 -0
- metadata +206 -0
|
@@ -0,0 +1,82 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module Dataleon
|
|
4
|
+
module Models
|
|
5
|
+
module Individuals
|
|
6
|
+
# @see Dataleon::Resources::Individuals::Documents#upload
|
|
7
|
+
class DocumentUploadParams < Dataleon::Internal::Type::BaseModel
|
|
8
|
+
extend Dataleon::Internal::Type::RequestParameters::Converter
|
|
9
|
+
include Dataleon::Internal::Type::RequestParameters
|
|
10
|
+
|
|
11
|
+
# @!attribute document_type
|
|
12
|
+
# Filter by document type for upload (must be one of the allowed values)
|
|
13
|
+
#
|
|
14
|
+
# @return [Symbol, Dataleon::Models::Individuals::DocumentUploadParams::DocumentType]
|
|
15
|
+
required :document_type, enum: -> { Dataleon::Individuals::DocumentUploadParams::DocumentType }
|
|
16
|
+
|
|
17
|
+
# @!attribute file
|
|
18
|
+
# File to upload (required)
|
|
19
|
+
#
|
|
20
|
+
# @return [Pathname, StringIO, IO, String, Dataleon::FilePart, nil]
|
|
21
|
+
optional :file, Dataleon::Internal::Type::FileInput
|
|
22
|
+
|
|
23
|
+
# @!attribute url
|
|
24
|
+
# URL of the file to upload (either `file` or `url` is required)
|
|
25
|
+
#
|
|
26
|
+
# @return [String, nil]
|
|
27
|
+
optional :url, String
|
|
28
|
+
|
|
29
|
+
# @!method initialize(document_type:, file: nil, url: nil, request_options: {})
|
|
30
|
+
# @param document_type [Symbol, Dataleon::Models::Individuals::DocumentUploadParams::DocumentType] Filter by document type for upload (must be one of the allowed values)
|
|
31
|
+
#
|
|
32
|
+
# @param file [Pathname, StringIO, IO, String, Dataleon::FilePart] File to upload (required)
|
|
33
|
+
#
|
|
34
|
+
# @param url [String] URL of the file to upload (either `file` or `url` is required)
|
|
35
|
+
#
|
|
36
|
+
# @param request_options [Dataleon::RequestOptions, Hash{Symbol=>Object}]
|
|
37
|
+
|
|
38
|
+
# Filter by document type for upload (must be one of the allowed values)
|
|
39
|
+
module DocumentType
|
|
40
|
+
extend Dataleon::Internal::Type::Enum
|
|
41
|
+
|
|
42
|
+
LIASSE_FISCALE = :liasse_fiscale
|
|
43
|
+
AMORTISED_LOAN_SCHEDULE = :amortised_loan_schedule
|
|
44
|
+
INVOICE = :invoice
|
|
45
|
+
RECEIPT = :receipt
|
|
46
|
+
COMPANY_STATUTS = :company_statuts
|
|
47
|
+
REGISTRATION_COMPANY_CERTIFICATE = :registration_company_certificate
|
|
48
|
+
KBIS = :kbis
|
|
49
|
+
RIB = :rib
|
|
50
|
+
LIVRET_FAMILLE = :livret_famille
|
|
51
|
+
BIRTH_CERTIFICATE = :birth_certificate
|
|
52
|
+
PAYSLIP = :payslip
|
|
53
|
+
SOCIAL_SECURITY_CARD = :social_security_card
|
|
54
|
+
VEHICLE_REGISTRATION_CERTIFICATE = :vehicle_registration_certificate
|
|
55
|
+
CARTE_GRISE = :carte_grise
|
|
56
|
+
CRIMINAL_RECORD_EXTRACT = :criminal_record_extract
|
|
57
|
+
PROOF_OF_ADDRESS = :proof_of_address
|
|
58
|
+
IDENTITY_CARD_FRONT = :identity_card_front
|
|
59
|
+
IDENTITY_CARD_BACK = :identity_card_back
|
|
60
|
+
DRIVER_LICENSE_FRONT = :driver_license_front
|
|
61
|
+
DRIVER_LICENSE_BACK = :driver_license_back
|
|
62
|
+
IDENTITY_DOCUMENT = :identity_document
|
|
63
|
+
DRIVER_LICENSE = :driver_license
|
|
64
|
+
PASSPORT = :passport
|
|
65
|
+
TAX = :tax
|
|
66
|
+
CERTIFICATE_OF_INCORPORATION = :certificate_of_incorporation
|
|
67
|
+
CERTIFICATE_OF_GOOD_STANDING = :certificate_of_good_standing
|
|
68
|
+
LCB_FT_LAB_AML_POLICIES = :lcb_ft_lab_aml_policies
|
|
69
|
+
NIU_ENTREPRISE = :niu_entreprise
|
|
70
|
+
FINANCIAL_STATEMENTS = :financial_statements
|
|
71
|
+
RCCM = :rccm
|
|
72
|
+
PROOF_OF_SOURCE_FUNDS = :proof_of_source_funds
|
|
73
|
+
ORGANIZATIONAL_CHART = :organizational_chart
|
|
74
|
+
RISK_POLICIES = :risk_policies
|
|
75
|
+
|
|
76
|
+
# @!method self.values
|
|
77
|
+
# @return [Array<Symbol>]
|
|
78
|
+
end
|
|
79
|
+
end
|
|
80
|
+
end
|
|
81
|
+
end
|
|
82
|
+
end
|
|
@@ -0,0 +1,132 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module Dataleon
|
|
4
|
+
module Models
|
|
5
|
+
module Individuals
|
|
6
|
+
# @see Dataleon::Resources::Individuals::Documents#upload
|
|
7
|
+
class GenericDocument < Dataleon::Internal::Type::BaseModel
|
|
8
|
+
# @!attribute id
|
|
9
|
+
# Unique identifier of the document.
|
|
10
|
+
#
|
|
11
|
+
# @return [String, nil]
|
|
12
|
+
optional :id, String
|
|
13
|
+
|
|
14
|
+
# @!attribute checks
|
|
15
|
+
# List of verification checks performed on the document.
|
|
16
|
+
#
|
|
17
|
+
# @return [Array<Dataleon::Models::Check>, nil]
|
|
18
|
+
optional :checks, -> { Dataleon::Internal::Type::ArrayOf[Dataleon::Check] }
|
|
19
|
+
|
|
20
|
+
# @!attribute created_at
|
|
21
|
+
# Timestamp when the document was created or uploaded.
|
|
22
|
+
#
|
|
23
|
+
# @return [Time, nil]
|
|
24
|
+
optional :created_at, Time
|
|
25
|
+
|
|
26
|
+
# @!attribute document_type
|
|
27
|
+
# Type/category of the document.
|
|
28
|
+
#
|
|
29
|
+
# @return [String, nil]
|
|
30
|
+
optional :document_type, String
|
|
31
|
+
|
|
32
|
+
# @!attribute name
|
|
33
|
+
# Name or label for the document.
|
|
34
|
+
#
|
|
35
|
+
# @return [String, nil]
|
|
36
|
+
optional :name, String
|
|
37
|
+
|
|
38
|
+
# @!attribute signed_url
|
|
39
|
+
# Signed URL for accessing the document file.
|
|
40
|
+
#
|
|
41
|
+
# @return [String, nil]
|
|
42
|
+
optional :signed_url, String
|
|
43
|
+
|
|
44
|
+
# @!attribute state
|
|
45
|
+
# Current processing state of the document (e.g., WAITING, PROCESSED).
|
|
46
|
+
#
|
|
47
|
+
# @return [String, nil]
|
|
48
|
+
optional :state, String
|
|
49
|
+
|
|
50
|
+
# @!attribute status
|
|
51
|
+
# Status of the document reception or approval.
|
|
52
|
+
#
|
|
53
|
+
# @return [String, nil]
|
|
54
|
+
optional :status, String
|
|
55
|
+
|
|
56
|
+
# @!attribute tables
|
|
57
|
+
# List of tables extracted from the document, each containing operations.
|
|
58
|
+
#
|
|
59
|
+
# @return [Array<Dataleon::Models::Individuals::GenericDocument::Table>, nil]
|
|
60
|
+
optional :tables, -> { Dataleon::Internal::Type::ArrayOf[Dataleon::Individuals::GenericDocument::Table] }
|
|
61
|
+
|
|
62
|
+
# @!attribute values
|
|
63
|
+
# Extracted key-value pairs from the document, including confidence scores.
|
|
64
|
+
#
|
|
65
|
+
# @return [Array<Dataleon::Models::Individuals::GenericDocument::Value>, nil]
|
|
66
|
+
optional :values, -> { Dataleon::Internal::Type::ArrayOf[Dataleon::Individuals::GenericDocument::Value] }
|
|
67
|
+
|
|
68
|
+
# @!method initialize(id: nil, checks: nil, created_at: nil, document_type: nil, name: nil, signed_url: nil, state: nil, status: nil, tables: nil, values: nil)
|
|
69
|
+
# Represents a general document with metadata, verification checks, and extracted
|
|
70
|
+
# data.
|
|
71
|
+
#
|
|
72
|
+
# @param id [String] Unique identifier of the document.
|
|
73
|
+
#
|
|
74
|
+
# @param checks [Array<Dataleon::Models::Check>] List of verification checks performed on the document.
|
|
75
|
+
#
|
|
76
|
+
# @param created_at [Time] Timestamp when the document was created or uploaded.
|
|
77
|
+
#
|
|
78
|
+
# @param document_type [String] Type/category of the document.
|
|
79
|
+
#
|
|
80
|
+
# @param name [String] Name or label for the document.
|
|
81
|
+
#
|
|
82
|
+
# @param signed_url [String] Signed URL for accessing the document file.
|
|
83
|
+
#
|
|
84
|
+
# @param state [String] Current processing state of the document (e.g., WAITING, PROCESSED).
|
|
85
|
+
#
|
|
86
|
+
# @param status [String] Status of the document reception or approval.
|
|
87
|
+
#
|
|
88
|
+
# @param tables [Array<Dataleon::Models::Individuals::GenericDocument::Table>] List of tables extracted from the document, each containing operations.
|
|
89
|
+
#
|
|
90
|
+
# @param values [Array<Dataleon::Models::Individuals::GenericDocument::Value>] Extracted key-value pairs from the document, including confidence scores.
|
|
91
|
+
|
|
92
|
+
class Table < Dataleon::Internal::Type::BaseModel
|
|
93
|
+
# @!attribute operation
|
|
94
|
+
# List of operations or actions associated with the table.
|
|
95
|
+
#
|
|
96
|
+
# @return [Array<Object>, nil]
|
|
97
|
+
optional :operation, Dataleon::Internal::Type::ArrayOf[Dataleon::Internal::Type::Unknown]
|
|
98
|
+
|
|
99
|
+
# @!method initialize(operation: nil)
|
|
100
|
+
# @param operation [Array<Object>] List of operations or actions associated with the table.
|
|
101
|
+
end
|
|
102
|
+
|
|
103
|
+
class Value < Dataleon::Internal::Type::BaseModel
|
|
104
|
+
# @!attribute confidence
|
|
105
|
+
# Confidence score (between 0 and 1) for the extracted value.
|
|
106
|
+
#
|
|
107
|
+
# @return [Float, nil]
|
|
108
|
+
optional :confidence, Float
|
|
109
|
+
|
|
110
|
+
# @!attribute name
|
|
111
|
+
# Name or label of the extracted field.
|
|
112
|
+
#
|
|
113
|
+
# @return [String, nil]
|
|
114
|
+
optional :name, String
|
|
115
|
+
|
|
116
|
+
# @!attribute value
|
|
117
|
+
# List of integer values related to the field (e.g., bounding box coordinates).
|
|
118
|
+
#
|
|
119
|
+
# @return [Array<Integer>, nil]
|
|
120
|
+
optional :value, Dataleon::Internal::Type::ArrayOf[Integer]
|
|
121
|
+
|
|
122
|
+
# @!method initialize(confidence: nil, name: nil, value: nil)
|
|
123
|
+
# @param confidence [Float] Confidence score (between 0 and 1) for the extracted value.
|
|
124
|
+
#
|
|
125
|
+
# @param name [String] Name or label of the extracted field.
|
|
126
|
+
#
|
|
127
|
+
# @param value [Array<Integer>] List of integer values related to the field (e.g., bounding box coordinates).
|
|
128
|
+
end
|
|
129
|
+
end
|
|
130
|
+
end
|
|
131
|
+
end
|
|
132
|
+
end
|
|
@@ -0,0 +1,326 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module Dataleon
|
|
4
|
+
module Models
|
|
5
|
+
module Individuals
|
|
6
|
+
class Kbis < Dataleon::Internal::Type::BaseModel
|
|
7
|
+
# @!attribute activities
|
|
8
|
+
# Declared business activities.
|
|
9
|
+
#
|
|
10
|
+
# @return [String, nil]
|
|
11
|
+
optional :activities, String
|
|
12
|
+
|
|
13
|
+
# @!attribute address
|
|
14
|
+
# Official address of the company.
|
|
15
|
+
#
|
|
16
|
+
# @return [String, nil]
|
|
17
|
+
optional :address, String
|
|
18
|
+
|
|
19
|
+
# @!attribute capital_social
|
|
20
|
+
# Registered social capital of the company.
|
|
21
|
+
#
|
|
22
|
+
# @return [String, nil]
|
|
23
|
+
optional :capital_social, String
|
|
24
|
+
|
|
25
|
+
# @!attribute closure_date
|
|
26
|
+
# Date of closure, if applicable.
|
|
27
|
+
#
|
|
28
|
+
# @return [Date, nil]
|
|
29
|
+
optional :closure_date, Date
|
|
30
|
+
|
|
31
|
+
# @!attribute company_name
|
|
32
|
+
# Official name of the company.
|
|
33
|
+
#
|
|
34
|
+
# @return [String, nil]
|
|
35
|
+
optional :company_name, String
|
|
36
|
+
|
|
37
|
+
# @!attribute document_date
|
|
38
|
+
# Date when the document was issued.
|
|
39
|
+
#
|
|
40
|
+
# @return [Date, nil]
|
|
41
|
+
optional :document_date, Date
|
|
42
|
+
|
|
43
|
+
# @!attribute document_type
|
|
44
|
+
# Fixed identifier for the document type.
|
|
45
|
+
#
|
|
46
|
+
# @return [String, nil]
|
|
47
|
+
optional :document_type, String
|
|
48
|
+
|
|
49
|
+
# @!attribute first_closure_date
|
|
50
|
+
# Date of the first fiscal closure.
|
|
51
|
+
#
|
|
52
|
+
# @return [Date, nil]
|
|
53
|
+
optional :first_closure_date, Date
|
|
54
|
+
|
|
55
|
+
# @!attribute from_greffe
|
|
56
|
+
# Registry office that issued the document.
|
|
57
|
+
#
|
|
58
|
+
# @return [String, nil]
|
|
59
|
+
optional :from_greffe, String
|
|
60
|
+
|
|
61
|
+
# @!attribute legal_form
|
|
62
|
+
# Legal form of the company (e.g., SAS, SARL).
|
|
63
|
+
#
|
|
64
|
+
# @return [String, nil]
|
|
65
|
+
optional :legal_form, String
|
|
66
|
+
|
|
67
|
+
# @!attribute members
|
|
68
|
+
# List of people or entities associated with the company.
|
|
69
|
+
#
|
|
70
|
+
# @return [Array<Dataleon::Models::Individuals::Kbis::Member>, nil]
|
|
71
|
+
optional :members, -> { Dataleon::Internal::Type::ArrayOf[Dataleon::Individuals::Kbis::Member] }
|
|
72
|
+
|
|
73
|
+
# @!attribute ngestion
|
|
74
|
+
# Business registry number or NGestion.
|
|
75
|
+
#
|
|
76
|
+
# @return [String, nil]
|
|
77
|
+
optional :ngestion, String
|
|
78
|
+
|
|
79
|
+
# @!attribute rcs_number
|
|
80
|
+
# RCS (Company Registration Number).
|
|
81
|
+
#
|
|
82
|
+
# @return [String, nil]
|
|
83
|
+
optional :rcs_number, String
|
|
84
|
+
|
|
85
|
+
# @!attribute registration_date
|
|
86
|
+
# Date of registration with the registry.
|
|
87
|
+
#
|
|
88
|
+
# @return [Date, nil]
|
|
89
|
+
optional :registration_date, Date
|
|
90
|
+
|
|
91
|
+
# @!attribute siren_info
|
|
92
|
+
# SIREN number of the company.
|
|
93
|
+
#
|
|
94
|
+
# @return [String, nil]
|
|
95
|
+
optional :siren_info, String
|
|
96
|
+
|
|
97
|
+
# @!method initialize(activities: nil, address: nil, capital_social: nil, closure_date: nil, company_name: nil, document_date: nil, document_type: nil, first_closure_date: nil, from_greffe: nil, legal_form: nil, members: nil, ngestion: nil, rcs_number: nil, registration_date: nil, siren_info: nil)
|
|
98
|
+
# A document representing official registration data from the KBIS (France).
|
|
99
|
+
#
|
|
100
|
+
# @param activities [String] Declared business activities.
|
|
101
|
+
#
|
|
102
|
+
# @param address [String] Official address of the company.
|
|
103
|
+
#
|
|
104
|
+
# @param capital_social [String] Registered social capital of the company.
|
|
105
|
+
#
|
|
106
|
+
# @param closure_date [Date] Date of closure, if applicable.
|
|
107
|
+
#
|
|
108
|
+
# @param company_name [String] Official name of the company.
|
|
109
|
+
#
|
|
110
|
+
# @param document_date [Date] Date when the document was issued.
|
|
111
|
+
#
|
|
112
|
+
# @param document_type [String] Fixed identifier for the document type.
|
|
113
|
+
#
|
|
114
|
+
# @param first_closure_date [Date] Date of the first fiscal closure.
|
|
115
|
+
#
|
|
116
|
+
# @param from_greffe [String] Registry office that issued the document.
|
|
117
|
+
#
|
|
118
|
+
# @param legal_form [String] Legal form of the company (e.g., SAS, SARL).
|
|
119
|
+
#
|
|
120
|
+
# @param members [Array<Dataleon::Models::Individuals::Kbis::Member>] List of people or entities associated with the company.
|
|
121
|
+
#
|
|
122
|
+
# @param ngestion [String] Business registry number or NGestion.
|
|
123
|
+
#
|
|
124
|
+
# @param rcs_number [String] RCS (Company Registration Number).
|
|
125
|
+
#
|
|
126
|
+
# @param registration_date [Date] Date of registration with the registry.
|
|
127
|
+
#
|
|
128
|
+
# @param siren_info [String] SIREN number of the company.
|
|
129
|
+
|
|
130
|
+
class Member < Dataleon::Internal::Type::BaseModel
|
|
131
|
+
# @!attribute id
|
|
132
|
+
# Unique identifier for the member.
|
|
133
|
+
#
|
|
134
|
+
# @return [String, nil]
|
|
135
|
+
optional :id, String
|
|
136
|
+
|
|
137
|
+
# @!attribute address
|
|
138
|
+
# Address of the member.
|
|
139
|
+
#
|
|
140
|
+
# @return [String, nil]
|
|
141
|
+
optional :address, String
|
|
142
|
+
|
|
143
|
+
# @!attribute birthday
|
|
144
|
+
# Birth date of the person (only if type = person).
|
|
145
|
+
#
|
|
146
|
+
# @return [Time, nil]
|
|
147
|
+
optional :birthday, Time
|
|
148
|
+
|
|
149
|
+
# @!attribute birthplace
|
|
150
|
+
# Place of birth (only if type = person).
|
|
151
|
+
#
|
|
152
|
+
# @return [String, nil]
|
|
153
|
+
optional :birthplace, String
|
|
154
|
+
|
|
155
|
+
# @!attribute country
|
|
156
|
+
# Country of residence or registration.
|
|
157
|
+
#
|
|
158
|
+
# @return [String, nil]
|
|
159
|
+
optional :country, String
|
|
160
|
+
|
|
161
|
+
# @!attribute email
|
|
162
|
+
# Email address of the member.
|
|
163
|
+
#
|
|
164
|
+
# @return [String, nil]
|
|
165
|
+
optional :email, String
|
|
166
|
+
|
|
167
|
+
# @!attribute first_name
|
|
168
|
+
# First name of the person (only if type = person).
|
|
169
|
+
#
|
|
170
|
+
# @return [String, nil]
|
|
171
|
+
optional :first_name, String
|
|
172
|
+
|
|
173
|
+
# @!attribute is_beneficial_owner
|
|
174
|
+
# Indicates if this member is a beneficial owner.
|
|
175
|
+
#
|
|
176
|
+
# @return [Boolean, nil]
|
|
177
|
+
optional :is_beneficial_owner, Dataleon::Internal::Type::Boolean
|
|
178
|
+
|
|
179
|
+
# @!attribute is_delegator
|
|
180
|
+
# Indicates if this member is a delegator.
|
|
181
|
+
#
|
|
182
|
+
# @return [Boolean, nil]
|
|
183
|
+
optional :is_delegator, Dataleon::Internal::Type::Boolean
|
|
184
|
+
|
|
185
|
+
# @!attribute last_name
|
|
186
|
+
# Last name of the person (only if type = person).
|
|
187
|
+
#
|
|
188
|
+
# @return [String, nil]
|
|
189
|
+
optional :last_name, String
|
|
190
|
+
|
|
191
|
+
# @!attribute liveness_verification
|
|
192
|
+
# Indicates if the member passed liveness verification.
|
|
193
|
+
#
|
|
194
|
+
# @return [Boolean, nil]
|
|
195
|
+
optional :liveness_verification, Dataleon::Internal::Type::Boolean
|
|
196
|
+
|
|
197
|
+
# @!attribute name
|
|
198
|
+
# Name of the company (only if type = company).
|
|
199
|
+
#
|
|
200
|
+
# @return [String, nil]
|
|
201
|
+
optional :name, String
|
|
202
|
+
|
|
203
|
+
# @!attribute ownership_percentage
|
|
204
|
+
# Ownership percentage held by the member.
|
|
205
|
+
#
|
|
206
|
+
# @return [Integer, nil]
|
|
207
|
+
optional :ownership_percentage, Integer
|
|
208
|
+
|
|
209
|
+
# @!attribute phone_number
|
|
210
|
+
# Phone number of the member.
|
|
211
|
+
#
|
|
212
|
+
# @return [String, nil]
|
|
213
|
+
optional :phone_number, String
|
|
214
|
+
|
|
215
|
+
# @!attribute postal_code
|
|
216
|
+
# Postal code of the member's address.
|
|
217
|
+
#
|
|
218
|
+
# @return [String, nil]
|
|
219
|
+
optional :postal_code, String
|
|
220
|
+
|
|
221
|
+
# @!attribute registration_id
|
|
222
|
+
# Company registration number (if type = company).
|
|
223
|
+
#
|
|
224
|
+
# @return [String, nil]
|
|
225
|
+
optional :registration_id, String
|
|
226
|
+
|
|
227
|
+
# @!attribute relation
|
|
228
|
+
# Type of relation (e.g., shareholder, director).
|
|
229
|
+
#
|
|
230
|
+
# @return [String, nil]
|
|
231
|
+
optional :relation, String
|
|
232
|
+
|
|
233
|
+
# @!attribute roles
|
|
234
|
+
# Roles held by the member (e.g., legal_representative or shareholder).
|
|
235
|
+
#
|
|
236
|
+
# @return [String, nil]
|
|
237
|
+
optional :roles, String
|
|
238
|
+
|
|
239
|
+
# @!attribute source
|
|
240
|
+
# Source of the data (e.g., gouv, user, company).
|
|
241
|
+
#
|
|
242
|
+
# @return [String, nil]
|
|
243
|
+
optional :source, String
|
|
244
|
+
|
|
245
|
+
# @!attribute status
|
|
246
|
+
# Current status of the member.
|
|
247
|
+
#
|
|
248
|
+
# @return [String, nil]
|
|
249
|
+
optional :status, String
|
|
250
|
+
|
|
251
|
+
# @!attribute type
|
|
252
|
+
# Type of entity (company or person).
|
|
253
|
+
#
|
|
254
|
+
# @return [Symbol, Dataleon::Models::Individuals::Kbis::Member::Type, nil]
|
|
255
|
+
optional :type, enum: -> { Dataleon::Individuals::Kbis::Member::Type }
|
|
256
|
+
|
|
257
|
+
# @!attribute workspace_id
|
|
258
|
+
# Workspace identifier for internal tracking.
|
|
259
|
+
#
|
|
260
|
+
# @return [String, nil]
|
|
261
|
+
optional :workspace_id, String
|
|
262
|
+
|
|
263
|
+
# @!method initialize(id: nil, address: nil, birthday: nil, birthplace: nil, country: nil, email: nil, first_name: nil, is_beneficial_owner: nil, is_delegator: nil, last_name: nil, liveness_verification: nil, name: nil, ownership_percentage: nil, phone_number: nil, postal_code: nil, registration_id: nil, relation: nil, roles: nil, source: nil, status: nil, type: nil, workspace_id: nil)
|
|
264
|
+
# A member (person or entity) associated with the company from a KBIS document.
|
|
265
|
+
#
|
|
266
|
+
# @param id [String] Unique identifier for the member.
|
|
267
|
+
#
|
|
268
|
+
# @param address [String] Address of the member.
|
|
269
|
+
#
|
|
270
|
+
# @param birthday [Time] Birth date of the person (only if type = person).
|
|
271
|
+
#
|
|
272
|
+
# @param birthplace [String] Place of birth (only if type = person).
|
|
273
|
+
#
|
|
274
|
+
# @param country [String] Country of residence or registration.
|
|
275
|
+
#
|
|
276
|
+
# @param email [String] Email address of the member.
|
|
277
|
+
#
|
|
278
|
+
# @param first_name [String] First name of the person (only if type = person).
|
|
279
|
+
#
|
|
280
|
+
# @param is_beneficial_owner [Boolean] Indicates if this member is a beneficial owner.
|
|
281
|
+
#
|
|
282
|
+
# @param is_delegator [Boolean] Indicates if this member is a delegator.
|
|
283
|
+
#
|
|
284
|
+
# @param last_name [String] Last name of the person (only if type = person).
|
|
285
|
+
#
|
|
286
|
+
# @param liveness_verification [Boolean] Indicates if the member passed liveness verification.
|
|
287
|
+
#
|
|
288
|
+
# @param name [String] Name of the company (only if type = company).
|
|
289
|
+
#
|
|
290
|
+
# @param ownership_percentage [Integer] Ownership percentage held by the member.
|
|
291
|
+
#
|
|
292
|
+
# @param phone_number [String] Phone number of the member.
|
|
293
|
+
#
|
|
294
|
+
# @param postal_code [String] Postal code of the member's address.
|
|
295
|
+
#
|
|
296
|
+
# @param registration_id [String] Company registration number (if type = company).
|
|
297
|
+
#
|
|
298
|
+
# @param relation [String] Type of relation (e.g., shareholder, director).
|
|
299
|
+
#
|
|
300
|
+
# @param roles [String] Roles held by the member (e.g., legal_representative or shareholder).
|
|
301
|
+
#
|
|
302
|
+
# @param source [String] Source of the data (e.g., gouv, user, company).
|
|
303
|
+
#
|
|
304
|
+
# @param status [String] Current status of the member.
|
|
305
|
+
#
|
|
306
|
+
# @param type [Symbol, Dataleon::Models::Individuals::Kbis::Member::Type] Type of entity (company or person).
|
|
307
|
+
#
|
|
308
|
+
# @param workspace_id [String] Workspace identifier for internal tracking.
|
|
309
|
+
|
|
310
|
+
# Type of entity (company or person).
|
|
311
|
+
#
|
|
312
|
+
# @see Dataleon::Models::Individuals::Kbis::Member#type
|
|
313
|
+
module Type
|
|
314
|
+
extend Dataleon::Internal::Type::Enum
|
|
315
|
+
|
|
316
|
+
COMPANY = :company
|
|
317
|
+
PERSON = :person
|
|
318
|
+
|
|
319
|
+
# @!method self.values
|
|
320
|
+
# @return [Array<Symbol>]
|
|
321
|
+
end
|
|
322
|
+
end
|
|
323
|
+
end
|
|
324
|
+
end
|
|
325
|
+
end
|
|
326
|
+
end
|
|
@@ -0,0 +1,71 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module Dataleon
|
|
4
|
+
[Dataleon::Internal::Type::BaseModel, *Dataleon::Internal::Type::BaseModel.subclasses].each do |cls|
|
|
5
|
+
cls.define_sorbet_constant!(:OrHash) { T.type_alias { T.any(cls, Dataleon::Internal::AnyHash) } }
|
|
6
|
+
end
|
|
7
|
+
|
|
8
|
+
Dataleon::Internal::Util.walk_namespaces(Dataleon::Models).each do |mod|
|
|
9
|
+
case mod
|
|
10
|
+
in Dataleon::Internal::Type::Enum | Dataleon::Internal::Type::Union
|
|
11
|
+
mod.constants.each do |name|
|
|
12
|
+
case mod.const_get(name)
|
|
13
|
+
in true | false
|
|
14
|
+
mod.define_sorbet_constant!(:TaggedBoolean) { T.type_alias { T::Boolean } }
|
|
15
|
+
mod.define_sorbet_constant!(:OrBoolean) { T.type_alias { T::Boolean } }
|
|
16
|
+
in Integer
|
|
17
|
+
mod.define_sorbet_constant!(:TaggedInteger) { T.type_alias { Integer } }
|
|
18
|
+
mod.define_sorbet_constant!(:OrInteger) { T.type_alias { Integer } }
|
|
19
|
+
in Float
|
|
20
|
+
mod.define_sorbet_constant!(:TaggedFloat) { T.type_alias { Float } }
|
|
21
|
+
mod.define_sorbet_constant!(:OrFloat) { T.type_alias { Float } }
|
|
22
|
+
in Symbol
|
|
23
|
+
mod.define_sorbet_constant!(:TaggedSymbol) { T.type_alias { Symbol } }
|
|
24
|
+
mod.define_sorbet_constant!(:OrSymbol) { T.type_alias { T.any(Symbol, String) } }
|
|
25
|
+
else
|
|
26
|
+
end
|
|
27
|
+
end
|
|
28
|
+
else
|
|
29
|
+
end
|
|
30
|
+
end
|
|
31
|
+
|
|
32
|
+
Dataleon::Internal::Util.walk_namespaces(Dataleon::Models)
|
|
33
|
+
.lazy
|
|
34
|
+
.grep(Dataleon::Internal::Type::Union)
|
|
35
|
+
.each do |mod|
|
|
36
|
+
const = :Variants
|
|
37
|
+
next if mod.sorbet_constant_defined?(const)
|
|
38
|
+
|
|
39
|
+
mod.define_sorbet_constant!(const) { T.type_alias { mod.to_sorbet_type } }
|
|
40
|
+
end
|
|
41
|
+
|
|
42
|
+
Check = Dataleon::Models::Check
|
|
43
|
+
|
|
44
|
+
Companies = Dataleon::Models::Companies
|
|
45
|
+
|
|
46
|
+
CompanyCreateParams = Dataleon::Models::CompanyCreateParams
|
|
47
|
+
|
|
48
|
+
CompanyDeleteParams = Dataleon::Models::CompanyDeleteParams
|
|
49
|
+
|
|
50
|
+
CompanyListParams = Dataleon::Models::CompanyListParams
|
|
51
|
+
|
|
52
|
+
CompanyRegistration = Dataleon::Models::CompanyRegistration
|
|
53
|
+
|
|
54
|
+
CompanyRetrieveParams = Dataleon::Models::CompanyRetrieveParams
|
|
55
|
+
|
|
56
|
+
CompanyUpdateParams = Dataleon::Models::CompanyUpdateParams
|
|
57
|
+
|
|
58
|
+
Individual = Dataleon::Models::Individual
|
|
59
|
+
|
|
60
|
+
IndividualCreateParams = Dataleon::Models::IndividualCreateParams
|
|
61
|
+
|
|
62
|
+
IndividualDeleteParams = Dataleon::Models::IndividualDeleteParams
|
|
63
|
+
|
|
64
|
+
IndividualListParams = Dataleon::Models::IndividualListParams
|
|
65
|
+
|
|
66
|
+
IndividualRetrieveParams = Dataleon::Models::IndividualRetrieveParams
|
|
67
|
+
|
|
68
|
+
Individuals = Dataleon::Models::Individuals
|
|
69
|
+
|
|
70
|
+
IndividualUpdateParams = Dataleon::Models::IndividualUpdateParams
|
|
71
|
+
end
|
|
@@ -0,0 +1,77 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module Dataleon
|
|
4
|
+
# Specify HTTP behaviour to use for a specific request. These options supplement
|
|
5
|
+
# or override those provided at the client level.
|
|
6
|
+
#
|
|
7
|
+
# When making a request, you can pass an actual {RequestOptions} instance, or
|
|
8
|
+
# simply pass a Hash with symbol keys matching the attributes on this class.
|
|
9
|
+
class RequestOptions < Dataleon::Internal::Type::BaseModel
|
|
10
|
+
# @api private
|
|
11
|
+
#
|
|
12
|
+
# @param opts [Dataleon::RequestOptions, Hash{Symbol=>Object}]
|
|
13
|
+
#
|
|
14
|
+
# @raise [ArgumentError]
|
|
15
|
+
def self.validate!(opts)
|
|
16
|
+
case opts
|
|
17
|
+
in Dataleon::RequestOptions | Hash
|
|
18
|
+
opts.to_h.each_key do |k|
|
|
19
|
+
unless fields.include?(k)
|
|
20
|
+
raise ArgumentError.new("Request `opts` keys must be one of #{fields.keys}, got #{k.inspect}")
|
|
21
|
+
end
|
|
22
|
+
end
|
|
23
|
+
else
|
|
24
|
+
raise ArgumentError.new("Request `opts` must be a Hash or RequestOptions, got #{opts.inspect}")
|
|
25
|
+
end
|
|
26
|
+
end
|
|
27
|
+
|
|
28
|
+
# @!attribute idempotency_key
|
|
29
|
+
# Idempotency key to send with request and all associated retries. Will only be
|
|
30
|
+
# sent for write requests.
|
|
31
|
+
#
|
|
32
|
+
# @return [String, nil]
|
|
33
|
+
optional :idempotency_key, String
|
|
34
|
+
|
|
35
|
+
# @!attribute extra_query
|
|
36
|
+
# Extra query params to send with the request. These are `.merge`’d into any
|
|
37
|
+
# `query` given at the client level.
|
|
38
|
+
#
|
|
39
|
+
# @return [Hash{String=>Array<String>, String, nil}, nil]
|
|
40
|
+
optional :extra_query, Dataleon::Internal::Type::HashOf[Dataleon::Internal::Type::ArrayOf[String]]
|
|
41
|
+
|
|
42
|
+
# @!attribute extra_headers
|
|
43
|
+
# Extra headers to send with the request. These are `.merged`’d into any
|
|
44
|
+
# `extra_headers` given at the client level.
|
|
45
|
+
#
|
|
46
|
+
# @return [Hash{String=>String, nil}, nil]
|
|
47
|
+
optional :extra_headers, Dataleon::Internal::Type::HashOf[String, nil?: true]
|
|
48
|
+
|
|
49
|
+
# @!attribute extra_body
|
|
50
|
+
# Extra data to send with the request. These are deep merged into any data
|
|
51
|
+
# generated as part of the normal request.
|
|
52
|
+
#
|
|
53
|
+
# @return [Object, nil]
|
|
54
|
+
optional :extra_body, Dataleon::Internal::Type::HashOf[Dataleon::Internal::Type::Unknown]
|
|
55
|
+
|
|
56
|
+
# @!attribute max_retries
|
|
57
|
+
# Maximum number of retries to attempt after a failed initial request.
|
|
58
|
+
#
|
|
59
|
+
# @return [Integer, nil]
|
|
60
|
+
optional :max_retries, Integer
|
|
61
|
+
|
|
62
|
+
# @!attribute timeout
|
|
63
|
+
# Request timeout in seconds.
|
|
64
|
+
#
|
|
65
|
+
# @return [Float, nil]
|
|
66
|
+
optional :timeout, Float
|
|
67
|
+
|
|
68
|
+
# @!method initialize(values = {})
|
|
69
|
+
# Returns a new instance of RequestOptions.
|
|
70
|
+
#
|
|
71
|
+
# @param values [Hash{Symbol=>Object}]
|
|
72
|
+
|
|
73
|
+
define_sorbet_constant!(:OrHash) do
|
|
74
|
+
T.type_alias { T.any(Dataleon::RequestOptions, Dataleon::Internal::AnyHash) }
|
|
75
|
+
end
|
|
76
|
+
end
|
|
77
|
+
end
|