voltaria_sdk 2.44.0 → 2.46.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.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 9fd476f34aa234e4c4573eb7653e05d0ba0eb878dd166e12a2497ba77883f5ea
4
- data.tar.gz: 1d25c5b04b36d5ae0be21183ad5a09234a3d26b193f85e101b53bc832e7c4338
3
+ metadata.gz: 3ff92e7f3be1dff47815a90235034cd230518bbc76c74eb126fc9cbf03f2fd9a
4
+ data.tar.gz: ed32671421441d49e80b32fc4dde2265dc8864c6c3c8e0b07fe50ccfd02ad0cb
5
5
  SHA512:
6
- metadata.gz: 02d807b4e7d053c3fc0feffd196e973fc336750be2c4580dc9180a7a751563ee2055892ba90484f51cefc328efa8a2bf430fd3a29444bd6c3e75d910bd562f0c
7
- data.tar.gz: 73ad7c320ca4d469c1c11b10ead887ce2c6ffa55b0e358c400efc0bd47dfbed8b094a4784062502f14b504eccdfa105e5cd2cdf38921be543e1029f6e228620a
6
+ metadata.gz: d67c0c7a790bd27e8ab17fdff1ae7320d8119e32cb8d00ffed9674174b1e84f87ce869ab41100c96df7717db1a7c89f61a85a7f0974b3c7af81db315da93e03c
7
+ data.tar.gz: ecb0d9c274089cb6aa9ab022173c088b748e54465933b8a2084f9ff03acd5bdb37a30f4b7b9d035fdf08aaf15feee4e95422d8e1c9ec54ea2b96e97f855e2e39
@@ -489,6 +489,53 @@ module Voltaria
489
489
  end
490
490
  end
491
491
 
492
+ # Retrieve every credit limit granted to a specific client.
493
+ #
494
+ # @param request_options [Hash]
495
+ # @param params [Hash]
496
+ # @option request_options [String] :base_url
497
+ # @option request_options [Hash{String => Object}] :additional_headers
498
+ # @option request_options [Hash{String => Object}] :additional_query_parameters
499
+ # @option request_options [Hash{String => Object}] :additional_body_parameters
500
+ # @option request_options [Integer] :timeout_in_seconds
501
+ # @option params [String] :client_id
502
+ # @option params [Integer, nil] :page
503
+ # @option params [Integer, nil] :page_size
504
+ # @option params [String, nil] :order_by
505
+ # @option params [String, nil] :q
506
+ #
507
+ # @return [Voltaria::Types::PaginatedResponseClientLimitHistoryResponse]
508
+ def list_client_limits(request_options: {}, **params)
509
+ params = Voltaria::Internal::Types::Utils.normalize_keys(params)
510
+ query_param_names = %i[page page_size order_by q]
511
+ query_params = {}
512
+ query_params["page"] = params[:page] if params.key?(:page)
513
+ query_params["page_size"] = params[:page_size] if params.key?(:page_size)
514
+ query_params["order_by"] = params[:order_by] if params.key?(:order_by)
515
+ query_params["q"] = params[:q] if params.key?(:q)
516
+ params = params.except(*query_param_names)
517
+
518
+ request = Voltaria::Internal::JSON::Request.new(
519
+ base_url: request_options[:base_url],
520
+ method: "GET",
521
+ path: "v2/clients/#{URI.encode_uri_component(params[:client_id].to_s)}/limits",
522
+ query: query_params,
523
+ request_options: request_options
524
+ )
525
+ begin
526
+ response = @client.send(request)
527
+ rescue Net::HTTPRequestTimeout
528
+ raise Voltaria::Errors::TimeoutError
529
+ end
530
+ code = response.code.to_i
531
+ if code.between?(200, 299)
532
+ Voltaria::Types::PaginatedResponseClientLimitHistoryResponse.load(response.body)
533
+ else
534
+ error_class = Voltaria::Errors::ResponseError.subclass_for_code(code)
535
+ raise error_class.new(response.body, code: code)
536
+ end
537
+ end
538
+
492
539
  # Retrieve detailed information for a specific client using their client ID.
493
540
  #
494
541
  # @param request_options [Hash]
@@ -0,0 +1,15 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Voltaria
4
+ module Clients
5
+ module Types
6
+ class ListClientLimitsRequest < Internal::Types::Model
7
+ field :client_id, -> { String }, optional: false, nullable: false
8
+ field :page, -> { Integer }, optional: true, nullable: false
9
+ field :page_size, -> { Integer }, optional: true, nullable: false
10
+ field :order_by, -> { String }, optional: true, nullable: false
11
+ field :q, -> { String }, optional: true, nullable: false
12
+ end
13
+ end
14
+ end
15
+ end
@@ -10,6 +10,7 @@ module Voltaria
10
10
  field :correlation_id, -> { String }, optional: true, nullable: false
11
11
  field :loan_date, -> { String }, optional: true, nullable: false
12
12
  field :installments, -> { Internal::Types::Array[Voltaria::Types::LoanInstallmentCreatePayload] }, optional: false, nullable: false
13
+ field :repayment_method, -> { Voltaria::Types::LoanRepaymentMethodEnum }, optional: true, nullable: false
13
14
  field :data, -> { Internal::Types::Hash[String, Object] }, optional: true, nullable: false
14
15
  end
15
16
  end
@@ -9,6 +9,7 @@ module Voltaria
9
9
  field :correlation_id, -> { String }, optional: true, nullable: false
10
10
  field :loan_date, -> { String }, optional: true, nullable: false
11
11
  field :installments, -> { Internal::Types::Array[Voltaria::Types::LoanInstallmentCreatePayload] }, optional: false, nullable: false
12
+ field :repayment_method, -> { Voltaria::Types::LoanRepaymentMethodEnum }, optional: true, nullable: false
12
13
  field :data, -> { Internal::Types::Hash[String, Object] }, optional: true, nullable: false
13
14
  end
14
15
  end
@@ -0,0 +1,12 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Voltaria
4
+ module Types
5
+ class ClientLimitHistoryResponse < Internal::Types::Model
6
+ field :id, -> { String }, optional: false, nullable: false
7
+ field :created_at, -> { String }, optional: false, nullable: false
8
+ field :currency, -> { Voltaria::Types::CurrencyEnum }, optional: false, nullable: false
9
+ field :limit, -> { String }, optional: false, nullable: false
10
+ end
11
+ end
12
+ end
@@ -19,6 +19,7 @@ module Voltaria
19
19
  field :payment_reference, -> { String }, optional: true, nullable: false
20
20
  field :early_settlement_date, -> { String }, optional: true, nullable: false
21
21
  field :early_settlement_amount, -> { String }, optional: true, nullable: false
22
+ field :repayment_method, -> { Voltaria::Types::LoanRepaymentMethodEnum }, optional: false, nullable: false
22
23
  field :data, -> { Internal::Types::Hash[String, Object] }, optional: true, nullable: false
23
24
  field :client, -> { Voltaria::Types::ClientBaseInfo }, optional: false, nullable: false
24
25
  field :outstanding_principal, -> { String }, optional: true, nullable: false
@@ -0,0 +1,12 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Voltaria
4
+ module Types
5
+ module LoanRepaymentMethodEnum
6
+ extend Voltaria::Internal::Types::Enum
7
+
8
+ PMT = "pmt"
9
+ CONSTANT_PRINCIPAL = "constant_principal"
10
+ end
11
+ end
12
+ end
@@ -19,6 +19,7 @@ module Voltaria
19
19
  field :payment_reference, -> { String }, optional: true, nullable: false
20
20
  field :early_settlement_date, -> { String }, optional: true, nullable: false
21
21
  field :early_settlement_amount, -> { String }, optional: true, nullable: false
22
+ field :repayment_method, -> { Voltaria::Types::LoanRepaymentMethodEnum }, optional: false, nullable: false
22
23
  field :data, -> { Internal::Types::Hash[String, Object] }, optional: true, nullable: false
23
24
  field :client, -> { Voltaria::Types::ClientBaseInfo }, optional: false, nullable: false
24
25
  field :outstanding_principal, -> { String }, optional: true, nullable: false
@@ -19,6 +19,7 @@ module Voltaria
19
19
  field :payment_reference, -> { String }, optional: true, nullable: false
20
20
  field :early_settlement_date, -> { String }, optional: true, nullable: false
21
21
  field :early_settlement_amount, -> { String }, optional: true, nullable: false
22
+ field :repayment_method, -> { Voltaria::Types::LoanRepaymentMethodEnum }, optional: false, nullable: false
22
23
  field :data, -> { Internal::Types::Hash[String, Object] }, optional: true, nullable: false
23
24
  field :installments, -> { Internal::Types::Array[Voltaria::Types::LoanInstallmentResponse] }, optional: true, nullable: false
24
25
  end
@@ -0,0 +1,16 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Voltaria
4
+ module Types
5
+ class PaginatedResponseClientLimitHistoryResponse < Internal::Types::Model
6
+ field :items, -> { Internal::Types::Array[Voltaria::Types::ClientLimitHistoryResponse] }, optional: false, nullable: false
7
+ field :page, -> { Integer }, optional: true, nullable: false
8
+ field :page_size, -> { Integer }, optional: true, nullable: false
9
+ field :items_in_page, -> { Integer }, optional: true, nullable: false
10
+ field :total_items, -> { Integer }, optional: true, nullable: false
11
+ field :total_pages, -> { Integer }, optional: true, nullable: false
12
+ field :has_next, -> { Internal::Types::Boolean }, optional: true, nullable: false
13
+ field :has_previous, -> { Internal::Types::Boolean }, optional: true, nullable: false
14
+ end
15
+ end
16
+ end
@@ -10,6 +10,7 @@ module Voltaria
10
10
  CLIENT_UPDATED = "client.updated"
11
11
  CLIENT_LIMIT_UPDATED = "client.limit.updated"
12
12
  PARTNER_LIMIT_UPDATED = "partner.limit.updated"
13
+ BANK_CONNECTION_UPDATED = "bank_connection.updated"
13
14
  end
14
15
  end
15
16
  end
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Voltaria
4
- VERSION = "2.44.0"
4
+ VERSION = "2.46.0"
5
5
  end
data/lib/voltaria.rb CHANGED
@@ -56,6 +56,7 @@ require_relative "voltaria/types/available_funding"
56
56
  require_relative "voltaria/types/bulk_loan_item_payload_amount"
57
57
  require_relative "voltaria/types/loan_installment_create_payload_amount"
58
58
  require_relative "voltaria/types/loan_installment_create_payload"
59
+ require_relative "voltaria/types/loan_repayment_method_enum"
59
60
  require_relative "voltaria/types/bulk_loan_item_payload"
60
61
  require_relative "voltaria/types/bulk_loan_item_result"
61
62
  require_relative "voltaria/types/bulk_loan_result"
@@ -77,6 +78,7 @@ require_relative "voltaria/types/jurisdiction_enum"
77
78
  require_relative "voltaria/types/client_base_info"
78
79
  require_relative "voltaria/types/client_data_response"
79
80
  require_relative "voltaria/types/client_investor_response"
81
+ require_relative "voltaria/types/client_limit_history_response"
80
82
  require_relative "voltaria/types/client_limit_response"
81
83
  require_relative "voltaria/types/client_response"
82
84
  require_relative "voltaria/types/client_user_status_enum"
@@ -114,6 +116,7 @@ require_relative "voltaria/types/note_response"
114
116
  require_relative "voltaria/types/paginated_response_checklist_summary_partner_response"
115
117
  require_relative "voltaria/types/paginated_response_client_account_response"
116
118
  require_relative "voltaria/types/paginated_response_client_investor_response"
119
+ require_relative "voltaria/types/paginated_response_client_limit_history_response"
117
120
  require_relative "voltaria/types/paginated_response_client_response"
118
121
  require_relative "voltaria/types/paginated_response_client_user_response"
119
122
  require_relative "voltaria/types/paginated_response_collection_action_log_response"
@@ -170,6 +173,7 @@ require_relative "voltaria/clients/types/reject_onboarding_request"
170
173
  require_relative "voltaria/clients/types/list_client_portal_users_request"
171
174
  require_relative "voltaria/clients/types/client_user_invite_request"
172
175
  require_relative "voltaria/clients/types/list_client_waivers_request"
176
+ require_relative "voltaria/clients/types/list_client_limits_request"
173
177
  require_relative "voltaria/clients/types/get_client_by_id_request"
174
178
  require_relative "voltaria/clients/types/delete_client_request"
175
179
  require_relative "voltaria/clients/types/list_client_checklist_summaries_request"
data/reference.md CHANGED
@@ -996,6 +996,100 @@ client.clients.list_client_waivers(client_id: "client_id")
996
996
  </dl>
997
997
 
998
998
 
999
+ </dd>
1000
+ </dl>
1001
+ </details>
1002
+
1003
+ <details><summary><code>client.clients.<a href="/lib/voltaria/clients/client.rb">list_client_limits</a>(client_id) -> Voltaria::Types::PaginatedResponseClientLimitHistoryResponse</code></summary>
1004
+ <dl>
1005
+ <dd>
1006
+
1007
+ #### 📝 Description
1008
+
1009
+ <dl>
1010
+ <dd>
1011
+
1012
+ <dl>
1013
+ <dd>
1014
+
1015
+ Retrieve every credit limit granted to a specific client.
1016
+ </dd>
1017
+ </dl>
1018
+ </dd>
1019
+ </dl>
1020
+
1021
+ #### 🔌 Usage
1022
+
1023
+ <dl>
1024
+ <dd>
1025
+
1026
+ <dl>
1027
+ <dd>
1028
+
1029
+ ```ruby
1030
+ client.clients.list_client_limits(client_id: "client_id")
1031
+ ```
1032
+ </dd>
1033
+ </dl>
1034
+ </dd>
1035
+ </dl>
1036
+
1037
+ #### ⚙️ Parameters
1038
+
1039
+ <dl>
1040
+ <dd>
1041
+
1042
+ <dl>
1043
+ <dd>
1044
+
1045
+ **client_id:** `String`
1046
+
1047
+ </dd>
1048
+ </dl>
1049
+
1050
+ <dl>
1051
+ <dd>
1052
+
1053
+ **page:** `Integer`
1054
+
1055
+ </dd>
1056
+ </dl>
1057
+
1058
+ <dl>
1059
+ <dd>
1060
+
1061
+ **page_size:** `Integer`
1062
+
1063
+ </dd>
1064
+ </dl>
1065
+
1066
+ <dl>
1067
+ <dd>
1068
+
1069
+ **order_by:** `String` — Field to order the results by, e.g., 'created_at:desc'
1070
+
1071
+ </dd>
1072
+ </dl>
1073
+
1074
+ <dl>
1075
+ <dd>
1076
+
1077
+ **q:** `String` — Query string for filtering. Format: "field:operator:value;...". Supported fields: id, currency, created_at, limit. Supported operators: is, in, not_in, contains, not_contains, like, not_like, ilike, not_ilike, gt, gte, lt, lte, starts_with, ends_with, is_null, is_not_null.
1078
+
1079
+ </dd>
1080
+ </dl>
1081
+
1082
+ <dl>
1083
+ <dd>
1084
+
1085
+ **request_options:** `Voltaria::Clients::RequestOptions`
1086
+
1087
+ </dd>
1088
+ </dl>
1089
+ </dd>
1090
+ </dl>
1091
+
1092
+
999
1093
  </dd>
1000
1094
  </dl>
1001
1095
  </details>
@@ -1331,7 +1425,7 @@ client.sandbox.update_loan(loan_id: "loan_id")
1331
1425
  <dl>
1332
1426
  <dd>
1333
1427
 
1334
- **status:** `Voltaria::Types::LoanStatusEnum` — The status of the client. One of the following: `pending, overdue, active, default, sold, restructured, repaid, pre_approved, rejected, deleted, inactive`
1428
+ **status:** `Voltaria::Types::LoanStatusEnum` — The status of the loan. One of the following: `pending, overdue, active, default, sold, restructured, repaid, pre_approved, rejected, inactive`. Use the delete loan endpoint to delete a loan.
1335
1429
 
1336
1430
  </dd>
1337
1431
  </dl>
@@ -1401,7 +1495,7 @@ client.sandbox.webhook_test(event_type: "loan.updated")
1401
1495
  <dl>
1402
1496
  <dd>
1403
1497
 
1404
- **event_type:** `Voltaria::Types::WebhookEventTypeEnum` — Event type to trigger for the test. All subscriptions for this event type will be triggered if webhook_id is not provided.Possible values: loan_updated, installment_updated, client_updated, client_limit_updated, partner_limit_updated
1498
+ **event_type:** `Voltaria::Types::WebhookEventTypeEnum` — Event type to trigger for the test. All subscriptions for this event type will be triggered if webhook_id is not provided.Possible values: loan_updated, installment_updated, client_updated, client_limit_updated, partner_limit_updated, bank_connection_updated
1405
1499
 
1406
1500
  </dd>
1407
1501
  </dl>
@@ -4079,6 +4173,14 @@ client.loans.create_loan(
4079
4173
  <dl>
4080
4174
  <dd>
4081
4175
 
4176
+ **repayment_method:** `Voltaria::Types::LoanRepaymentMethodEnum` — How each installment is split into principal and interest: pmt (amortising) or constant_principal (loan amount divided equally across installments, the rest is interest)
4177
+
4178
+ </dd>
4179
+ </dl>
4180
+
4181
+ <dl>
4182
+ <dd>
4183
+
4082
4184
  **data:** `Internal::Types::Hash[String, Object]` — Additional data related to the loan
4083
4185
 
4084
4186
  </dd>
@@ -5062,7 +5164,7 @@ client.webhooks.create_webhook_subscription(
5062
5164
  <dl>
5063
5165
  <dd>
5064
5166
 
5065
- **event_type:** `Voltaria::Types::WebhookEventTypeEnum` — Event type to subscribe toPossible values: loan_updated, installment_updated, client_updated, client_limit_updated, partner_limit_updated
5167
+ **event_type:** `Voltaria::Types::WebhookEventTypeEnum` — Event type to subscribe toPossible values: loan_updated, installment_updated, client_updated, client_limit_updated, partner_limit_updated, bank_connection_updated
5066
5168
 
5067
5169
  </dd>
5068
5170
  </dl>
@@ -5242,7 +5344,7 @@ client.webhooks.update_webhook_subscription(
5242
5344
  <dl>
5243
5345
  <dd>
5244
5346
 
5245
- **event_type:** `Voltaria::Types::WebhookEventTypeEnum` — Event type to subscribe toPossible values: loan_updated, installment_updated, client_updated, client_limit_updated, partner_limit_updated
5347
+ **event_type:** `Voltaria::Types::WebhookEventTypeEnum` — Event type to subscribe toPossible values: loan_updated, installment_updated, client_updated, client_limit_updated, partner_limit_updated, bank_connection_updated
5246
5348
 
5247
5349
  </dd>
5248
5350
  </dl>
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: voltaria_sdk
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.44.0
4
+ version: 2.46.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Voltaria
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2026-09-25 00:00:00.000000000 Z
11
+ date: 2026-10-09 00:00:00.000000000 Z
12
12
  dependencies: []
13
13
  description: The Voltaria Ruby library provides convenient access to the Voltaria
14
14
  API from Ruby.
@@ -40,6 +40,7 @@ files:
40
40
  - lib/voltaria/clients/types/limit_request_create_payload.rb
41
41
  - lib/voltaria/clients/types/limit_request_create_payload_requested_limit.rb
42
42
  - lib/voltaria/clients/types/list_client_checklist_summaries_request.rb
43
+ - lib/voltaria/clients/types/list_client_limits_request.rb
43
44
  - lib/voltaria/clients/types/list_client_portal_users_request.rb
44
45
  - lib/voltaria/clients/types/list_client_waivers_request.rb
45
46
  - lib/voltaria/clients/types/list_clients_request.rb
@@ -176,6 +177,7 @@ files:
176
177
  - lib/voltaria/types/client_base_info.rb
177
178
  - lib/voltaria/types/client_data_response.rb
178
179
  - lib/voltaria/types/client_investor_response.rb
180
+ - lib/voltaria/types/client_limit_history_response.rb
179
181
  - lib/voltaria/types/client_limit_response.rb
180
182
  - lib/voltaria/types/client_response.rb
181
183
  - lib/voltaria/types/client_status_enum.rb
@@ -208,6 +210,7 @@ files:
208
210
  - lib/voltaria/types/loan_installment_response.rb
209
211
  - lib/voltaria/types/loan_investor_response.rb
210
212
  - lib/voltaria/types/loan_payment_status_enum.rb
213
+ - lib/voltaria/types/loan_repayment_method_enum.rb
211
214
  - lib/voltaria/types/loan_response_with_client_info.rb
212
215
  - lib/voltaria/types/loan_response_with_installments.rb
213
216
  - lib/voltaria/types/loan_review_request_response.rb
@@ -217,6 +220,7 @@ files:
217
220
  - lib/voltaria/types/paginated_response_checklist_summary_partner_response.rb
218
221
  - lib/voltaria/types/paginated_response_client_account_response.rb
219
222
  - lib/voltaria/types/paginated_response_client_investor_response.rb
223
+ - lib/voltaria/types/paginated_response_client_limit_history_response.rb
220
224
  - lib/voltaria/types/paginated_response_client_response.rb
221
225
  - lib/voltaria/types/paginated_response_client_user_response.rb
222
226
  - lib/voltaria/types/paginated_response_collection_action_log_response.rb