voltaria_sdk 2.45.0 → 2.47.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 (26) hide show
  1. checksums.yaml +4 -4
  2. data/lib/voltaria/clients/client.rb +172 -0
  3. data/lib/voltaria/clients/types/client_counterparty_create_payload.rb +15 -0
  4. data/lib/voltaria/clients/types/client_counterparty_update_payload.rb +16 -0
  5. data/lib/voltaria/clients/types/list_all_client_counterparties_request.rb +14 -0
  6. data/lib/voltaria/clients/types/list_client_counterparties_request.rb +15 -0
  7. data/lib/voltaria/documents/client.rb +1 -0
  8. data/lib/voltaria/documents/types/document_create_payload.rb +1 -0
  9. data/lib/voltaria/loans/types/loan_create_payload.rb +1 -0
  10. data/lib/voltaria/types/bulk_loan_item_payload.rb +1 -0
  11. data/lib/voltaria/types/client_counterparty_response.rb +17 -0
  12. data/lib/voltaria/types/client_counterparty_status_enum.rb +13 -0
  13. data/lib/voltaria/types/client_counterparty_with_client_response.rb +18 -0
  14. data/lib/voltaria/types/document_response.rb +1 -0
  15. data/lib/voltaria/types/early_settlement_response.rb +1 -1
  16. data/lib/voltaria/types/loan_investor_response.rb +1 -0
  17. data/lib/voltaria/types/loan_repayment_method_enum.rb +12 -0
  18. data/lib/voltaria/types/loan_response_with_client_info.rb +1 -0
  19. data/lib/voltaria/types/loan_response_with_installments.rb +1 -0
  20. data/lib/voltaria/types/paginated_response_client_counterparty_response.rb +16 -0
  21. data/lib/voltaria/types/paginated_response_client_counterparty_with_client_response.rb +16 -0
  22. data/lib/voltaria/types/webhook_event_type_enum.rb +1 -0
  23. data/lib/voltaria/version.rb +1 -1
  24. data/lib/voltaria.rb +10 -0
  25. data/reference.md +403 -5
  26. metadata +12 -2
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: babbba3ea4aa527ce026db862386a0125ee9dda1434631662758360fa1a0fe69
4
- data.tar.gz: c720a108bec5a3e240f07d856d402fc259038bb7a75cc752f97b0f11d771d03f
3
+ metadata.gz: 81602b19269b7aabc3ae25330f693d0909295e60f2a78ca8fadf4f5a80ad287a
4
+ data.tar.gz: f165fb4ae3714211a65fa976a2ff0d85018a6b5197788c8f85137e6c9c046104
5
5
  SHA512:
6
- metadata.gz: d189203188759f1f522fd51419e24bb2d3ecf8d5c4f3dc0ee455ddce83f30cd4c1a34b6e26b73784bb4737fbc7ffd3cc445a567fc261c0ef76cf7fc2a6b72896
7
- data.tar.gz: f7c3af252f9f2d019fcbb3612abc619de13293614b82e41a87b72afb3819f64ec79b03308f57ac8946bed1cbdc05a663eef420052d96867ddca63247a8e0bf0d
6
+ metadata.gz: 77017afd04a701c0161c2009b466bb8834086e30310b73c3ddb56fc6ed3d7fc7eb5f5a71582d9b7c2279634deb8e4467df66a95001291df8d48e81ee18d8ab9c
7
+ data.tar.gz: 938e910741af3565d14b54045cc1673dd17c5b4ad336f51e744db45823ed4a4b621dcd3dfde9bf9d87de61e5c8c0a5be362e79913c7655f7389ebce7c08457a6
@@ -536,6 +536,132 @@ module Voltaria
536
536
  end
537
537
  end
538
538
 
539
+ # Retrieve the counterparties of a specific client, e.g. its debtors or installers.
540
+ #
541
+ # @param request_options [Hash]
542
+ # @param params [Hash]
543
+ # @option request_options [String] :base_url
544
+ # @option request_options [Hash{String => Object}] :additional_headers
545
+ # @option request_options [Hash{String => Object}] :additional_query_parameters
546
+ # @option request_options [Hash{String => Object}] :additional_body_parameters
547
+ # @option request_options [Integer] :timeout_in_seconds
548
+ # @option params [String] :client_id
549
+ # @option params [Integer, nil] :page
550
+ # @option params [Integer, nil] :page_size
551
+ # @option params [String, nil] :order_by
552
+ # @option params [String, nil] :q
553
+ #
554
+ # @return [Voltaria::Types::PaginatedResponseClientCounterpartyResponse]
555
+ def list_client_counterparties(request_options: {}, **params)
556
+ params = Voltaria::Internal::Types::Utils.normalize_keys(params)
557
+ query_param_names = %i[page page_size order_by q]
558
+ query_params = {}
559
+ query_params["page"] = params[:page] if params.key?(:page)
560
+ query_params["page_size"] = params[:page_size] if params.key?(:page_size)
561
+ query_params["order_by"] = params[:order_by] if params.key?(:order_by)
562
+ query_params["q"] = params[:q] if params.key?(:q)
563
+ params = params.except(*query_param_names)
564
+
565
+ request = Voltaria::Internal::JSON::Request.new(
566
+ base_url: request_options[:base_url],
567
+ method: "GET",
568
+ path: "v2/clients/#{URI.encode_uri_component(params[:client_id].to_s)}/counterparties",
569
+ query: query_params,
570
+ request_options: request_options
571
+ )
572
+ begin
573
+ response = @client.send(request)
574
+ rescue Net::HTTPRequestTimeout
575
+ raise Voltaria::Errors::TimeoutError
576
+ end
577
+ code = response.code.to_i
578
+ if code.between?(200, 299)
579
+ Voltaria::Types::PaginatedResponseClientCounterpartyResponse.load(response.body)
580
+ else
581
+ error_class = Voltaria::Errors::ResponseError.subclass_for_code(code)
582
+ raise error_class.new(response.body, code: code)
583
+ end
584
+ end
585
+
586
+ # Add a counterparty to a specific client. It starts with your default counterparty status.
587
+ #
588
+ # @param request_options [Hash]
589
+ # @param params [Voltaria::Clients::Types::ClientCounterpartyCreatePayload]
590
+ # @option request_options [String] :base_url
591
+ # @option request_options [Hash{String => Object}] :additional_headers
592
+ # @option request_options [Hash{String => Object}] :additional_query_parameters
593
+ # @option request_options [Hash{String => Object}] :additional_body_parameters
594
+ # @option request_options [Integer] :timeout_in_seconds
595
+ # @option params [String] :client_id
596
+ #
597
+ # @return [Voltaria::Types::ClientCounterpartyResponse]
598
+ def create_client_counterparty(request_options: {}, **params)
599
+ params = Voltaria::Internal::Types::Utils.normalize_keys(params)
600
+ request_data = Voltaria::Clients::Types::ClientCounterpartyCreatePayload.new(params).to_h
601
+ non_body_param_names = ["client_id"]
602
+ body = request_data.except(*non_body_param_names)
603
+
604
+ request = Voltaria::Internal::JSON::Request.new(
605
+ base_url: request_options[:base_url],
606
+ method: "POST",
607
+ path: "v2/clients/#{URI.encode_uri_component(params[:client_id].to_s)}/counterparties",
608
+ body: body,
609
+ request_options: request_options
610
+ )
611
+ begin
612
+ response = @client.send(request)
613
+ rescue Net::HTTPRequestTimeout
614
+ raise Voltaria::Errors::TimeoutError
615
+ end
616
+ code = response.code.to_i
617
+ if code.between?(200, 299)
618
+ Voltaria::Types::ClientCounterpartyResponse.load(response.body)
619
+ else
620
+ error_class = Voltaria::Errors::ResponseError.subclass_for_code(code)
621
+ raise error_class.new(response.body, code: code)
622
+ end
623
+ end
624
+
625
+ # Update the details of a counterparty of a specific client.
626
+ #
627
+ # @param request_options [Hash]
628
+ # @param params [Voltaria::Clients::Types::ClientCounterpartyUpdatePayload]
629
+ # @option request_options [String] :base_url
630
+ # @option request_options [Hash{String => Object}] :additional_headers
631
+ # @option request_options [Hash{String => Object}] :additional_query_parameters
632
+ # @option request_options [Hash{String => Object}] :additional_body_parameters
633
+ # @option request_options [Integer] :timeout_in_seconds
634
+ # @option params [String] :client_id
635
+ # @option params [String] :counterparty_id
636
+ #
637
+ # @return [Voltaria::Types::ClientCounterpartyResponse]
638
+ def update_client_counterparty(request_options: {}, **params)
639
+ params = Voltaria::Internal::Types::Utils.normalize_keys(params)
640
+ request_data = Voltaria::Clients::Types::ClientCounterpartyUpdatePayload.new(params).to_h
641
+ non_body_param_names = %w[client_id counterparty_id]
642
+ body = request_data.except(*non_body_param_names)
643
+
644
+ request = Voltaria::Internal::JSON::Request.new(
645
+ base_url: request_options[:base_url],
646
+ method: "PATCH",
647
+ path: "v2/clients/#{URI.encode_uri_component(params[:client_id].to_s)}/counterparties/#{URI.encode_uri_component(params[:counterparty_id].to_s)}",
648
+ body: body,
649
+ request_options: request_options
650
+ )
651
+ begin
652
+ response = @client.send(request)
653
+ rescue Net::HTTPRequestTimeout
654
+ raise Voltaria::Errors::TimeoutError
655
+ end
656
+ code = response.code.to_i
657
+ if code.between?(200, 299)
658
+ Voltaria::Types::ClientCounterpartyResponse.load(response.body)
659
+ else
660
+ error_class = Voltaria::Errors::ResponseError.subclass_for_code(code)
661
+ raise error_class.new(response.body, code: code)
662
+ end
663
+ end
664
+
539
665
  # Retrieve detailed information for a specific client using their client ID.
540
666
  #
541
667
  # @param request_options [Hash]
@@ -646,6 +772,52 @@ module Voltaria
646
772
  raise error_class.new(response.body, code: code)
647
773
  end
648
774
  end
775
+
776
+ # Retrieve the counterparties of all your clients, e.g. their debtors or installers, with each client's name.
777
+ #
778
+ # @param request_options [Hash]
779
+ # @param params [Hash]
780
+ # @option request_options [String] :base_url
781
+ # @option request_options [Hash{String => Object}] :additional_headers
782
+ # @option request_options [Hash{String => Object}] :additional_query_parameters
783
+ # @option request_options [Hash{String => Object}] :additional_body_parameters
784
+ # @option request_options [Integer] :timeout_in_seconds
785
+ # @option params [Integer, nil] :page
786
+ # @option params [Integer, nil] :page_size
787
+ # @option params [String, nil] :order_by
788
+ # @option params [String, nil] :q
789
+ #
790
+ # @return [Voltaria::Types::PaginatedResponseClientCounterpartyWithClientResponse]
791
+ def list_all_client_counterparties(request_options: {}, **params)
792
+ params = Voltaria::Internal::Types::Utils.normalize_keys(params)
793
+ query_param_names = %i[page page_size order_by q]
794
+ query_params = {}
795
+ query_params["page"] = params[:page] if params.key?(:page)
796
+ query_params["page_size"] = params[:page_size] if params.key?(:page_size)
797
+ query_params["order_by"] = params[:order_by] if params.key?(:order_by)
798
+ query_params["q"] = params[:q] if params.key?(:q)
799
+ params.except(*query_param_names)
800
+
801
+ request = Voltaria::Internal::JSON::Request.new(
802
+ base_url: request_options[:base_url],
803
+ method: "GET",
804
+ path: "v2/client-counterparties",
805
+ query: query_params,
806
+ request_options: request_options
807
+ )
808
+ begin
809
+ response = @client.send(request)
810
+ rescue Net::HTTPRequestTimeout
811
+ raise Voltaria::Errors::TimeoutError
812
+ end
813
+ code = response.code.to_i
814
+ if code.between?(200, 299)
815
+ Voltaria::Types::PaginatedResponseClientCounterpartyWithClientResponse.load(response.body)
816
+ else
817
+ error_class = Voltaria::Errors::ResponseError.subclass_for_code(code)
818
+ raise error_class.new(response.body, code: code)
819
+ end
820
+ end
649
821
  end
650
822
  end
651
823
  end
@@ -0,0 +1,15 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Voltaria
4
+ module Clients
5
+ module Types
6
+ class ClientCounterpartyCreatePayload < Internal::Types::Model
7
+ field :client_id, -> { String }, optional: false, nullable: false
8
+ field :name, -> { String }, optional: false, nullable: false
9
+ field :country, -> { String }, optional: true, nullable: false
10
+ field :company_number, -> { String }, optional: true, nullable: false
11
+ field :notes, -> { String }, optional: true, nullable: false
12
+ end
13
+ end
14
+ end
15
+ end
@@ -0,0 +1,16 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Voltaria
4
+ module Clients
5
+ module Types
6
+ class ClientCounterpartyUpdatePayload < Internal::Types::Model
7
+ field :client_id, -> { String }, optional: false, nullable: false
8
+ field :counterparty_id, -> { String }, optional: false, nullable: false
9
+ field :name, -> { String }, optional: true, nullable: false
10
+ field :country, -> { String }, optional: true, nullable: false
11
+ field :company_number, -> { String }, optional: true, nullable: false
12
+ field :notes, -> { String }, optional: true, nullable: false
13
+ end
14
+ end
15
+ end
16
+ end
@@ -0,0 +1,14 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Voltaria
4
+ module Clients
5
+ module Types
6
+ class ListAllClientCounterpartiesRequest < Internal::Types::Model
7
+ field :page, -> { Integer }, optional: true, nullable: false
8
+ field :page_size, -> { Integer }, optional: true, nullable: false
9
+ field :order_by, -> { String }, optional: true, nullable: false
10
+ field :q, -> { String }, optional: true, nullable: false
11
+ end
12
+ end
13
+ end
14
+ end
@@ -0,0 +1,15 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Voltaria
4
+ module Clients
5
+ module Types
6
+ class ListClientCounterpartiesRequest < 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
@@ -74,6 +74,7 @@ module Voltaria
74
74
  # @option request_options [Hash{String => Object}] :additional_body_parameters
75
75
  # @option request_options [Integer] :timeout_in_seconds
76
76
  # @option params [String, nil] :client_id
77
+ # @option params [String, nil] :client_counterparty_id
77
78
  # @option params [String, nil] :loan_id
78
79
  # @option params [String, nil] :installment_id
79
80
  # @option params [String, nil] :waterfall_id
@@ -5,6 +5,7 @@ module Voltaria
5
5
  module Types
6
6
  class DocumentCreatePayload < Internal::Types::Model
7
7
  field :client_id, -> { String }, optional: true, nullable: false
8
+ field :client_counterparty_id, -> { String }, optional: true, nullable: false
8
9
  field :loan_id, -> { String }, optional: true, nullable: false
9
10
  field :installment_id, -> { String }, optional: true, nullable: false
10
11
  field :waterfall_id, -> { String }, optional: true, nullable: false
@@ -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,17 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Voltaria
4
+ module Types
5
+ class ClientCounterpartyResponse < Internal::Types::Model
6
+ field :id, -> { String }, optional: false, nullable: false
7
+ field :name, -> { String }, optional: false, nullable: false
8
+ field :country, -> { String }, optional: true, nullable: false
9
+ field :company_number, -> { String }, optional: true, nullable: false
10
+ field :status, -> { Voltaria::Types::ClientCounterpartyStatusEnum }, optional: false, nullable: false
11
+ field :created_at, -> { String }, optional: false, nullable: false
12
+ field :updated_at, -> { String }, optional: false, nullable: false
13
+ field :client_id, -> { String }, optional: false, nullable: false
14
+ field :notes, -> { String }, optional: true, nullable: false
15
+ end
16
+ end
17
+ end
@@ -0,0 +1,13 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Voltaria
4
+ module Types
5
+ module ClientCounterpartyStatusEnum
6
+ extend Voltaria::Internal::Types::Enum
7
+
8
+ PENDING = "pending"
9
+ ACTIVE = "active"
10
+ INACTIVE = "inactive"
11
+ end
12
+ end
13
+ end
@@ -0,0 +1,18 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Voltaria
4
+ module Types
5
+ class ClientCounterpartyWithClientResponse < Internal::Types::Model
6
+ field :id, -> { String }, optional: false, nullable: false
7
+ field :name, -> { String }, optional: false, nullable: false
8
+ field :country, -> { String }, optional: true, nullable: false
9
+ field :company_number, -> { String }, optional: true, nullable: false
10
+ field :status, -> { Voltaria::Types::ClientCounterpartyStatusEnum }, optional: false, nullable: false
11
+ field :created_at, -> { String }, optional: false, nullable: false
12
+ field :updated_at, -> { String }, optional: false, nullable: false
13
+ field :client_id, -> { String }, optional: false, nullable: false
14
+ field :notes, -> { String }, optional: true, nullable: false
15
+ field :client_name, -> { String }, optional: false, nullable: false
16
+ end
17
+ end
18
+ end
@@ -8,6 +8,7 @@ module Voltaria
8
8
  field :file_name, -> { String }, optional: false, nullable: false
9
9
  field :file_type, -> { String }, optional: false, nullable: false
10
10
  field :client_id, -> { String }, optional: true, nullable: false
11
+ field :client_counterparty_id, -> { String }, optional: true, nullable: false
11
12
  field :file_url, -> { String }, optional: true, nullable: false
12
13
  field :loan_id, -> { String }, optional: true, nullable: false
13
14
  field :installment_id, -> { String }, optional: true, nullable: false
@@ -6,7 +6,7 @@ module Voltaria
6
6
  field :loan_id, -> { String }, optional: false, nullable: false
7
7
  field :settlement_date, -> { String }, optional: false, nullable: false
8
8
  field :settlement_amount, -> { String }, optional: false, nullable: false
9
- field :settlement_irr, -> { String }, optional: false, nullable: false
9
+ field :settlement_irr, -> { String }, optional: false, nullable: true
10
10
  field :original_irr, -> { String }, optional: true, nullable: false
11
11
  field :minimum_fee, -> { String }, optional: true, nullable: false
12
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 PaginatedResponseClientCounterpartyResponse < Internal::Types::Model
6
+ field :items, -> { Internal::Types::Array[Voltaria::Types::ClientCounterpartyResponse] }, 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
@@ -0,0 +1,16 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Voltaria
4
+ module Types
5
+ class PaginatedResponseClientCounterpartyWithClientResponse < Internal::Types::Model
6
+ field :items, -> { Internal::Types::Array[Voltaria::Types::ClientCounterpartyWithClientResponse] }, 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.45.0"
4
+ VERSION = "2.47.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"
@@ -75,6 +76,9 @@ require_relative "voltaria/types/client_status_enum"
75
76
  require_relative "voltaria/types/client_type_enum"
76
77
  require_relative "voltaria/types/jurisdiction_enum"
77
78
  require_relative "voltaria/types/client_base_info"
79
+ require_relative "voltaria/types/client_counterparty_status_enum"
80
+ require_relative "voltaria/types/client_counterparty_response"
81
+ require_relative "voltaria/types/client_counterparty_with_client_response"
78
82
  require_relative "voltaria/types/client_data_response"
79
83
  require_relative "voltaria/types/client_investor_response"
80
84
  require_relative "voltaria/types/client_limit_history_response"
@@ -114,6 +118,8 @@ require_relative "voltaria/types/loan_review_request_response"
114
118
  require_relative "voltaria/types/note_response"
115
119
  require_relative "voltaria/types/paginated_response_checklist_summary_partner_response"
116
120
  require_relative "voltaria/types/paginated_response_client_account_response"
121
+ require_relative "voltaria/types/paginated_response_client_counterparty_response"
122
+ require_relative "voltaria/types/paginated_response_client_counterparty_with_client_response"
117
123
  require_relative "voltaria/types/paginated_response_client_investor_response"
118
124
  require_relative "voltaria/types/paginated_response_client_limit_history_response"
119
125
  require_relative "voltaria/types/paginated_response_client_response"
@@ -173,9 +179,13 @@ require_relative "voltaria/clients/types/list_client_portal_users_request"
173
179
  require_relative "voltaria/clients/types/client_user_invite_request"
174
180
  require_relative "voltaria/clients/types/list_client_waivers_request"
175
181
  require_relative "voltaria/clients/types/list_client_limits_request"
182
+ require_relative "voltaria/clients/types/list_client_counterparties_request"
183
+ require_relative "voltaria/clients/types/client_counterparty_create_payload"
184
+ require_relative "voltaria/clients/types/client_counterparty_update_payload"
176
185
  require_relative "voltaria/clients/types/get_client_by_id_request"
177
186
  require_relative "voltaria/clients/types/delete_client_request"
178
187
  require_relative "voltaria/clients/types/list_client_checklist_summaries_request"
188
+ require_relative "voltaria/clients/types/list_all_client_counterparties_request"
179
189
  require_relative "voltaria/sandbox/client"
180
190
  require_relative "voltaria/sandbox/types/client_update_sandbox"
181
191
  require_relative "voltaria/sandbox/types/loan_update_sandbox"
data/reference.md CHANGED
@@ -1090,6 +1090,302 @@ client.clients.list_client_limits(client_id: "client_id")
1090
1090
  </dl>
1091
1091
 
1092
1092
 
1093
+ </dd>
1094
+ </dl>
1095
+ </details>
1096
+
1097
+ <details><summary><code>client.clients.<a href="/lib/voltaria/clients/client.rb">list_client_counterparties</a>(client_id) -> Voltaria::Types::PaginatedResponseClientCounterpartyResponse</code></summary>
1098
+ <dl>
1099
+ <dd>
1100
+
1101
+ #### 📝 Description
1102
+
1103
+ <dl>
1104
+ <dd>
1105
+
1106
+ <dl>
1107
+ <dd>
1108
+
1109
+ Retrieve the counterparties of a specific client, e.g. its debtors or installers.
1110
+ </dd>
1111
+ </dl>
1112
+ </dd>
1113
+ </dl>
1114
+
1115
+ #### 🔌 Usage
1116
+
1117
+ <dl>
1118
+ <dd>
1119
+
1120
+ <dl>
1121
+ <dd>
1122
+
1123
+ ```ruby
1124
+ client.clients.list_client_counterparties(client_id: "client_id")
1125
+ ```
1126
+ </dd>
1127
+ </dl>
1128
+ </dd>
1129
+ </dl>
1130
+
1131
+ #### ⚙️ Parameters
1132
+
1133
+ <dl>
1134
+ <dd>
1135
+
1136
+ <dl>
1137
+ <dd>
1138
+
1139
+ **client_id:** `String`
1140
+
1141
+ </dd>
1142
+ </dl>
1143
+
1144
+ <dl>
1145
+ <dd>
1146
+
1147
+ **page:** `Integer`
1148
+
1149
+ </dd>
1150
+ </dl>
1151
+
1152
+ <dl>
1153
+ <dd>
1154
+
1155
+ **page_size:** `Integer`
1156
+
1157
+ </dd>
1158
+ </dl>
1159
+
1160
+ <dl>
1161
+ <dd>
1162
+
1163
+ **order_by:** `String` — Field to order the results by, e.g., 'created_at:desc'
1164
+
1165
+ </dd>
1166
+ </dl>
1167
+
1168
+ <dl>
1169
+ <dd>
1170
+
1171
+ **q:** `String` — Query string for filtering. Format: "field:operator:value;...". Supported fields: id, client_id, name, country, company_number, status, created_at. 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.
1172
+
1173
+ </dd>
1174
+ </dl>
1175
+
1176
+ <dl>
1177
+ <dd>
1178
+
1179
+ **request_options:** `Voltaria::Clients::RequestOptions`
1180
+
1181
+ </dd>
1182
+ </dl>
1183
+ </dd>
1184
+ </dl>
1185
+
1186
+
1187
+ </dd>
1188
+ </dl>
1189
+ </details>
1190
+
1191
+ <details><summary><code>client.clients.<a href="/lib/voltaria/clients/client.rb">create_client_counterparty</a>(client_id, request) -> Voltaria::Types::ClientCounterpartyResponse</code></summary>
1192
+ <dl>
1193
+ <dd>
1194
+
1195
+ #### 📝 Description
1196
+
1197
+ <dl>
1198
+ <dd>
1199
+
1200
+ <dl>
1201
+ <dd>
1202
+
1203
+ Add a counterparty to a specific client. It starts with your default counterparty status.
1204
+ </dd>
1205
+ </dl>
1206
+ </dd>
1207
+ </dl>
1208
+
1209
+ #### 🔌 Usage
1210
+
1211
+ <dl>
1212
+ <dd>
1213
+
1214
+ <dl>
1215
+ <dd>
1216
+
1217
+ ```ruby
1218
+ client.clients.create_client_counterparty(
1219
+ client_id: "client_id",
1220
+ name: "Acme Installations Ltd"
1221
+ )
1222
+ ```
1223
+ </dd>
1224
+ </dl>
1225
+ </dd>
1226
+ </dl>
1227
+
1228
+ #### ⚙️ Parameters
1229
+
1230
+ <dl>
1231
+ <dd>
1232
+
1233
+ <dl>
1234
+ <dd>
1235
+
1236
+ **client_id:** `String`
1237
+
1238
+ </dd>
1239
+ </dl>
1240
+
1241
+ <dl>
1242
+ <dd>
1243
+
1244
+ **name:** `String` — The counterparty's legal or trading name
1245
+
1246
+ </dd>
1247
+ </dl>
1248
+
1249
+ <dl>
1250
+ <dd>
1251
+
1252
+ **country:** `String` — ISO 3166-1 alpha-2 code of the country the counterparty is registered in
1253
+
1254
+ </dd>
1255
+ </dl>
1256
+
1257
+ <dl>
1258
+ <dd>
1259
+
1260
+ **company_number:** `String` — The counterparty's company registration number
1261
+
1262
+ </dd>
1263
+ </dl>
1264
+
1265
+ <dl>
1266
+ <dd>
1267
+
1268
+ **notes:** `String` — Free-text notes about the counterparty
1269
+
1270
+ </dd>
1271
+ </dl>
1272
+
1273
+ <dl>
1274
+ <dd>
1275
+
1276
+ **request_options:** `Voltaria::Clients::RequestOptions`
1277
+
1278
+ </dd>
1279
+ </dl>
1280
+ </dd>
1281
+ </dl>
1282
+
1283
+
1284
+ </dd>
1285
+ </dl>
1286
+ </details>
1287
+
1288
+ <details><summary><code>client.clients.<a href="/lib/voltaria/clients/client.rb">update_client_counterparty</a>(client_id, counterparty_id, request) -> Voltaria::Types::ClientCounterpartyResponse</code></summary>
1289
+ <dl>
1290
+ <dd>
1291
+
1292
+ #### 📝 Description
1293
+
1294
+ <dl>
1295
+ <dd>
1296
+
1297
+ <dl>
1298
+ <dd>
1299
+
1300
+ Update the details of a counterparty of a specific client.
1301
+ </dd>
1302
+ </dl>
1303
+ </dd>
1304
+ </dl>
1305
+
1306
+ #### 🔌 Usage
1307
+
1308
+ <dl>
1309
+ <dd>
1310
+
1311
+ <dl>
1312
+ <dd>
1313
+
1314
+ ```ruby
1315
+ client.clients.update_client_counterparty(
1316
+ client_id: "client_id",
1317
+ counterparty_id: "counterparty_id"
1318
+ )
1319
+ ```
1320
+ </dd>
1321
+ </dl>
1322
+ </dd>
1323
+ </dl>
1324
+
1325
+ #### ⚙️ Parameters
1326
+
1327
+ <dl>
1328
+ <dd>
1329
+
1330
+ <dl>
1331
+ <dd>
1332
+
1333
+ **client_id:** `String`
1334
+
1335
+ </dd>
1336
+ </dl>
1337
+
1338
+ <dl>
1339
+ <dd>
1340
+
1341
+ **counterparty_id:** `String`
1342
+
1343
+ </dd>
1344
+ </dl>
1345
+
1346
+ <dl>
1347
+ <dd>
1348
+
1349
+ **name:** `String` — The counterparty's legal or trading name
1350
+
1351
+ </dd>
1352
+ </dl>
1353
+
1354
+ <dl>
1355
+ <dd>
1356
+
1357
+ **country:** `String` — ISO 3166-1 alpha-2 code of the country the counterparty is registered in
1358
+
1359
+ </dd>
1360
+ </dl>
1361
+
1362
+ <dl>
1363
+ <dd>
1364
+
1365
+ **company_number:** `String` — The counterparty's company registration number
1366
+
1367
+ </dd>
1368
+ </dl>
1369
+
1370
+ <dl>
1371
+ <dd>
1372
+
1373
+ **notes:** `String` — Free-text notes about the counterparty
1374
+
1375
+ </dd>
1376
+ </dl>
1377
+
1378
+ <dl>
1379
+ <dd>
1380
+
1381
+ **request_options:** `Voltaria::Clients::RequestOptions`
1382
+
1383
+ </dd>
1384
+ </dl>
1385
+ </dd>
1386
+ </dl>
1387
+
1388
+
1093
1389
  </dd>
1094
1390
  </dl>
1095
1391
  </details>
@@ -1292,6 +1588,92 @@ client.clients.list_client_checklist_summaries(client_id: "client_id")
1292
1588
  </dl>
1293
1589
 
1294
1590
 
1591
+ </dd>
1592
+ </dl>
1593
+ </details>
1594
+
1595
+ <details><summary><code>client.clients.<a href="/lib/voltaria/clients/client.rb">list_all_client_counterparties</a>() -> Voltaria::Types::PaginatedResponseClientCounterpartyWithClientResponse</code></summary>
1596
+ <dl>
1597
+ <dd>
1598
+
1599
+ #### 📝 Description
1600
+
1601
+ <dl>
1602
+ <dd>
1603
+
1604
+ <dl>
1605
+ <dd>
1606
+
1607
+ Retrieve the counterparties of all your clients, e.g. their debtors or installers, with each client's name.
1608
+ </dd>
1609
+ </dl>
1610
+ </dd>
1611
+ </dl>
1612
+
1613
+ #### 🔌 Usage
1614
+
1615
+ <dl>
1616
+ <dd>
1617
+
1618
+ <dl>
1619
+ <dd>
1620
+
1621
+ ```ruby
1622
+ client.clients.list_all_client_counterparties
1623
+ ```
1624
+ </dd>
1625
+ </dl>
1626
+ </dd>
1627
+ </dl>
1628
+
1629
+ #### ⚙️ Parameters
1630
+
1631
+ <dl>
1632
+ <dd>
1633
+
1634
+ <dl>
1635
+ <dd>
1636
+
1637
+ **page:** `Integer`
1638
+
1639
+ </dd>
1640
+ </dl>
1641
+
1642
+ <dl>
1643
+ <dd>
1644
+
1645
+ **page_size:** `Integer`
1646
+
1647
+ </dd>
1648
+ </dl>
1649
+
1650
+ <dl>
1651
+ <dd>
1652
+
1653
+ **order_by:** `String` — Field to order the results by, e.g., 'created_at:desc'
1654
+
1655
+ </dd>
1656
+ </dl>
1657
+
1658
+ <dl>
1659
+ <dd>
1660
+
1661
+ **q:** `String` — Query string for filtering. Format: "field:operator:value;...". Supported fields: id, client_id, name, country, company_number, status, created_at. 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.
1662
+
1663
+ </dd>
1664
+ </dl>
1665
+
1666
+ <dl>
1667
+ <dd>
1668
+
1669
+ **request_options:** `Voltaria::Clients::RequestOptions`
1670
+
1671
+ </dd>
1672
+ </dl>
1673
+ </dd>
1674
+ </dl>
1675
+
1676
+
1295
1677
  </dd>
1296
1678
  </dl>
1297
1679
  </details>
@@ -1425,7 +1807,7 @@ client.sandbox.update_loan(loan_id: "loan_id")
1425
1807
  <dl>
1426
1808
  <dd>
1427
1809
 
1428
- **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`
1810
+ **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.
1429
1811
 
1430
1812
  </dd>
1431
1813
  </dl>
@@ -1495,7 +1877,7 @@ client.sandbox.webhook_test(event_type: "loan.updated")
1495
1877
  <dl>
1496
1878
  <dd>
1497
1879
 
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
1880
+ **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
1499
1881
 
1500
1882
  </dd>
1501
1883
  </dl>
@@ -2295,7 +2677,7 @@ client.documents.list_documents
2295
2677
  <dl>
2296
2678
  <dd>
2297
2679
 
2298
- **q:** `String` — Query string for filtering. Format: "field:operator:value;...". Supported fields: id, client_id, loan_id, installment_id, waterfall_id, category, file_name, document_date, folder_path. 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.
2680
+ **q:** `String` — Query string for filtering. Format: "field:operator:value;...". Supported fields: id, client_id, loan_id, installment_id, waterfall_id, client_counterparty_id, category, file_name, document_date, folder_path. 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.
2299
2681
 
2300
2682
  </dd>
2301
2683
  </dl>
@@ -2365,6 +2747,14 @@ client.documents.upload_document
2365
2747
  <dl>
2366
2748
  <dd>
2367
2749
 
2750
+ **client_counterparty_id:** `String` — The ID of the client counterparty this document belongs to, if any. Requires `client_id`; the counterparty must belong to that client.
2751
+
2752
+ </dd>
2753
+ </dl>
2754
+
2755
+ <dl>
2756
+ <dd>
2757
+
2368
2758
  **loan_id:** `String`
2369
2759
 
2370
2760
  </dd>
@@ -4173,6 +4563,14 @@ client.loans.create_loan(
4173
4563
  <dl>
4174
4564
  <dd>
4175
4565
 
4566
+ **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)
4567
+
4568
+ </dd>
4569
+ </dl>
4570
+
4571
+ <dl>
4572
+ <dd>
4573
+
4176
4574
  **data:** `Internal::Types::Hash[String, Object]` — Additional data related to the loan
4177
4575
 
4178
4576
  </dd>
@@ -5156,7 +5554,7 @@ client.webhooks.create_webhook_subscription(
5156
5554
  <dl>
5157
5555
  <dd>
5158
5556
 
5159
- **event_type:** `Voltaria::Types::WebhookEventTypeEnum` — Event type to subscribe toPossible values: loan_updated, installment_updated, client_updated, client_limit_updated, partner_limit_updated
5557
+ **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
5160
5558
 
5161
5559
  </dd>
5162
5560
  </dl>
@@ -5336,7 +5734,7 @@ client.webhooks.update_webhook_subscription(
5336
5734
  <dl>
5337
5735
  <dd>
5338
5736
 
5339
- **event_type:** `Voltaria::Types::WebhookEventTypeEnum` — Event type to subscribe toPossible values: loan_updated, installment_updated, client_updated, client_limit_updated, partner_limit_updated
5737
+ **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
5340
5738
 
5341
5739
  </dd>
5342
5740
  </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.45.0
4
+ version: 2.47.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-30 00:00:00.000000000 Z
11
+ date: 2026-10-15 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.
@@ -31,6 +31,8 @@ files:
31
31
  - lib/voltaria/client.rb
32
32
  - lib/voltaria/clients/client.rb
33
33
  - lib/voltaria/clients/types/approve_onboarding_request.rb
34
+ - lib/voltaria/clients/types/client_counterparty_create_payload.rb
35
+ - lib/voltaria/clients/types/client_counterparty_update_payload.rb
34
36
  - lib/voltaria/clients/types/client_create_payload.rb
35
37
  - lib/voltaria/clients/types/client_data_create_payload.rb
36
38
  - lib/voltaria/clients/types/client_user_invite_request.rb
@@ -39,7 +41,9 @@ files:
39
41
  - lib/voltaria/clients/types/get_limit_request_request.rb
40
42
  - lib/voltaria/clients/types/limit_request_create_payload.rb
41
43
  - lib/voltaria/clients/types/limit_request_create_payload_requested_limit.rb
44
+ - lib/voltaria/clients/types/list_all_client_counterparties_request.rb
42
45
  - lib/voltaria/clients/types/list_client_checklist_summaries_request.rb
46
+ - lib/voltaria/clients/types/list_client_counterparties_request.rb
43
47
  - lib/voltaria/clients/types/list_client_limits_request.rb
44
48
  - lib/voltaria/clients/types/list_client_portal_users_request.rb
45
49
  - lib/voltaria/clients/types/list_client_waivers_request.rb
@@ -175,6 +179,9 @@ files:
175
179
  - lib/voltaria/types/checklist_type_enum.rb
176
180
  - lib/voltaria/types/client_account_response.rb
177
181
  - lib/voltaria/types/client_base_info.rb
182
+ - lib/voltaria/types/client_counterparty_response.rb
183
+ - lib/voltaria/types/client_counterparty_status_enum.rb
184
+ - lib/voltaria/types/client_counterparty_with_client_response.rb
178
185
  - lib/voltaria/types/client_data_response.rb
179
186
  - lib/voltaria/types/client_investor_response.rb
180
187
  - lib/voltaria/types/client_limit_history_response.rb
@@ -210,6 +217,7 @@ files:
210
217
  - lib/voltaria/types/loan_installment_response.rb
211
218
  - lib/voltaria/types/loan_investor_response.rb
212
219
  - lib/voltaria/types/loan_payment_status_enum.rb
220
+ - lib/voltaria/types/loan_repayment_method_enum.rb
213
221
  - lib/voltaria/types/loan_response_with_client_info.rb
214
222
  - lib/voltaria/types/loan_response_with_installments.rb
215
223
  - lib/voltaria/types/loan_review_request_response.rb
@@ -218,6 +226,8 @@ files:
218
226
  - lib/voltaria/types/note_response.rb
219
227
  - lib/voltaria/types/paginated_response_checklist_summary_partner_response.rb
220
228
  - lib/voltaria/types/paginated_response_client_account_response.rb
229
+ - lib/voltaria/types/paginated_response_client_counterparty_response.rb
230
+ - lib/voltaria/types/paginated_response_client_counterparty_with_client_response.rb
221
231
  - lib/voltaria/types/paginated_response_client_investor_response.rb
222
232
  - lib/voltaria/types/paginated_response_client_limit_history_response.rb
223
233
  - lib/voltaria/types/paginated_response_client_response.rb