didit-sdk 2.34.0 → 2.36.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.
@@ -37,6 +37,48 @@ module Didit
37
37
  )
38
38
  end
39
39
 
40
+ # List the banks of one country (public, unauthenticated)
41
+ #
42
+ # Lists the banks Didit covers in one country: id, name, segments, access modes, history days, pending
43
+ # transactions and whether the bank is operational. Public: no auth header. One cached document per country.
44
+ #
45
+ # +GET /v3/organization/bank-verification-coverage/{country}/+
46
+ #
47
+ # @param country [String] ISO 3166-1 alpha-3 code, for example `ESP`.
48
+ # @param request_options [Hash, nil] :timeout, :max_retries, :extra_headers, :extra_query, :extra_body
49
+ # @return [Didit::Types::BankVerificationCountryCoverage]
50
+ def bank_verification_country_coverage(country, request_options: nil)
51
+ @client.request(
52
+ :get,
53
+ "/v3/organization/bank-verification-coverage/{country}/",
54
+ path_params: { "country" => country },
55
+ auth: :none,
56
+ response: Types::BankVerificationCountryCoverage,
57
+ request_options: request_options
58
+ )
59
+ end
60
+
61
+ # List the countries with bank coverage (public, unauthenticated)
62
+ #
63
+ # Lists the countries where Didit covers banks, how many, and what is open today for each product. Public: no
64
+ # auth header. Cached publicly and revalidated with an `ETag`. What is open is read on every request from the
65
+ # switches the API uses, so a product that is not open today reads `false` even when its banks are listed. It
66
+ # carries no prices (see the bank verification pricing feed) and never names a supplier.
67
+ #
68
+ # +GET /v3/organization/bank-verification-coverage/+
69
+ #
70
+ # @param request_options [Hash, nil] :timeout, :max_retries, :extra_headers, :extra_query, :extra_body
71
+ # @return [Didit::Types::BankVerificationCoverage]
72
+ def bank_verification_coverage(request_options: nil)
73
+ @client.request(
74
+ :get,
75
+ "/v3/organization/bank-verification-coverage/",
76
+ auth: :none,
77
+ response: Types::BankVerificationCoverage,
78
+ request_options: request_options
79
+ )
80
+ end
81
+
40
82
  # Get the price book (public, unauthenticated)
41
83
  #
42
84
  # Returns Didit's public list prices: every plan with its monthly and yearly price and its discount, the white
@@ -135,5 +135,65 @@ module Didit
135
135
 
136
136
  VALUES = [BOOKED, PENDING].freeze
137
137
  end
138
+
139
+ # What happens. The operation description explains each value.
140
+ module BankSimulateConnectionParamsAction
141
+ NEW_TRANSACTIONS = "new_transactions"
142
+ PENDING_POSTED = "pending_posted"
143
+ BOOKING_CORRECTION = "booking_correction"
144
+ CONSENT_EXPIRING = "consent_expiring"
145
+ CONSENT_EXPIRED = "consent_expired"
146
+ REVOKED_BY_USER = "revoked_by_user"
147
+ REVOKED_BY_BANK = "revoked_by_bank"
148
+ SYNC_FAILED = "sync_failed"
149
+ SYNC_RECOVERED = "sync_recovered"
150
+ WEBHOOK_TWICE = "webhook_twice"
151
+ MIDNIGHT_BOOKING = "midnight_booking"
152
+ BUDGET_USED = "budget_used"
153
+ BUDGET_RESET = "budget_reset"
154
+
155
+ VALUES = [NEW_TRANSACTIONS, PENDING_POSTED, BOOKING_CORRECTION, CONSENT_EXPIRING, CONSENT_EXPIRED, REVOKED_BY_USER, REVOKED_BY_BANK, SYNC_FAILED, SYNC_RECOVERED, WEBHOOK_TWICE, MIDNIGHT_BOOKING, BUDGET_USED, BUDGET_RESET].freeze
156
+ end
157
+
158
+ # The failure the link records. Only accepted with `outcome: failed`, where it defaults to `bank_unavailable`.
159
+ module BankSimulateLinkParamsErrorCode
160
+ DUPLICATE_CONFLICT = "duplicate_conflict"
161
+ RENEWAL_LOGIN_MISMATCH = "renewal_login_mismatch"
162
+ REDUCED_GRANT = "reduced_grant"
163
+ CORPORATE_APPROVAL_NOT_SUPPORTED = "corporate_approval_not_supported"
164
+ ONGOING_ACCESS_NOT_AVAILABLE = "ongoing_access_not_available"
165
+ BANK_UNAVAILABLE = "bank_unavailable"
166
+ BANK_CANCELLED = "bank_cancelled"
167
+ CONSENT_DECLINED = "consent_declined"
168
+ READ_LIMIT = "read_limit"
169
+
170
+ VALUES = [DUPLICATE_CONFLICT, RENEWAL_LOGIN_MISMATCH, REDUCED_GRANT, CORPORATE_APPROVAL_NOT_SUPPORTED, ONGOING_ACCESS_NOT_AVAILABLE, BANK_UNAVAILABLE, BANK_CANCELLED, CONSENT_DECLINED, READ_LIMIT].freeze
171
+ end
172
+
173
+ # How the link ends.
174
+ module BankSimulateLinkParamsOutcome
175
+ COMPLETED = "completed"
176
+ CANCELLED = "cancelled"
177
+ FAILED = "failed"
178
+ DUPLICATE_CONFLICT = "duplicate_conflict"
179
+ REDUCED_GRANT = "reduced_grant"
180
+ RENEWAL_LOGIN_MISMATCH = "renewal_login_mismatch"
181
+
182
+ VALUES = [COMPLETED, CANCELLED, FAILED, DUPLICATE_CONFLICT, REDUCED_GRANT, RENEWAL_LOGIN_MISMATCH].freeze
183
+ end
184
+
185
+ # The Test Bank customer who signs in: `personal_basic` (one current account), `business_multi` (several business
186
+ # accounts), `long_history` (a long transaction history), `pending` (pending rows), `sparse_fields` (transactions
187
+ # with fields missing, one automatic sync a day) or `no_ongoing` (a bank that cannot keep access open).
188
+ module BankSimulateLinkParamsPersona
189
+ PERSONAL_BASIC = "personal_basic"
190
+ BUSINESS_MULTI = "business_multi"
191
+ LONG_HISTORY = "long_history"
192
+ PENDING = "pending"
193
+ SPARSE_FIELDS = "sparse_fields"
194
+ NO_ONGOING = "no_ongoing"
195
+
196
+ VALUES = [PERSONAL_BASIC, BUSINESS_MULTI, LONG_HISTORY, PENDING, SPARSE_FIELDS, NO_ONGOING].freeze
197
+ end
138
198
  end
139
199
  end
@@ -686,8 +686,12 @@ module Didit
686
686
  VALUES = [ONE_TIME, ONGOING].freeze
687
687
  end
688
688
 
689
- # Why the link failed. A failed link is not an HTTP error: the link reads with `status: failed` and this object. A
690
- # renew link whose connection changed meanwhile reads `renewal_not_needed` or `renewal_window_expired`.
689
+ # Why the link failed. A failed link is not an HTTP error: the link reads with `status: failed` and this object.
690
+ # `bank_cancelled` ends a link only on the fifth cancel at the bank: until then a person who backs out at the bank
691
+ # returns to the list of banks with a notice and the link stays `opened`. A bank that cannot be reached
692
+ # (`bank_unavailable`) also returns the person to the list of banks and leaves the link `opened`. A link ended by
693
+ # the simulate operation fails at once. A renew link whose connection changed meanwhile reads `renewal_not_needed`
694
+ # or `renewal_window_expired`.
691
695
  module BankLinkErrorCode
692
696
  DUPLICATE_CONFLICT = "duplicate_conflict"
693
697
  RENEWAL_LOGIN_MISMATCH = "renewal_login_mismatch"
@@ -847,9 +851,9 @@ module Didit
847
851
  VALUES = [CREDIT, DEBIT].freeze
848
852
  end
849
853
 
850
- # How `id` was matched. `bank_reference` and `route_id` are stable. `derived` is matched by content: it is stable
851
- # while the bank keeps reporting the entry unchanged, and a correction by the bank can then appear as one
852
- # `removed` and one `added`.
854
+ # How `id` was matched within the connection. `bank_reference` and `route_id` are stable. `derived` is matched by
855
+ # content: it is stable while the bank keeps reporting the entry unchanged, and a correction by the bank can then
856
+ # appear as one `removed` and one `added`. Across connections only a `bank_reference` is a reliable key.
853
857
  module BankTransactionIdentityQuality
854
858
  BANK_REFERENCE = "bank_reference"
855
859
  ROUTE_ID = "route_id"
@@ -867,6 +871,40 @@ module Didit
867
871
  VALUES = [BOOKED, PENDING].freeze
868
872
  end
869
873
 
874
+ # Known values of an open enum: the API may send others.
875
+ module BankVerificationCoverageBankAccess
876
+ ONE_TIME = "one_time"
877
+ ONGOING = "ongoing"
878
+
879
+ VALUES = [ONE_TIME, ONGOING].freeze
880
+ end
881
+
882
+ # Known values of an open enum: the API may send others.
883
+ module BankVerificationCoverageBankSegments
884
+ PERSONAL = "personal"
885
+ BUSINESS = "business"
886
+
887
+ VALUES = [PERSONAL, BUSINESS].freeze
888
+ end
889
+
890
+ # Whether the bank can be reached today: `operational`, `degraded` or `down`.
891
+ module BankVerificationCoverageBankStatus
892
+ OPERATIONAL = "operational"
893
+ DEGRADED = "degraded"
894
+ DOWN = "down"
895
+
896
+ VALUES = [OPERATIONAL, DEGRADED, DOWN].freeze
897
+ end
898
+
899
+ # Known values of an open enum: the API may send others.
900
+ module BankVerificationCoverageDataRead
901
+ ACCOUNTS = "accounts"
902
+ BALANCES = "balances"
903
+ TRANSACTIONS = "transactions"
904
+
905
+ VALUES = [ACCOUNTS, BALANCES, TRANSACTIONS].freeze
906
+ end
907
+
870
908
  # Currency of every price in the response.
871
909
  module BankVerificationPricingCurrency
872
910
  USD = "USD"
@@ -8451,7 +8489,7 @@ module Didit
8451
8489
  field :role, "role", :string
8452
8490
  end
8453
8491
 
8454
- # Full identifiers, returned to server-side callers with the bank data permission.
8492
+ # Full identifiers, returned to server-side callers with access to Bank data.
8455
8493
  class BankAccountIdentifiers < Didit::Model
8456
8494
  field :iban, "iban", :string
8457
8495
  field :bic, "bic", :string
@@ -8898,6 +8936,79 @@ module Didit
8898
8936
  field :reference, "reference", :string
8899
8937
  end
8900
8938
 
8939
+ class BankVerificationCountryCoverage < Didit::Model
8940
+ field :country, "country", :string
8941
+ field :name, "name", :string
8942
+ field :updated_at, "updated_at", :datetime
8943
+ field :open, "open", "BankVerificationCoverageOpen"
8944
+ field :data_read, "data_read", [:array, :string]
8945
+ field :balances_note, "balances_note", :string
8946
+ field :banks, "banks", [:array, "BankVerificationCoverageBank"]
8947
+ end
8948
+
8949
+ # Where Didit covers bank data and what is open today. No prices: see the bank verification pricing feed.
8950
+ class BankVerificationCoverage < Didit::Model
8951
+ field :updated_at, "updated_at", :datetime
8952
+ field :open, "open", "BankVerificationCoverageAvailability"
8953
+ field :data_read, "data_read", [:array, :string]
8954
+ field :balances_note, "balances_note", :string
8955
+ field :countries, "countries", [:map, "BankVerificationCoverageCountriesValue"]
8956
+ end
8957
+
8958
+ class BankVerificationCoverageAvailability < Didit::Model
8959
+ field :bank_verification_in_workflows, "bank_verification_in_workflows", "BankVerificationWorkflowsAvailability"
8960
+ field :bank_data_api_one_time, "bank_data_api_one_time", "BankVerificationOneTimeAvailability"
8961
+ field :bank_data_api_ongoing, "bank_data_api_ongoing", "BankVerificationOngoingAvailability"
8962
+ end
8963
+
8964
+ # One bank. Only what the catalogue has: a field nobody observed is left out. The id is a permanent public
8965
+ # identifier.
8966
+ class BankVerificationCoverageBank < Didit::Model
8967
+ field :id, "id", :string
8968
+ field :name, "name", :string
8969
+ field :country, "country", :string
8970
+ field :segments, "segments", [:array, :string]
8971
+ field :access, "access", [:array, :string]
8972
+ field :history_days_max, "history_days_max", :integer
8973
+ field :pending_transactions, "pending_transactions", :boolean
8974
+ field :status, "status", :string
8975
+ field :consent_days_max, "consent_days_max", :integer
8976
+ field :balance_types, "balance_types", [:array, :string]
8977
+ field :logo_url, "logo_url", :string
8978
+ end
8979
+
8980
+ class BankVerificationCoverageCountriesValue < Didit::Model
8981
+ field :name, "name", :string
8982
+ field :banks, "banks", :integer
8983
+ field :banks_by_segment, "banks_by_segment", "BankVerificationCoverageCountriesValueBanksBySegment"
8984
+ field :open, "open", "BankVerificationCoverageOpen"
8985
+ field :banks_url, "banks_url", :string
8986
+ end
8987
+
8988
+ class BankVerificationCoverageCountriesValueBanksBySegment < Didit::Model
8989
+ field :personal, "personal", :integer
8990
+ field :business, "business", :integer
8991
+ end
8992
+
8993
+ class BankVerificationCoverageOpen < Didit::Model
8994
+ field :bank_verification_in_workflows, "bank_verification_in_workflows", :boolean
8995
+ field :bank_data_api_one_time, "bank_data_api_one_time", :boolean
8996
+ field :bank_data_api_ongoing, "bank_data_api_ongoing", :boolean
8997
+ field :account_check, "account_check", :boolean
8998
+ end
8999
+
9000
+ # The Bank data API with one-time access, for live applications.
9001
+ class BankVerificationOneTimeAvailability < Didit::Model
9002
+ field :live_applications, "live_applications", :boolean
9003
+ field :countries, "countries", [:array, :string]
9004
+ end
9005
+
9006
+ # The Bank data API with ongoing access, for live applications.
9007
+ class BankVerificationOngoingAvailability < Didit::Model
9008
+ field :live_applications, "live_applications", :boolean
9009
+ field :countries, "countries", [:array, :string]
9010
+ end
9011
+
8901
9012
  # Public Bank Verification list prices: the statement upload, the own provider key fee and each country's methods.
8902
9013
  class BankVerificationPricing < Didit::Model
8903
9014
  field :currency, "currency", :string
@@ -9036,6 +9147,12 @@ module Didit
9036
9147
  field :requested_scopes, "requested_scopes", [:array, :string]
9037
9148
  end
9038
9149
 
9150
+ # Bank Verification inside verification workflows.
9151
+ class BankVerificationWorkflowsAvailability < Didit::Model
9152
+ field :live, "live", :boolean
9153
+ field :countries, "countries", [:array, :string]
9154
+ end
9155
+
9039
9156
  # Result of a top-up charged to the organization's saved card.
9040
9157
  class BillingTopUpCharge < Didit::Model
9041
9158
  field :outcome, "outcome", :string