voltaria_sdk 2.34.7 → 2.35.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.
Files changed (34) hide show
  1. checksums.yaml +4 -4
  2. data/lib/voltaria/client.rb +5 -0
  3. data/lib/voltaria/clients/client.rb +47 -0
  4. data/lib/voltaria/clients/types/list_client_portal_users_request.rb +15 -0
  5. data/lib/voltaria/collections/client.rb +156 -0
  6. data/lib/voltaria/collections/types/collection_action_log_update_payload.rb +13 -0
  7. data/lib/voltaria/collections/types/collection_action_log_update_payload_status.rb +14 -0
  8. data/lib/voltaria/collections/types/list_collection_action_logs_request.rb +19 -0
  9. data/lib/voltaria/collections/types/list_collection_actions_request.rb +14 -0
  10. data/lib/voltaria/loans/client.rb +118 -0
  11. data/lib/voltaria/loans/types/get_loan_review_request_request.rb +11 -0
  12. data/lib/voltaria/loans/types/list_loan_review_requests_request.rb +16 -0
  13. data/lib/voltaria/loans/types/loan_review_request_create_payload.rb +12 -0
  14. data/lib/voltaria/types/client_account_response.rb +1 -0
  15. data/lib/voltaria/types/collection_action_log_response.rb +19 -0
  16. data/lib/voltaria/types/collection_action_response.rb +14 -0
  17. data/lib/voltaria/types/collection_action_status_enum.rb +14 -0
  18. data/lib/voltaria/types/collection_action_type_enum.rb +14 -0
  19. data/lib/voltaria/types/document_response.rb +1 -0
  20. data/lib/voltaria/types/limit_request_response.rb +1 -0
  21. data/lib/voltaria/types/limit_request_source_enum.rb +12 -0
  22. data/lib/voltaria/types/loan_investor_response.rb +2 -0
  23. data/lib/voltaria/types/loan_response_with_client_info.rb +2 -0
  24. data/lib/voltaria/types/loan_review_request_response.rb +17 -0
  25. data/lib/voltaria/types/loan_review_request_status_enum.rb +13 -0
  26. data/lib/voltaria/types/paginated_response_client_user_response.rb +16 -0
  27. data/lib/voltaria/types/paginated_response_collection_action_log_response.rb +16 -0
  28. data/lib/voltaria/types/paginated_response_collection_action_response.rb +16 -0
  29. data/lib/voltaria/types/paginated_response_loan_review_request_response.rb +16 -0
  30. data/lib/voltaria/types/waterfall_response.rb +3 -3
  31. data/lib/voltaria/version.rb +1 -1
  32. data/lib/voltaria.rb +20 -0
  33. data/reference.md +640 -18
  34. metadata +22 -2
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 1ca70a7aea3715cddd25e046d5acc72fdd6e4274e37bc29cbb061b0011455742
4
- data.tar.gz: 0d90176f7df1764ebd348a30894519ec40bc0f7ca9b133d59632c99cc3f09fef
3
+ metadata.gz: abe6a466be2eedeb875e8d9ce9bd749a21da41069f5efd61e01e3d7c29936ae0
4
+ data.tar.gz: e30aa8304123fe9eedd4a71999719d515d30436e3db1143f89db6d2d3aa8fd50
5
5
  SHA512:
6
- metadata.gz: 100cd50646d803f5cdae5d4fd40e2b6034a494587ca5a45a3563e4940e4def6a0f86018d355d70a97534216aa6e899e1ce4c6ec84e5c25762284bef5b19fb468
7
- data.tar.gz: 7e4f42605fa99188b036c69b44757924ee73273b2393c96ec6bb6ff762be4ef57cfd914b93c0874338f1b0107f7f8ea1cfe2c84bd506c7d69d9a0acd275200b8
6
+ metadata.gz: 9b1950202c4869e476a0e60694a3cf149fe33604c4ea39f88183fce1e8bb74ac72ee2c2fbd67412810b9c6cfc8f3416d23cf0ad3b038acee7a5d24711320b3ba
7
+ data.tar.gz: 5d2b21297f6175e8bb98fc9afbbad77927d5c8edc460a9a3342502ec83794635a903434e4600f75be3a3b355b9cbaab188a47b3ce1efcad0b9b4448b66c2a558
@@ -31,6 +31,11 @@ module Voltaria
31
31
  @accounts ||= Voltaria::Accounts::Client.new(client: @raw_client)
32
32
  end
33
33
 
34
+ # @return [Voltaria::Collections::Client]
35
+ def collections
36
+ @collections ||= Voltaria::Collections::Client.new(client: @raw_client)
37
+ end
38
+
34
39
  # @return [Voltaria::Documents::Client]
35
40
  def documents
36
41
  @documents ||= Voltaria::Documents::Client.new(client: @raw_client)
@@ -355,6 +355,53 @@ module Voltaria
355
355
  end
356
356
  end
357
357
 
358
+ # Paginated list of portal users belonging to a client.
359
+ #
360
+ # @param request_options [Hash]
361
+ # @param params [Hash]
362
+ # @option request_options [String] :base_url
363
+ # @option request_options [Hash{String => Object}] :additional_headers
364
+ # @option request_options [Hash{String => Object}] :additional_query_parameters
365
+ # @option request_options [Hash{String => Object}] :additional_body_parameters
366
+ # @option request_options [Integer] :timeout_in_seconds
367
+ # @option params [String] :client_id
368
+ # @option params [Integer, nil] :page
369
+ # @option params [Integer, nil] :page_size
370
+ # @option params [String, nil] :order_by
371
+ # @option params [String, nil] :q
372
+ #
373
+ # @return [Voltaria::Types::PaginatedResponseClientUserResponse]
374
+ def list_client_portal_users(request_options: {}, **params)
375
+ params = Voltaria::Internal::Types::Utils.normalize_keys(params)
376
+ query_param_names = %i[page page_size order_by q]
377
+ query_params = {}
378
+ query_params["page"] = params[:page] if params.key?(:page)
379
+ query_params["page_size"] = params[:page_size] if params.key?(:page_size)
380
+ query_params["order_by"] = params[:order_by] if params.key?(:order_by)
381
+ query_params["q"] = params[:q] if params.key?(:q)
382
+ params = params.except(*query_param_names)
383
+
384
+ request = Voltaria::Internal::JSON::Request.new(
385
+ base_url: request_options[:base_url],
386
+ method: "GET",
387
+ path: "v2/clients/#{URI.encode_uri_component(params[:client_id].to_s)}/users",
388
+ query: query_params,
389
+ request_options: request_options
390
+ )
391
+ begin
392
+ response = @client.send(request)
393
+ rescue Net::HTTPRequestTimeout
394
+ raise Voltaria::Errors::TimeoutError
395
+ end
396
+ code = response.code.to_i
397
+ if code.between?(200, 299)
398
+ Voltaria::Types::PaginatedResponseClientUserResponse.load(response.body)
399
+ else
400
+ error_class = Voltaria::Errors::ResponseError.subclass_for_code(code)
401
+ raise error_class.new(response.body, code: code)
402
+ end
403
+ end
404
+
358
405
  # Invite a new user to a client's portal account. The invited user will receive an email with a one-time link to
359
406
  # set their password. Partner can assign any role: 'owner', 'admin', or 'viewer'.
360
407
  #
@@ -0,0 +1,15 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Voltaria
4
+ module Clients
5
+ module Types
6
+ class ListClientPortalUsersRequest < 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
@@ -0,0 +1,156 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Voltaria
4
+ module Collections
5
+ class Client
6
+ # @param client [Voltaria::Internal::Http::RawClient]
7
+ #
8
+ # @return [void]
9
+ def initialize(client:)
10
+ @client = client
11
+ end
12
+
13
+ # Retrieve all collection actions configured for your partner account.
14
+ #
15
+ # @param request_options [Hash]
16
+ # @param params [Hash]
17
+ # @option request_options [String] :base_url
18
+ # @option request_options [Hash{String => Object}] :additional_headers
19
+ # @option request_options [Hash{String => Object}] :additional_query_parameters
20
+ # @option request_options [Hash{String => Object}] :additional_body_parameters
21
+ # @option request_options [Integer] :timeout_in_seconds
22
+ # @option params [Integer, nil] :page
23
+ # @option params [Integer, nil] :page_size
24
+ # @option params [String, nil] :order_by
25
+ # @option params [String, nil] :q
26
+ #
27
+ # @return [Voltaria::Types::PaginatedResponseCollectionActionResponse]
28
+ def list_collection_actions(request_options: {}, **params)
29
+ params = Voltaria::Internal::Types::Utils.normalize_keys(params)
30
+ query_param_names = %i[page page_size order_by q]
31
+ query_params = {}
32
+ query_params["page"] = params[:page] if params.key?(:page)
33
+ query_params["page_size"] = params[:page_size] if params.key?(:page_size)
34
+ query_params["order_by"] = params[:order_by] if params.key?(:order_by)
35
+ query_params["q"] = params[:q] if params.key?(:q)
36
+ params.except(*query_param_names)
37
+
38
+ request = Voltaria::Internal::JSON::Request.new(
39
+ base_url: request_options[:base_url],
40
+ method: "GET",
41
+ path: "v2/collection-actions",
42
+ query: query_params,
43
+ request_options: request_options
44
+ )
45
+ begin
46
+ response = @client.send(request)
47
+ rescue Net::HTTPRequestTimeout
48
+ raise Voltaria::Errors::TimeoutError
49
+ end
50
+ code = response.code.to_i
51
+ if code.between?(200, 299)
52
+ Voltaria::Types::PaginatedResponseCollectionActionResponse.load(response.body)
53
+ else
54
+ error_class = Voltaria::Errors::ResponseError.subclass_for_code(code)
55
+ raise error_class.new(response.body, code: code)
56
+ end
57
+ end
58
+
59
+ # Retrieve collection action logs for your partner account. Supports filtering by client, loan, installment,
60
+ # status, or action type.
61
+ #
62
+ # @param request_options [Hash]
63
+ # @param params [Hash]
64
+ # @option request_options [String] :base_url
65
+ # @option request_options [Hash{String => Object}] :additional_headers
66
+ # @option request_options [Hash{String => Object}] :additional_query_parameters
67
+ # @option request_options [Hash{String => Object}] :additional_body_parameters
68
+ # @option request_options [Integer] :timeout_in_seconds
69
+ # @option params [String, nil] :client_id
70
+ # @option params [String, nil] :loan_id
71
+ # @option params [String, nil] :installment_id
72
+ # @option params [Voltaria::Types::CollectionActionStatusEnum, nil] :status
73
+ # @option params [Voltaria::Types::CollectionActionTypeEnum, nil] :action_type
74
+ # @option params [Integer, nil] :page
75
+ # @option params [Integer, nil] :page_size
76
+ # @option params [String, nil] :order_by
77
+ # @option params [String, nil] :q
78
+ #
79
+ # @return [Voltaria::Types::PaginatedResponseCollectionActionLogResponse]
80
+ def list_collection_action_logs(request_options: {}, **params)
81
+ params = Voltaria::Internal::Types::Utils.normalize_keys(params)
82
+ query_param_names = %i[client_id loan_id installment_id status action_type page page_size order_by q]
83
+ query_params = {}
84
+ query_params["client_id"] = params[:client_id] if params.key?(:client_id)
85
+ query_params["loan_id"] = params[:loan_id] if params.key?(:loan_id)
86
+ query_params["installment_id"] = params[:installment_id] if params.key?(:installment_id)
87
+ query_params["status"] = params[:status] if params.key?(:status)
88
+ query_params["action_type"] = params[:action_type] if params.key?(:action_type)
89
+ query_params["page"] = params[:page] if params.key?(:page)
90
+ query_params["page_size"] = params[:page_size] if params.key?(:page_size)
91
+ query_params["order_by"] = params[:order_by] if params.key?(:order_by)
92
+ query_params["q"] = params[:q] if params.key?(:q)
93
+ params.except(*query_param_names)
94
+
95
+ request = Voltaria::Internal::JSON::Request.new(
96
+ base_url: request_options[:base_url],
97
+ method: "GET",
98
+ path: "v2/collection-actions/logs",
99
+ query: query_params,
100
+ request_options: request_options
101
+ )
102
+ begin
103
+ response = @client.send(request)
104
+ rescue Net::HTTPRequestTimeout
105
+ raise Voltaria::Errors::TimeoutError
106
+ end
107
+ code = response.code.to_i
108
+ if code.between?(200, 299)
109
+ Voltaria::Types::PaginatedResponseCollectionActionLogResponse.load(response.body)
110
+ else
111
+ error_class = Voltaria::Errors::ResponseError.subclass_for_code(code)
112
+ raise error_class.new(response.body, code: code)
113
+ end
114
+ end
115
+
116
+ # Update the status and notes of a collection action log.
117
+ #
118
+ # @param request_options [Hash]
119
+ # @param params [Voltaria::Collections::Types::CollectionActionLogUpdatePayload]
120
+ # @option request_options [String] :base_url
121
+ # @option request_options [Hash{String => Object}] :additional_headers
122
+ # @option request_options [Hash{String => Object}] :additional_query_parameters
123
+ # @option request_options [Hash{String => Object}] :additional_body_parameters
124
+ # @option request_options [Integer] :timeout_in_seconds
125
+ # @option params [String] :log_id
126
+ #
127
+ # @return [Voltaria::Types::CollectionActionLogResponse]
128
+ def update_collection_action_log(request_options: {}, **params)
129
+ params = Voltaria::Internal::Types::Utils.normalize_keys(params)
130
+ request_data = Voltaria::Collections::Types::CollectionActionLogUpdatePayload.new(params).to_h
131
+ non_body_param_names = ["log_id"]
132
+ body = request_data.except(*non_body_param_names)
133
+
134
+ request = Voltaria::Internal::JSON::Request.new(
135
+ base_url: request_options[:base_url],
136
+ method: "PATCH",
137
+ path: "v2/collection-actions/logs/#{URI.encode_uri_component(params[:log_id].to_s)}",
138
+ body: body,
139
+ request_options: request_options
140
+ )
141
+ begin
142
+ response = @client.send(request)
143
+ rescue Net::HTTPRequestTimeout
144
+ raise Voltaria::Errors::TimeoutError
145
+ end
146
+ code = response.code.to_i
147
+ if code.between?(200, 299)
148
+ Voltaria::Types::CollectionActionLogResponse.load(response.body)
149
+ else
150
+ error_class = Voltaria::Errors::ResponseError.subclass_for_code(code)
151
+ raise error_class.new(response.body, code: code)
152
+ end
153
+ end
154
+ end
155
+ end
156
+ end
@@ -0,0 +1,13 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Voltaria
4
+ module Collections
5
+ module Types
6
+ class CollectionActionLogUpdatePayload < Internal::Types::Model
7
+ field :log_id, -> { String }, optional: false, nullable: false
8
+ field :status, -> { Voltaria::Collections::Types::CollectionActionLogUpdatePayloadStatus }, optional: false, nullable: false
9
+ field :notes, -> { String }, optional: true, nullable: false
10
+ end
11
+ end
12
+ end
13
+ end
@@ -0,0 +1,14 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Voltaria
4
+ module Collections
5
+ module Types
6
+ module CollectionActionLogUpdatePayloadStatus
7
+ extend Voltaria::Internal::Types::Enum
8
+
9
+ COMPLETED = "completed"
10
+ FAILED = "failed"
11
+ end
12
+ end
13
+ end
14
+ end
@@ -0,0 +1,19 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Voltaria
4
+ module Collections
5
+ module Types
6
+ class ListCollectionActionLogsRequest < Internal::Types::Model
7
+ field :client_id, -> { String }, optional: true, nullable: false
8
+ field :loan_id, -> { String }, optional: true, nullable: false
9
+ field :installment_id, -> { String }, optional: true, nullable: false
10
+ field :status, -> { Voltaria::Types::CollectionActionStatusEnum }, optional: true, nullable: false
11
+ field :action_type, -> { Voltaria::Types::CollectionActionTypeEnum }, optional: true, nullable: false
12
+ field :page, -> { Integer }, optional: true, nullable: false
13
+ field :page_size, -> { Integer }, optional: true, nullable: false
14
+ field :order_by, -> { String }, optional: true, nullable: false
15
+ field :q, -> { String }, optional: true, nullable: false
16
+ end
17
+ end
18
+ end
19
+ end
@@ -0,0 +1,14 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Voltaria
4
+ module Collections
5
+ module Types
6
+ class ListCollectionActionsRequest < 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
@@ -10,6 +10,124 @@ module Voltaria
10
10
  @client = client
11
11
  end
12
12
 
13
+ # List loan review requests for your partner account, optionally filtered by loan ID or client ID.
14
+ #
15
+ # @param request_options [Hash]
16
+ # @param params [Hash]
17
+ # @option request_options [String] :base_url
18
+ # @option request_options [Hash{String => Object}] :additional_headers
19
+ # @option request_options [Hash{String => Object}] :additional_query_parameters
20
+ # @option request_options [Hash{String => Object}] :additional_body_parameters
21
+ # @option request_options [Integer] :timeout_in_seconds
22
+ # @option params [String, nil] :loan_id
23
+ # @option params [String, nil] :client_id
24
+ # @option params [Integer, nil] :page
25
+ # @option params [Integer, nil] :page_size
26
+ # @option params [String, nil] :order_by
27
+ # @option params [String, nil] :q
28
+ #
29
+ # @return [Voltaria::Types::PaginatedResponseLoanReviewRequestResponse]
30
+ def list_loan_review_requests(request_options: {}, **params)
31
+ params = Voltaria::Internal::Types::Utils.normalize_keys(params)
32
+ query_param_names = %i[loan_id client_id page page_size order_by q]
33
+ query_params = {}
34
+ query_params["loan_id"] = params[:loan_id] if params.key?(:loan_id)
35
+ query_params["client_id"] = params[:client_id] if params.key?(:client_id)
36
+ query_params["page"] = params[:page] if params.key?(:page)
37
+ query_params["page_size"] = params[:page_size] if params.key?(:page_size)
38
+ query_params["order_by"] = params[:order_by] if params.key?(:order_by)
39
+ query_params["q"] = params[:q] if params.key?(:q)
40
+ params.except(*query_param_names)
41
+
42
+ request = Voltaria::Internal::JSON::Request.new(
43
+ base_url: request_options[:base_url],
44
+ method: "GET",
45
+ path: "v2/loans/review-requests",
46
+ query: query_params,
47
+ request_options: request_options
48
+ )
49
+ begin
50
+ response = @client.send(request)
51
+ rescue Net::HTTPRequestTimeout
52
+ raise Voltaria::Errors::TimeoutError
53
+ end
54
+ code = response.code.to_i
55
+ if code.between?(200, 299)
56
+ Voltaria::Types::PaginatedResponseLoanReviewRequestResponse.load(response.body)
57
+ else
58
+ error_class = Voltaria::Errors::ResponseError.subclass_for_code(code)
59
+ raise error_class.new(response.body, code: code)
60
+ end
61
+ end
62
+
63
+ # Ask Voltaria to review a not-yet-disbursed (pending or pre-approved) loan before disbursement.
64
+ #
65
+ # @param request_options [Hash]
66
+ # @param params [Voltaria::Loans::Types::LoanReviewRequestCreatePayload]
67
+ # @option request_options [String] :base_url
68
+ # @option request_options [Hash{String => Object}] :additional_headers
69
+ # @option request_options [Hash{String => Object}] :additional_query_parameters
70
+ # @option request_options [Hash{String => Object}] :additional_body_parameters
71
+ # @option request_options [Integer] :timeout_in_seconds
72
+ #
73
+ # @return [Voltaria::Types::LoanReviewRequestResponse]
74
+ def create_loan_review_request(request_options: {}, **params)
75
+ params = Voltaria::Internal::Types::Utils.normalize_keys(params)
76
+ request = Voltaria::Internal::JSON::Request.new(
77
+ base_url: request_options[:base_url],
78
+ method: "POST",
79
+ path: "v2/loans/review-requests",
80
+ body: Voltaria::Loans::Types::LoanReviewRequestCreatePayload.new(params).to_h,
81
+ request_options: request_options
82
+ )
83
+ begin
84
+ response = @client.send(request)
85
+ rescue Net::HTTPRequestTimeout
86
+ raise Voltaria::Errors::TimeoutError
87
+ end
88
+ code = response.code.to_i
89
+ if code.between?(200, 299)
90
+ Voltaria::Types::LoanReviewRequestResponse.load(response.body)
91
+ else
92
+ error_class = Voltaria::Errors::ResponseError.subclass_for_code(code)
93
+ raise error_class.new(response.body, code: code)
94
+ end
95
+ end
96
+
97
+ # Retrieve a specific loan review request by its ID.
98
+ #
99
+ # @param request_options [Hash]
100
+ # @param params [Hash]
101
+ # @option request_options [String] :base_url
102
+ # @option request_options [Hash{String => Object}] :additional_headers
103
+ # @option request_options [Hash{String => Object}] :additional_query_parameters
104
+ # @option request_options [Hash{String => Object}] :additional_body_parameters
105
+ # @option request_options [Integer] :timeout_in_seconds
106
+ # @option params [String] :request_id
107
+ #
108
+ # @return [Voltaria::Types::LoanReviewRequestResponse]
109
+ def get_loan_review_request(request_options: {}, **params)
110
+ params = Voltaria::Internal::Types::Utils.normalize_keys(params)
111
+ request = Voltaria::Internal::JSON::Request.new(
112
+ base_url: request_options[:base_url],
113
+ method: "GET",
114
+ path: "v2/loans/review-requests/#{URI.encode_uri_component(params[:request_id].to_s)}",
115
+ request_options: request_options
116
+ )
117
+ begin
118
+ response = @client.send(request)
119
+ rescue Net::HTTPRequestTimeout
120
+ raise Voltaria::Errors::TimeoutError
121
+ end
122
+ code = response.code.to_i
123
+ if code.between?(200, 299)
124
+ Voltaria::Types::LoanReviewRequestResponse.load(response.body)
125
+ else
126
+ error_class = Voltaria::Errors::ResponseError.subclass_for_code(code)
127
+ raise error_class.new(response.body, code: code)
128
+ end
129
+ end
130
+
13
131
  # Retrieve all loans associated with your partner account. Supports optional filtering by client ID.
14
132
  #
15
133
  # @param request_options [Hash]
@@ -0,0 +1,11 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Voltaria
4
+ module Loans
5
+ module Types
6
+ class GetLoanReviewRequestRequest < Internal::Types::Model
7
+ field :request_id, -> { String }, optional: false, nullable: false
8
+ end
9
+ end
10
+ end
11
+ end
@@ -0,0 +1,16 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Voltaria
4
+ module Loans
5
+ module Types
6
+ class ListLoanReviewRequestsRequest < Internal::Types::Model
7
+ field :loan_id, -> { String }, optional: true, nullable: false
8
+ field :client_id, -> { String }, optional: true, nullable: false
9
+ field :page, -> { Integer }, optional: true, nullable: false
10
+ field :page_size, -> { Integer }, optional: true, nullable: false
11
+ field :order_by, -> { String }, optional: true, nullable: false
12
+ field :q, -> { String }, optional: true, nullable: false
13
+ end
14
+ end
15
+ end
16
+ end
@@ -0,0 +1,12 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Voltaria
4
+ module Loans
5
+ module Types
6
+ class LoanReviewRequestCreatePayload < Internal::Types::Model
7
+ field :loan_id, -> { String }, optional: false, nullable: false
8
+ field :notes, -> { String }, optional: true, nullable: false
9
+ end
10
+ end
11
+ end
12
+ end
@@ -16,6 +16,7 @@ module Voltaria
16
16
  field :account_type, -> { String }, optional: true, nullable: false
17
17
  field :address, -> { Voltaria::Types::AccountAddress }, optional: true, nullable: false
18
18
  field :status, -> { Voltaria::Types::AccountStatusEnum }, optional: false, nullable: false
19
+ field :created_at, -> { String }, optional: false, nullable: false
19
20
  end
20
21
  end
21
22
  end
@@ -0,0 +1,19 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Voltaria
4
+ module Types
5
+ class CollectionActionLogResponse < Internal::Types::Model
6
+ field :id, -> { String }, optional: false, nullable: false
7
+ field :collection_action_id, -> { String }, optional: false, nullable: false
8
+ field :action_type, -> { Voltaria::Types::CollectionActionTypeEnum }, optional: false, nullable: false
9
+ field :action_name, -> { String }, optional: false, nullable: false
10
+ field :status, -> { Voltaria::Types::CollectionActionStatusEnum }, optional: false, nullable: false
11
+ field :client_id, -> { String }, optional: false, nullable: false
12
+ field :loan_id, -> { String }, optional: false, nullable: false
13
+ field :installment_id, -> { String }, optional: false, nullable: false
14
+ field :flag, -> { Internal::Types::Boolean }, optional: false, nullable: false
15
+ field :notes, -> { String }, optional: true, nullable: false
16
+ field :scheduled_for, -> { String }, optional: false, nullable: false
17
+ end
18
+ end
19
+ end
@@ -0,0 +1,14 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Voltaria
4
+ module Types
5
+ class CollectionActionResponse < Internal::Types::Model
6
+ field :id, -> { String }, optional: false, nullable: false
7
+ field :name, -> { String }, optional: false, nullable: false
8
+ field :action_type, -> { Voltaria::Types::CollectionActionTypeEnum }, optional: false, nullable: false
9
+ field :is_active, -> { Internal::Types::Boolean }, optional: false, nullable: false
10
+ field :description, -> { String }, optional: true, nullable: false
11
+ field :timing, -> { String }, optional: false, nullable: false
12
+ end
13
+ end
14
+ end
@@ -0,0 +1,14 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Voltaria
4
+ module Types
5
+ module CollectionActionStatusEnum
6
+ extend Voltaria::Internal::Types::Enum
7
+
8
+ PENDING = "pending"
9
+ COMPLETED = "completed"
10
+ FAILED = "failed"
11
+ SKIPPED = "skipped"
12
+ end
13
+ end
14
+ end
@@ -0,0 +1,14 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Voltaria
4
+ module Types
5
+ module CollectionActionTypeEnum
6
+ extend Voltaria::Internal::Types::Enum
7
+
8
+ EMAIL = "email"
9
+ SMS = "sms"
10
+ PHONE_CALL = "phone_call"
11
+ PUSH_NOTIFICATION = "push_notification"
12
+ end
13
+ end
14
+ end
@@ -14,6 +14,7 @@ module Voltaria
14
14
  field :folder_path, -> { String }, optional: true, nullable: false
15
15
  field :document_date, -> { String }, optional: true, nullable: false
16
16
  field :expiry_date, -> { String }, optional: true, nullable: false
17
+ field :distribution_id, -> { String }, optional: true, nullable: false
17
18
  field :created_at, -> { String }, optional: false, nullable: false
18
19
  end
19
20
  end
@@ -10,6 +10,7 @@ module Voltaria
10
10
  field :reason, -> { String }, optional: false, nullable: false
11
11
  field :response, -> { String }, optional: true, nullable: false
12
12
  field :waiver_id, -> { String }, optional: true, nullable: false
13
+ field :source, -> { Voltaria::Types::LimitRequestSourceEnum }, optional: false, nullable: false
13
14
  field :created_at, -> { String }, optional: false, nullable: false
14
15
  end
15
16
  end
@@ -0,0 +1,12 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Voltaria
4
+ module Types
5
+ module LimitRequestSourceEnum
6
+ extend Voltaria::Internal::Types::Enum
7
+
8
+ PARTNER = "partner"
9
+ INTERNAL = "internal"
10
+ end
11
+ end
12
+ end
@@ -21,6 +21,8 @@ module Voltaria
21
21
  field :early_settlement_amount, -> { String }, optional: true, nullable: false
22
22
  field :data, -> { Internal::Types::Hash[String, Object] }, optional: true, nullable: false
23
23
  field :client, -> { Voltaria::Types::ClientBaseInfo }, optional: false, nullable: false
24
+ field :outstanding_principal, -> { String }, optional: true, nullable: false
25
+ field :remaining_amount, -> { String }, optional: true, nullable: false
24
26
  field :payment_to_the_client, -> { Internal::Types::Boolean }, optional: true, nullable: false
25
27
  end
26
28
  end
@@ -21,6 +21,8 @@ module Voltaria
21
21
  field :early_settlement_amount, -> { String }, optional: true, nullable: false
22
22
  field :data, -> { Internal::Types::Hash[String, Object] }, optional: true, nullable: false
23
23
  field :client, -> { Voltaria::Types::ClientBaseInfo }, optional: false, nullable: false
24
+ field :outstanding_principal, -> { String }, optional: true, nullable: false
25
+ field :remaining_amount, -> { String }, optional: true, nullable: false
24
26
  end
25
27
  end
26
28
  end
@@ -0,0 +1,17 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Voltaria
4
+ module Types
5
+ class LoanReviewRequestResponse < Internal::Types::Model
6
+ field :id, -> { String }, optional: false, nullable: false
7
+ field :loan_id, -> { String }, optional: false, nullable: false
8
+ field :client_id, -> { String }, optional: false, nullable: false
9
+ field :status, -> { Voltaria::Types::LoanReviewRequestStatusEnum }, optional: false, nullable: false
10
+ field :notes, -> { String }, optional: true, nullable: false
11
+ field :response, -> { String }, optional: true, nullable: false
12
+ field :reviewed_at, -> { String }, optional: true, nullable: false
13
+ field :created_at, -> { String }, optional: false, nullable: false
14
+ field :updated_at, -> { String }, optional: false, 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 LoanReviewRequestStatusEnum
6
+ extend Voltaria::Internal::Types::Enum
7
+
8
+ PENDING = "pending"
9
+ APPROVED = "approved"
10
+ REJECTED = "rejected"
11
+ end
12
+ end
13
+ end