voltaria_sdk 2.34.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +7 -0
- data/.rubocop.yml +69 -0
- data/README.md +202 -0
- data/Rakefile +20 -0
- data/custom.gemspec.rb +16 -0
- data/lib/voltaria/accounts/client.rb +168 -0
- data/lib/voltaria/accounts/types/get_client_account_request.rb +12 -0
- data/lib/voltaria/accounts/types/list_client_account_fields_request.rb +11 -0
- data/lib/voltaria/accounts/types/list_client_accounts_request.rb +14 -0
- data/lib/voltaria/accounts/types/partner_client_account_create_request.rb +23 -0
- data/lib/voltaria/accounts/types/partner_client_account_create_request_status.rb +14 -0
- data/lib/voltaria/client.rb +74 -0
- data/lib/voltaria/clients/client.rb +557 -0
- data/lib/voltaria/clients/types/approve_onboarding_request.rb +11 -0
- data/lib/voltaria/clients/types/client_create_payload.rb +16 -0
- data/lib/voltaria/clients/types/client_data_create_payload.rb +12 -0
- data/lib/voltaria/clients/types/client_user_invite_request.rb +16 -0
- data/lib/voltaria/clients/types/delete_client_request.rb +11 -0
- data/lib/voltaria/clients/types/get_client_by_id_request.rb +11 -0
- data/lib/voltaria/clients/types/get_limit_request_request.rb +11 -0
- data/lib/voltaria/clients/types/limit_request_create_payload.rb +14 -0
- data/lib/voltaria/clients/types/limit_request_create_payload_requested_limit.rb +15 -0
- data/lib/voltaria/clients/types/list_client_checklist_summaries_request.rb +13 -0
- data/lib/voltaria/clients/types/list_client_waivers_request.rb +15 -0
- data/lib/voltaria/clients/types/list_clients_request.rb +14 -0
- data/lib/voltaria/clients/types/list_limit_requests_request.rb +15 -0
- data/lib/voltaria/clients/types/list_onboarding_clients_request.rb +12 -0
- data/lib/voltaria/clients/types/reject_onboarding_request.rb +11 -0
- data/lib/voltaria/documents/client.rb +221 -0
- data/lib/voltaria/documents/types/delete_document_request.rb +11 -0
- data/lib/voltaria/documents/types/document_create_payload.rb +14 -0
- data/lib/voltaria/documents/types/get_document_by_id_request.rb +11 -0
- data/lib/voltaria/documents/types/list_documents_request.rb +18 -0
- data/lib/voltaria/drawdowns/client.rb +141 -0
- data/lib/voltaria/drawdowns/types/drawdown_create_payload.rb +12 -0
- data/lib/voltaria/drawdowns/types/drawdown_create_payload_amount.rb +15 -0
- data/lib/voltaria/drawdowns/types/list_drawdown_checklists_request.rb +15 -0
- data/lib/voltaria/drawdowns/types/list_drawdowns_request.rb +14 -0
- data/lib/voltaria/environment.rb +8 -0
- data/lib/voltaria/errors/api_error.rb +8 -0
- data/lib/voltaria/errors/client_error.rb +17 -0
- data/lib/voltaria/errors/redirect_error.rb +8 -0
- data/lib/voltaria/errors/response_error.rb +42 -0
- data/lib/voltaria/errors/server_error.rb +11 -0
- data/lib/voltaria/errors/timeout_error.rb +8 -0
- data/lib/voltaria/installments/client.rb +292 -0
- data/lib/voltaria/installments/types/delete_installment_request.rb +11 -0
- data/lib/voltaria/installments/types/get_installment_by_id_request.rb +11 -0
- data/lib/voltaria/installments/types/installment_create_payload.rb +12 -0
- data/lib/voltaria/installments/types/installment_edit_payload.rb +13 -0
- data/lib/voltaria/installments/types/installment_edit_payload_amount.rb +15 -0
- data/lib/voltaria/installments/types/list_installments_request.rb +16 -0
- data/lib/voltaria/installments/types/list_payment_promises_request.rb +16 -0
- data/lib/voltaria/installments/types/payment_promise_create_payload.rb +14 -0
- data/lib/voltaria/installments/types/payment_promise_create_payload_amount.rb +15 -0
- data/lib/voltaria/internal/errors/constraint_error.rb +10 -0
- data/lib/voltaria/internal/errors/type_error.rb +10 -0
- data/lib/voltaria/internal/http/base_request.rb +51 -0
- data/lib/voltaria/internal/http/raw_client.rb +214 -0
- data/lib/voltaria/internal/iterators/cursor_item_iterator.rb +28 -0
- data/lib/voltaria/internal/iterators/cursor_page_iterator.rb +51 -0
- data/lib/voltaria/internal/iterators/item_iterator.rb +59 -0
- data/lib/voltaria/internal/iterators/offset_item_iterator.rb +30 -0
- data/lib/voltaria/internal/iterators/offset_page_iterator.rb +83 -0
- data/lib/voltaria/internal/json/request.rb +41 -0
- data/lib/voltaria/internal/json/serializable.rb +25 -0
- data/lib/voltaria/internal/multipart/multipart_encoder.rb +141 -0
- data/lib/voltaria/internal/multipart/multipart_form_data.rb +78 -0
- data/lib/voltaria/internal/multipart/multipart_form_data_part.rb +51 -0
- data/lib/voltaria/internal/multipart/multipart_request.rb +40 -0
- data/lib/voltaria/internal/types/array.rb +47 -0
- data/lib/voltaria/internal/types/boolean.rb +34 -0
- data/lib/voltaria/internal/types/enum.rb +56 -0
- data/lib/voltaria/internal/types/hash.rb +36 -0
- data/lib/voltaria/internal/types/model/field.rb +38 -0
- data/lib/voltaria/internal/types/model.rb +208 -0
- data/lib/voltaria/internal/types/type.rb +35 -0
- data/lib/voltaria/internal/types/union.rb +161 -0
- data/lib/voltaria/internal/types/unknown.rb +15 -0
- data/lib/voltaria/internal/types/utils.rb +116 -0
- data/lib/voltaria/investors/client.rb +312 -0
- data/lib/voltaria/investors/types/investor_get_client_request.rb +11 -0
- data/lib/voltaria/investors/types/investor_get_installment_request.rb +11 -0
- data/lib/voltaria/investors/types/investor_get_loan_request.rb +11 -0
- data/lib/voltaria/investors/types/investor_list_clients_request.rb +14 -0
- data/lib/voltaria/investors/types/investor_list_installments_request.rb +16 -0
- data/lib/voltaria/investors/types/investor_list_loans_request.rb +15 -0
- data/lib/voltaria/investors/types/investor_list_repayments_request.rb +17 -0
- data/lib/voltaria/loans/client.rb +271 -0
- data/lib/voltaria/loans/types/bulk_loan_create_payload.rb +11 -0
- data/lib/voltaria/loans/types/delete_loan_request.rb +11 -0
- data/lib/voltaria/loans/types/get_bulk_loan_status_request.rb +11 -0
- data/lib/voltaria/loans/types/get_loan_by_id_request.rb +11 -0
- data/lib/voltaria/loans/types/list_loans_request.rb +15 -0
- data/lib/voltaria/loans/types/loan_create_payload.rb +17 -0
- data/lib/voltaria/loans/types/loan_create_payload_amount.rb +15 -0
- data/lib/voltaria/loans/types/loan_default_payload.rb +13 -0
- data/lib/voltaria/loans/types/loan_default_payload_sold_amount.rb +15 -0
- data/lib/voltaria/partners/client.rb +129 -0
- data/lib/voltaria/partners/types/list_partner_waterfalls_request.rb +14 -0
- data/lib/voltaria/partners/types/partner_data_create_payload.rb +11 -0
- data/lib/voltaria/prefix_routing.rb +80 -0
- data/lib/voltaria/repayments/client.rb +183 -0
- data/lib/voltaria/repayments/types/bulk_repayment_create_payload.rb +11 -0
- data/lib/voltaria/repayments/types/get_bulk_repayment_status_request.rb +11 -0
- data/lib/voltaria/repayments/types/list_repayment_logs_request.rb +17 -0
- data/lib/voltaria/repayments/types/repayment_create_payload.rb +17 -0
- data/lib/voltaria/repayments/types/repayment_create_payload_amount.rb +15 -0
- data/lib/voltaria/sandbox/client.rb +124 -0
- data/lib/voltaria/sandbox/types/client_update_sandbox.rb +13 -0
- data/lib/voltaria/sandbox/types/client_update_sandbox_limit.rb +15 -0
- data/lib/voltaria/sandbox/types/loan_update_sandbox.rb +12 -0
- data/lib/voltaria/sandbox/types/webhook_test_sandbox.rb +12 -0
- data/lib/voltaria/types/account_address.rb +14 -0
- data/lib/voltaria/types/account_holder_type_enum.rb +12 -0
- data/lib/voltaria/types/account_status_enum.rb +13 -0
- data/lib/voltaria/types/available_document_categories_response.rb +9 -0
- data/lib/voltaria/types/available_funding.rb +15 -0
- data/lib/voltaria/types/bulk_loan_item_payload.rb +15 -0
- data/lib/voltaria/types/bulk_loan_item_payload_amount.rb +13 -0
- data/lib/voltaria/types/bulk_loan_item_result.rb +15 -0
- data/lib/voltaria/types/bulk_loan_result.rb +13 -0
- data/lib/voltaria/types/bulk_loan_task_response.rb +11 -0
- data/lib/voltaria/types/bulk_loan_task_status.rb +14 -0
- data/lib/voltaria/types/bulk_repayment_item_payload.rb +15 -0
- data/lib/voltaria/types/bulk_repayment_item_payload_amount.rb +13 -0
- data/lib/voltaria/types/bulk_repayment_item_result.rb +15 -0
- data/lib/voltaria/types/bulk_repayment_result.rb +13 -0
- data/lib/voltaria/types/bulk_repayment_task_response.rb +11 -0
- data/lib/voltaria/types/bulk_repayment_task_status.rb +14 -0
- data/lib/voltaria/types/checklist_summary_partner_response.rb +14 -0
- data/lib/voltaria/types/checklist_type_enum.rb +12 -0
- data/lib/voltaria/types/client_account_response.rb +21 -0
- data/lib/voltaria/types/client_base_info.rb +13 -0
- data/lib/voltaria/types/client_data_response.rb +12 -0
- data/lib/voltaria/types/client_investor_response.rb +17 -0
- data/lib/voltaria/types/client_limit_response.rb +16 -0
- data/lib/voltaria/types/client_response.rb +19 -0
- data/lib/voltaria/types/client_status_enum.rb +18 -0
- data/lib/voltaria/types/client_type_enum.rb +12 -0
- data/lib/voltaria/types/client_user_response.rb +24 -0
- data/lib/voltaria/types/client_user_status_enum.rb +13 -0
- data/lib/voltaria/types/currency_enum.rb +16 -0
- data/lib/voltaria/types/currency_field_spec.rb +10 -0
- data/lib/voltaria/types/document_response.rb +20 -0
- data/lib/voltaria/types/drawdown_checklist_response.rb +16 -0
- data/lib/voltaria/types/drawdown_response.rb +15 -0
- data/lib/voltaria/types/drawdown_status_enum.rb +13 -0
- data/lib/voltaria/types/http_validation_error.rb +9 -0
- data/lib/voltaria/types/installment_response.rb +24 -0
- data/lib/voltaria/types/installment_response_with_client_info.rb +25 -0
- data/lib/voltaria/types/installment_status_enum.rb +19 -0
- data/lib/voltaria/types/jurisdiction_enum.rb +13 -0
- data/lib/voltaria/types/kyc_status_enum.rb +14 -0
- data/lib/voltaria/types/limit_request_response.rb +16 -0
- data/lib/voltaria/types/limit_request_status_enum.rb +13 -0
- data/lib/voltaria/types/loan_installment_create_payload.rb +10 -0
- data/lib/voltaria/types/loan_installment_create_payload_amount.rb +13 -0
- data/lib/voltaria/types/loan_installment_response.rb +15 -0
- data/lib/voltaria/types/loan_investor_response.rb +27 -0
- data/lib/voltaria/types/loan_payment_status_enum.rb +12 -0
- data/lib/voltaria/types/loan_response_with_client_info.rb +26 -0
- data/lib/voltaria/types/loan_response_with_installments.rb +26 -0
- data/lib/voltaria/types/loan_status_enum.rb +21 -0
- data/lib/voltaria/types/paginated_response_checklist_summary_partner_response.rb +16 -0
- data/lib/voltaria/types/paginated_response_client_account_response.rb +16 -0
- data/lib/voltaria/types/paginated_response_client_investor_response.rb +16 -0
- data/lib/voltaria/types/paginated_response_client_response.rb +16 -0
- data/lib/voltaria/types/paginated_response_document_response.rb +16 -0
- data/lib/voltaria/types/paginated_response_drawdown_checklist_response.rb +16 -0
- data/lib/voltaria/types/paginated_response_drawdown_response.rb +16 -0
- data/lib/voltaria/types/paginated_response_installment_response_with_client_info.rb +16 -0
- data/lib/voltaria/types/paginated_response_limit_request_response.rb +16 -0
- data/lib/voltaria/types/paginated_response_loan_investor_response.rb +16 -0
- data/lib/voltaria/types/paginated_response_loan_response_with_client_info.rb +16 -0
- data/lib/voltaria/types/paginated_response_payment_promise_response.rb +16 -0
- data/lib/voltaria/types/paginated_response_repayment_response_with_client_info.rb +16 -0
- data/lib/voltaria/types/paginated_response_waiver_response.rb +16 -0
- data/lib/voltaria/types/paginated_response_waterfall_response.rb +16 -0
- data/lib/voltaria/types/paginated_response_webhook_log_response.rb +16 -0
- data/lib/voltaria/types/paginated_response_webhook_subscription_response.rb +16 -0
- data/lib/voltaria/types/partner_data_response.rb +11 -0
- data/lib/voltaria/types/payment_promise_response.rb +19 -0
- data/lib/voltaria/types/payment_promise_status_enum.rb +14 -0
- data/lib/voltaria/types/repayment_response.rb +21 -0
- data/lib/voltaria/types/repayment_response_with_client_info.rb +22 -0
- data/lib/voltaria/types/role_response.rb +11 -0
- data/lib/voltaria/types/validation_error.rb +13 -0
- data/lib/voltaria/types/validation_error_loc_item.rb +12 -0
- data/lib/voltaria/types/waiver_response.rb +18 -0
- data/lib/voltaria/types/waiver_status_enum.rb +14 -0
- data/lib/voltaria/types/waterfall_response.rb +19 -0
- data/lib/voltaria/types/waterfall_status_enum.rb +12 -0
- data/lib/voltaria/types/webhook_event_type_enum.rb +15 -0
- data/lib/voltaria/types/webhook_log_response.rb +19 -0
- data/lib/voltaria/types/webhook_log_response_request_body.rb +13 -0
- data/lib/voltaria/types/webhook_status_enum.rb +13 -0
- data/lib/voltaria/types/webhook_subscription_response.rb +17 -0
- data/lib/voltaria/version.rb +5 -0
- data/lib/voltaria/webhooks/client.rb +241 -0
- data/lib/voltaria/webhooks/types/delete_webhook_subscription_request.rb +11 -0
- data/lib/voltaria/webhooks/types/get_webhook_subscription_request.rb +11 -0
- data/lib/voltaria/webhooks/types/list_webhook_logs_request.rb +13 -0
- data/lib/voltaria/webhooks/types/list_webhook_subscriptions_request.rb +13 -0
- data/lib/voltaria/webhooks/types/webhook_create_payload.rb +16 -0
- data/lib/voltaria/webhooks/types/webhook_update_payload.rb +17 -0
- data/lib/voltaria.rb +205 -0
- data/reference.md +5135 -0
- metadata +250 -0
|
@@ -0,0 +1,183 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module Voltaria
|
|
4
|
+
module Repayments
|
|
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 repayments made under your partner account. Supports filtering by client, loan, or installments.
|
|
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] :client_id
|
|
23
|
+
# @option params [String, nil] :loan_id
|
|
24
|
+
# @option params [String, nil] :installment_id
|
|
25
|
+
# @option params [Integer, nil] :page
|
|
26
|
+
# @option params [Integer, nil] :page_size
|
|
27
|
+
# @option params [String, nil] :order_by
|
|
28
|
+
# @option params [String, nil] :q
|
|
29
|
+
#
|
|
30
|
+
# @return [Voltaria::Types::PaginatedResponseRepaymentResponseWithClientInfo]
|
|
31
|
+
def list_repayment_logs(request_options: {}, **params)
|
|
32
|
+
params = Voltaria::Internal::Types::Utils.normalize_keys(params)
|
|
33
|
+
query_param_names = %i[client_id loan_id installment_id page page_size order_by q]
|
|
34
|
+
query_params = {}
|
|
35
|
+
query_params["client_id"] = params[:client_id] if params.key?(:client_id)
|
|
36
|
+
query_params["loan_id"] = params[:loan_id] if params.key?(:loan_id)
|
|
37
|
+
query_params["installment_id"] = params[:installment_id] if params.key?(:installment_id)
|
|
38
|
+
query_params["page"] = params[:page] if params.key?(:page)
|
|
39
|
+
query_params["page_size"] = params[:page_size] if params.key?(:page_size)
|
|
40
|
+
query_params["order_by"] = params[:order_by] if params.key?(:order_by)
|
|
41
|
+
query_params["q"] = params[:q] if params.key?(:q)
|
|
42
|
+
params.except(*query_param_names)
|
|
43
|
+
|
|
44
|
+
request = Voltaria::Internal::JSON::Request.new(
|
|
45
|
+
base_url: request_options[:base_url],
|
|
46
|
+
method: "GET",
|
|
47
|
+
path: "v2/repayments",
|
|
48
|
+
query: query_params,
|
|
49
|
+
request_options: request_options
|
|
50
|
+
)
|
|
51
|
+
begin
|
|
52
|
+
response = @client.send(request)
|
|
53
|
+
rescue Net::HTTPRequestTimeout
|
|
54
|
+
raise Voltaria::Errors::TimeoutError
|
|
55
|
+
end
|
|
56
|
+
code = response.code.to_i
|
|
57
|
+
if code.between?(200, 299)
|
|
58
|
+
Voltaria::Types::PaginatedResponseRepaymentResponseWithClientInfo.load(response.body)
|
|
59
|
+
else
|
|
60
|
+
error_class = Voltaria::Errors::ResponseError.subclass_for_code(code)
|
|
61
|
+
raise error_class.new(response.body, code: code)
|
|
62
|
+
end
|
|
63
|
+
end
|
|
64
|
+
|
|
65
|
+
# Create a new repayment log for an installment. Requires the installment ID, loan ID or loan correlation ID.
|
|
66
|
+
#
|
|
67
|
+
# @param request_options [Hash]
|
|
68
|
+
# @param params [Voltaria::Repayments::Types::RepaymentCreatePayload]
|
|
69
|
+
# @option request_options [String] :base_url
|
|
70
|
+
# @option request_options [Hash{String => Object}] :additional_headers
|
|
71
|
+
# @option request_options [Hash{String => Object}] :additional_query_parameters
|
|
72
|
+
# @option request_options [Hash{String => Object}] :additional_body_parameters
|
|
73
|
+
# @option request_options [Integer] :timeout_in_seconds
|
|
74
|
+
# @option params [String, nil] :installment_id
|
|
75
|
+
# @option params [String, nil] :loan_id
|
|
76
|
+
# @option params [String, nil] :correlation_id
|
|
77
|
+
#
|
|
78
|
+
# @return [Voltaria::Types::RepaymentResponse]
|
|
79
|
+
def create_repayment(request_options: {}, **params)
|
|
80
|
+
params = Voltaria::Internal::Types::Utils.normalize_keys(params)
|
|
81
|
+
request_data = Voltaria::Repayments::Types::RepaymentCreatePayload.new(params).to_h
|
|
82
|
+
non_body_param_names = %w[installment_id loan_id correlation_id]
|
|
83
|
+
body = request_data.except(*non_body_param_names)
|
|
84
|
+
|
|
85
|
+
query_param_names = %i[installment_id loan_id correlation_id]
|
|
86
|
+
query_params = {}
|
|
87
|
+
query_params["installment_id"] = params[:installment_id] if params.key?(:installment_id)
|
|
88
|
+
query_params["loan_id"] = params[:loan_id] if params.key?(:loan_id)
|
|
89
|
+
query_params["correlation_id"] = params[:correlation_id] if params.key?(:correlation_id)
|
|
90
|
+
params.except(*query_param_names)
|
|
91
|
+
|
|
92
|
+
request = Voltaria::Internal::JSON::Request.new(
|
|
93
|
+
base_url: request_options[:base_url],
|
|
94
|
+
method: "POST",
|
|
95
|
+
path: "v2/repayments",
|
|
96
|
+
query: query_params,
|
|
97
|
+
body: body,
|
|
98
|
+
request_options: request_options
|
|
99
|
+
)
|
|
100
|
+
begin
|
|
101
|
+
response = @client.send(request)
|
|
102
|
+
rescue Net::HTTPRequestTimeout
|
|
103
|
+
raise Voltaria::Errors::TimeoutError
|
|
104
|
+
end
|
|
105
|
+
code = response.code.to_i
|
|
106
|
+
if code.between?(200, 299)
|
|
107
|
+
Voltaria::Types::RepaymentResponse.load(response.body)
|
|
108
|
+
else
|
|
109
|
+
error_class = Voltaria::Errors::ResponseError.subclass_for_code(code)
|
|
110
|
+
raise error_class.new(response.body, code: code)
|
|
111
|
+
end
|
|
112
|
+
end
|
|
113
|
+
|
|
114
|
+
# Initiate processing of up to 10000 repayment logs. Returns task_id for tracking progress.
|
|
115
|
+
#
|
|
116
|
+
# @param request_options [Hash]
|
|
117
|
+
# @param params [Voltaria::Repayments::Types::BulkRepaymentCreatePayload]
|
|
118
|
+
# @option request_options [String] :base_url
|
|
119
|
+
# @option request_options [Hash{String => Object}] :additional_headers
|
|
120
|
+
# @option request_options [Hash{String => Object}] :additional_query_parameters
|
|
121
|
+
# @option request_options [Hash{String => Object}] :additional_body_parameters
|
|
122
|
+
# @option request_options [Integer] :timeout_in_seconds
|
|
123
|
+
#
|
|
124
|
+
# @return [Voltaria::Types::BulkRepaymentTaskResponse]
|
|
125
|
+
def create_bulk_repayments(request_options: {}, **params)
|
|
126
|
+
params = Voltaria::Internal::Types::Utils.normalize_keys(params)
|
|
127
|
+
request = Voltaria::Internal::JSON::Request.new(
|
|
128
|
+
base_url: request_options[:base_url],
|
|
129
|
+
method: "POST",
|
|
130
|
+
path: "v2/repayments/bulk",
|
|
131
|
+
body: Voltaria::Repayments::Types::BulkRepaymentCreatePayload.new(params).to_h,
|
|
132
|
+
request_options: request_options
|
|
133
|
+
)
|
|
134
|
+
begin
|
|
135
|
+
response = @client.send(request)
|
|
136
|
+
rescue Net::HTTPRequestTimeout
|
|
137
|
+
raise Voltaria::Errors::TimeoutError
|
|
138
|
+
end
|
|
139
|
+
code = response.code.to_i
|
|
140
|
+
if code.between?(200, 299)
|
|
141
|
+
Voltaria::Types::BulkRepaymentTaskResponse.load(response.body)
|
|
142
|
+
else
|
|
143
|
+
error_class = Voltaria::Errors::ResponseError.subclass_for_code(code)
|
|
144
|
+
raise error_class.new(response.body, code: code)
|
|
145
|
+
end
|
|
146
|
+
end
|
|
147
|
+
|
|
148
|
+
# Check the progress and results of a bulk repayment processing task.
|
|
149
|
+
#
|
|
150
|
+
# @param request_options [Hash]
|
|
151
|
+
# @param params [Hash]
|
|
152
|
+
# @option request_options [String] :base_url
|
|
153
|
+
# @option request_options [Hash{String => Object}] :additional_headers
|
|
154
|
+
# @option request_options [Hash{String => Object}] :additional_query_parameters
|
|
155
|
+
# @option request_options [Hash{String => Object}] :additional_body_parameters
|
|
156
|
+
# @option request_options [Integer] :timeout_in_seconds
|
|
157
|
+
# @option params [String] :task_id
|
|
158
|
+
#
|
|
159
|
+
# @return [Voltaria::Types::BulkRepaymentTaskStatus]
|
|
160
|
+
def get_bulk_repayment_status(request_options: {}, **params)
|
|
161
|
+
params = Voltaria::Internal::Types::Utils.normalize_keys(params)
|
|
162
|
+
request = Voltaria::Internal::JSON::Request.new(
|
|
163
|
+
base_url: request_options[:base_url],
|
|
164
|
+
method: "GET",
|
|
165
|
+
path: "v2/repayments/bulk/#{URI.encode_uri_component(params[:task_id].to_s)}",
|
|
166
|
+
request_options: request_options
|
|
167
|
+
)
|
|
168
|
+
begin
|
|
169
|
+
response = @client.send(request)
|
|
170
|
+
rescue Net::HTTPRequestTimeout
|
|
171
|
+
raise Voltaria::Errors::TimeoutError
|
|
172
|
+
end
|
|
173
|
+
code = response.code.to_i
|
|
174
|
+
if code.between?(200, 299)
|
|
175
|
+
Voltaria::Types::BulkRepaymentTaskStatus.load(response.body)
|
|
176
|
+
else
|
|
177
|
+
error_class = Voltaria::Errors::ResponseError.subclass_for_code(code)
|
|
178
|
+
raise error_class.new(response.body, code: code)
|
|
179
|
+
end
|
|
180
|
+
end
|
|
181
|
+
end
|
|
182
|
+
end
|
|
183
|
+
end
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module Voltaria
|
|
4
|
+
module Repayments
|
|
5
|
+
module Types
|
|
6
|
+
class BulkRepaymentCreatePayload < Internal::Types::Model
|
|
7
|
+
field :repayments, -> { Internal::Types::Array[Voltaria::Types::BulkRepaymentItemPayload] }, optional: false, nullable: false
|
|
8
|
+
end
|
|
9
|
+
end
|
|
10
|
+
end
|
|
11
|
+
end
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module Voltaria
|
|
4
|
+
module Repayments
|
|
5
|
+
module Types
|
|
6
|
+
class ListRepaymentLogsRequest < 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 :page, -> { Integer }, optional: true, nullable: false
|
|
11
|
+
field :page_size, -> { Integer }, optional: true, nullable: false
|
|
12
|
+
field :order_by, -> { String }, optional: true, nullable: false
|
|
13
|
+
field :q, -> { String }, optional: true, nullable: false
|
|
14
|
+
end
|
|
15
|
+
end
|
|
16
|
+
end
|
|
17
|
+
end
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module Voltaria
|
|
4
|
+
module Repayments
|
|
5
|
+
module Types
|
|
6
|
+
class RepaymentCreatePayload < Internal::Types::Model
|
|
7
|
+
field :installment_id, -> { String }, optional: true, nullable: false
|
|
8
|
+
field :loan_id, -> { String }, optional: true, nullable: false
|
|
9
|
+
field :correlation_id, -> { String }, optional: true, nullable: false
|
|
10
|
+
field :amount, -> { Voltaria::Repayments::Types::RepaymentCreatePayloadAmount }, optional: false, nullable: false
|
|
11
|
+
field :repayment_date, -> { String }, optional: true, nullable: false
|
|
12
|
+
field :data, -> { Internal::Types::Hash[String, Object] }, optional: true, nullable: false
|
|
13
|
+
field :is_early_settlement, -> { Internal::Types::Boolean }, optional: true, nullable: false
|
|
14
|
+
end
|
|
15
|
+
end
|
|
16
|
+
end
|
|
17
|
+
end
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module Voltaria
|
|
4
|
+
module Repayments
|
|
5
|
+
module Types
|
|
6
|
+
# The amount of payment made for installment
|
|
7
|
+
class RepaymentCreatePayloadAmount < Internal::Types::Model
|
|
8
|
+
extend Voltaria::Internal::Types::Union
|
|
9
|
+
|
|
10
|
+
member -> { Integer }
|
|
11
|
+
member -> { String }
|
|
12
|
+
end
|
|
13
|
+
end
|
|
14
|
+
end
|
|
15
|
+
end
|
|
@@ -0,0 +1,124 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module Voltaria
|
|
4
|
+
module Sandbox
|
|
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
|
+
# Update an existing client's status or credit limit using their client ID.
|
|
14
|
+
#
|
|
15
|
+
# @param request_options [Hash]
|
|
16
|
+
# @param params [Voltaria::Sandbox::Types::ClientUpdateSandbox]
|
|
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] :client_id
|
|
23
|
+
#
|
|
24
|
+
# @return [Voltaria::Types::ClientResponse]
|
|
25
|
+
def update_client(request_options: {}, **params)
|
|
26
|
+
params = Voltaria::Internal::Types::Utils.normalize_keys(params)
|
|
27
|
+
request_data = Voltaria::Sandbox::Types::ClientUpdateSandbox.new(params).to_h
|
|
28
|
+
non_body_param_names = ["client_id"]
|
|
29
|
+
body = request_data.except(*non_body_param_names)
|
|
30
|
+
|
|
31
|
+
request = Voltaria::Internal::JSON::Request.new(
|
|
32
|
+
base_url: request_options[:base_url],
|
|
33
|
+
method: "PUT",
|
|
34
|
+
path: "v2/sandbox/clients/#{URI.encode_uri_component(params[:client_id].to_s)}",
|
|
35
|
+
body: body,
|
|
36
|
+
request_options: request_options
|
|
37
|
+
)
|
|
38
|
+
begin
|
|
39
|
+
response = @client.send(request)
|
|
40
|
+
rescue Net::HTTPRequestTimeout
|
|
41
|
+
raise Voltaria::Errors::TimeoutError
|
|
42
|
+
end
|
|
43
|
+
code = response.code.to_i
|
|
44
|
+
if code.between?(200, 299)
|
|
45
|
+
Voltaria::Types::ClientResponse.load(response.body)
|
|
46
|
+
else
|
|
47
|
+
error_class = Voltaria::Errors::ResponseError.subclass_for_code(code)
|
|
48
|
+
raise error_class.new(response.body, code: code)
|
|
49
|
+
end
|
|
50
|
+
end
|
|
51
|
+
|
|
52
|
+
# Update the status of a specific loan using its unique loan ID.
|
|
53
|
+
#
|
|
54
|
+
# @param request_options [Hash]
|
|
55
|
+
# @param params [Voltaria::Sandbox::Types::LoanUpdateSandbox]
|
|
56
|
+
# @option request_options [String] :base_url
|
|
57
|
+
# @option request_options [Hash{String => Object}] :additional_headers
|
|
58
|
+
# @option request_options [Hash{String => Object}] :additional_query_parameters
|
|
59
|
+
# @option request_options [Hash{String => Object}] :additional_body_parameters
|
|
60
|
+
# @option request_options [Integer] :timeout_in_seconds
|
|
61
|
+
# @option params [String] :loan_id
|
|
62
|
+
#
|
|
63
|
+
# @return [Voltaria::Types::LoanResponseWithInstallments]
|
|
64
|
+
def update_loan(request_options: {}, **params)
|
|
65
|
+
params = Voltaria::Internal::Types::Utils.normalize_keys(params)
|
|
66
|
+
request_data = Voltaria::Sandbox::Types::LoanUpdateSandbox.new(params).to_h
|
|
67
|
+
non_body_param_names = ["loan_id"]
|
|
68
|
+
body = request_data.except(*non_body_param_names)
|
|
69
|
+
|
|
70
|
+
request = Voltaria::Internal::JSON::Request.new(
|
|
71
|
+
base_url: request_options[:base_url],
|
|
72
|
+
method: "PUT",
|
|
73
|
+
path: "v2/sandbox/loans/#{URI.encode_uri_component(params[:loan_id].to_s)}",
|
|
74
|
+
body: body,
|
|
75
|
+
request_options: request_options
|
|
76
|
+
)
|
|
77
|
+
begin
|
|
78
|
+
response = @client.send(request)
|
|
79
|
+
rescue Net::HTTPRequestTimeout
|
|
80
|
+
raise Voltaria::Errors::TimeoutError
|
|
81
|
+
end
|
|
82
|
+
code = response.code.to_i
|
|
83
|
+
if code.between?(200, 299)
|
|
84
|
+
Voltaria::Types::LoanResponseWithInstallments.load(response.body)
|
|
85
|
+
else
|
|
86
|
+
error_class = Voltaria::Errors::ResponseError.subclass_for_code(code)
|
|
87
|
+
raise error_class.new(response.body, code: code)
|
|
88
|
+
end
|
|
89
|
+
end
|
|
90
|
+
|
|
91
|
+
# Test a webhook subscription by ID or trigger all by event type.
|
|
92
|
+
#
|
|
93
|
+
# @param request_options [Hash]
|
|
94
|
+
# @param params [Voltaria::Sandbox::Types::WebhookTestSandbox]
|
|
95
|
+
# @option request_options [String] :base_url
|
|
96
|
+
# @option request_options [Hash{String => Object}] :additional_headers
|
|
97
|
+
# @option request_options [Hash{String => Object}] :additional_query_parameters
|
|
98
|
+
# @option request_options [Hash{String => Object}] :additional_body_parameters
|
|
99
|
+
# @option request_options [Integer] :timeout_in_seconds
|
|
100
|
+
#
|
|
101
|
+
# @return [Hash[String, Object]]
|
|
102
|
+
def webhook_test(request_options: {}, **params)
|
|
103
|
+
params = Voltaria::Internal::Types::Utils.normalize_keys(params)
|
|
104
|
+
request = Voltaria::Internal::JSON::Request.new(
|
|
105
|
+
base_url: request_options[:base_url],
|
|
106
|
+
method: "POST",
|
|
107
|
+
path: "v2/sandbox/webhooks/trigger",
|
|
108
|
+
body: Voltaria::Sandbox::Types::WebhookTestSandbox.new(params).to_h,
|
|
109
|
+
request_options: request_options
|
|
110
|
+
)
|
|
111
|
+
begin
|
|
112
|
+
response = @client.send(request)
|
|
113
|
+
rescue Net::HTTPRequestTimeout
|
|
114
|
+
raise Voltaria::Errors::TimeoutError
|
|
115
|
+
end
|
|
116
|
+
code = response.code.to_i
|
|
117
|
+
return if code.between?(200, 299)
|
|
118
|
+
|
|
119
|
+
error_class = Voltaria::Errors::ResponseError.subclass_for_code(code)
|
|
120
|
+
raise error_class.new(response.body, code: code)
|
|
121
|
+
end
|
|
122
|
+
end
|
|
123
|
+
end
|
|
124
|
+
end
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module Voltaria
|
|
4
|
+
module Sandbox
|
|
5
|
+
module Types
|
|
6
|
+
class ClientUpdateSandbox < Internal::Types::Model
|
|
7
|
+
field :client_id, -> { String }, optional: false, nullable: false
|
|
8
|
+
field :status, -> { Voltaria::Types::ClientStatusEnum }, optional: true, nullable: false
|
|
9
|
+
field :limit, -> { Voltaria::Sandbox::Types::ClientUpdateSandboxLimit }, optional: true, nullable: false
|
|
10
|
+
end
|
|
11
|
+
end
|
|
12
|
+
end
|
|
13
|
+
end
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module Voltaria
|
|
4
|
+
module Sandbox
|
|
5
|
+
module Types
|
|
6
|
+
# The limit to set for the client. This will override the existing limit.
|
|
7
|
+
class ClientUpdateSandboxLimit < Internal::Types::Model
|
|
8
|
+
extend Voltaria::Internal::Types::Union
|
|
9
|
+
|
|
10
|
+
member -> { Integer }
|
|
11
|
+
member -> { String }
|
|
12
|
+
end
|
|
13
|
+
end
|
|
14
|
+
end
|
|
15
|
+
end
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module Voltaria
|
|
4
|
+
module Sandbox
|
|
5
|
+
module Types
|
|
6
|
+
class LoanUpdateSandbox < Internal::Types::Model
|
|
7
|
+
field :loan_id, -> { String }, optional: false, nullable: false
|
|
8
|
+
field :status, -> { Voltaria::Types::LoanStatusEnum }, optional: true, nullable: false
|
|
9
|
+
end
|
|
10
|
+
end
|
|
11
|
+
end
|
|
12
|
+
end
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module Voltaria
|
|
4
|
+
module Sandbox
|
|
5
|
+
module Types
|
|
6
|
+
class WebhookTestSandbox < Internal::Types::Model
|
|
7
|
+
field :webhook_id, -> { String }, optional: true, nullable: false
|
|
8
|
+
field :event_type, -> { Voltaria::Types::WebhookEventTypeEnum }, optional: false, nullable: false
|
|
9
|
+
end
|
|
10
|
+
end
|
|
11
|
+
end
|
|
12
|
+
end
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module Voltaria
|
|
4
|
+
module Types
|
|
5
|
+
# Address structure for account holder (used for USD accounts).
|
|
6
|
+
class AccountAddress < Internal::Types::Model
|
|
7
|
+
field :country, -> { String }, optional: false, nullable: false
|
|
8
|
+
field :city, -> { String }, optional: false, nullable: false
|
|
9
|
+
field :postal_code, -> { String }, optional: false, nullable: false
|
|
10
|
+
field :state, -> { String }, optional: true, nullable: false
|
|
11
|
+
field :line1, -> { String }, optional: false, nullable: false
|
|
12
|
+
end
|
|
13
|
+
end
|
|
14
|
+
end
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module Voltaria
|
|
4
|
+
module Types
|
|
5
|
+
class AvailableFunding < Internal::Types::Model
|
|
6
|
+
field :currency, -> { Voltaria::Types::CurrencyEnum }, optional: false, nullable: false
|
|
7
|
+
field :limit, -> { String }, optional: false, nullable: false
|
|
8
|
+
field :later, -> { String }, optional: false, nullable: true
|
|
9
|
+
field :max_maturity_days, -> { Integer }, optional: false, nullable: false
|
|
10
|
+
field :rate, -> { String }, optional: false, nullable: false
|
|
11
|
+
field :outstanding, -> { String }, optional: false, nullable: false
|
|
12
|
+
field :available, -> { String }, optional: false, nullable: false
|
|
13
|
+
end
|
|
14
|
+
end
|
|
15
|
+
end
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module Voltaria
|
|
4
|
+
module Types
|
|
5
|
+
class BulkLoanItemPayload < Internal::Types::Model
|
|
6
|
+
field :client_id, -> { String }, optional: false, nullable: false
|
|
7
|
+
field :currency, -> { Voltaria::Types::CurrencyEnum }, optional: false, nullable: false
|
|
8
|
+
field :amount, -> { Voltaria::Types::BulkLoanItemPayloadAmount }, optional: false, nullable: false
|
|
9
|
+
field :correlation_id, -> { String }, optional: true, nullable: false
|
|
10
|
+
field :loan_date, -> { String }, optional: true, nullable: false
|
|
11
|
+
field :installments, -> { Internal::Types::Array[Voltaria::Types::LoanInstallmentCreatePayload] }, optional: false, nullable: false
|
|
12
|
+
field :data, -> { Internal::Types::Hash[String, Object] }, optional: true, nullable: false
|
|
13
|
+
end
|
|
14
|
+
end
|
|
15
|
+
end
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module Voltaria
|
|
4
|
+
module Types
|
|
5
|
+
# The amount of the loan
|
|
6
|
+
class BulkLoanItemPayloadAmount < Internal::Types::Model
|
|
7
|
+
extend Voltaria::Internal::Types::Union
|
|
8
|
+
|
|
9
|
+
member -> { Integer }
|
|
10
|
+
member -> { String }
|
|
11
|
+
end
|
|
12
|
+
end
|
|
13
|
+
end
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module Voltaria
|
|
4
|
+
module Types
|
|
5
|
+
class BulkLoanItemResult < Internal::Types::Model
|
|
6
|
+
field :index, -> { Integer }, optional: false, nullable: false
|
|
7
|
+
field :success, -> { Internal::Types::Boolean }, optional: false, nullable: false
|
|
8
|
+
field :loan_id, -> { String }, optional: true, nullable: false
|
|
9
|
+
field :error, -> { String }, optional: true, nullable: false
|
|
10
|
+
field :client_id, -> { String }, optional: true, nullable: false
|
|
11
|
+
field :correlation_id, -> { String }, optional: true, nullable: false
|
|
12
|
+
field :amount, -> { String }, optional: true, nullable: false
|
|
13
|
+
end
|
|
14
|
+
end
|
|
15
|
+
end
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module Voltaria
|
|
4
|
+
module Types
|
|
5
|
+
class BulkLoanResult < Internal::Types::Model
|
|
6
|
+
field :success_count, -> { Integer }, optional: false, nullable: false
|
|
7
|
+
field :failure_count, -> { Integer }, optional: false, nullable: false
|
|
8
|
+
field :total_processed, -> { Integer }, optional: false, nullable: false
|
|
9
|
+
field :processing_time_seconds, -> { Integer }, optional: false, nullable: false
|
|
10
|
+
field :results, -> { Internal::Types::Array[Voltaria::Types::BulkLoanItemResult] }, optional: false, nullable: false
|
|
11
|
+
end
|
|
12
|
+
end
|
|
13
|
+
end
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module Voltaria
|
|
4
|
+
module Types
|
|
5
|
+
class BulkLoanTaskResponse < Internal::Types::Model
|
|
6
|
+
field :task_id, -> { String }, optional: false, nullable: false
|
|
7
|
+
field :total_loans, -> { Integer }, optional: false, nullable: false
|
|
8
|
+
field :estimated_completion_time, -> { String }, optional: false, nullable: false
|
|
9
|
+
end
|
|
10
|
+
end
|
|
11
|
+
end
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module Voltaria
|
|
4
|
+
module Types
|
|
5
|
+
class BulkLoanTaskStatus < Internal::Types::Model
|
|
6
|
+
field :task_id, -> { String }, optional: false, nullable: false
|
|
7
|
+
field :status, -> { String }, optional: false, nullable: false
|
|
8
|
+
field :current, -> { Integer }, optional: true, nullable: false
|
|
9
|
+
field :total, -> { Integer }, optional: true, nullable: false
|
|
10
|
+
field :result, -> { Voltaria::Types::BulkLoanResult }, optional: true, nullable: false
|
|
11
|
+
field :error, -> { String }, optional: true, nullable: false
|
|
12
|
+
end
|
|
13
|
+
end
|
|
14
|
+
end
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module Voltaria
|
|
4
|
+
module Types
|
|
5
|
+
class BulkRepaymentItemPayload < Internal::Types::Model
|
|
6
|
+
field :amount, -> { Voltaria::Types::BulkRepaymentItemPayloadAmount }, optional: false, nullable: false
|
|
7
|
+
field :repayment_date, -> { String }, optional: true, nullable: false
|
|
8
|
+
field :data, -> { Internal::Types::Hash[String, Object] }, optional: true, nullable: false
|
|
9
|
+
field :is_early_settlement, -> { Internal::Types::Boolean }, optional: true, nullable: false
|
|
10
|
+
field :installment_id, -> { String }, optional: true, nullable: false
|
|
11
|
+
field :loan_id, -> { String }, optional: true, nullable: false
|
|
12
|
+
field :correlation_id, -> { String }, optional: true, nullable: false
|
|
13
|
+
end
|
|
14
|
+
end
|
|
15
|
+
end
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module Voltaria
|
|
4
|
+
module Types
|
|
5
|
+
# The amount of payment made for installment
|
|
6
|
+
class BulkRepaymentItemPayloadAmount < Internal::Types::Model
|
|
7
|
+
extend Voltaria::Internal::Types::Union
|
|
8
|
+
|
|
9
|
+
member -> { Integer }
|
|
10
|
+
member -> { String }
|
|
11
|
+
end
|
|
12
|
+
end
|
|
13
|
+
end
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module Voltaria
|
|
4
|
+
module Types
|
|
5
|
+
class BulkRepaymentItemResult < Internal::Types::Model
|
|
6
|
+
field :index, -> { Integer }, optional: false, nullable: false
|
|
7
|
+
field :success, -> { Internal::Types::Boolean }, optional: false, nullable: false
|
|
8
|
+
field :repayment_log_id, -> { String }, optional: true, nullable: false
|
|
9
|
+
field :error, -> { String }, optional: true, nullable: false
|
|
10
|
+
field :installment_id, -> { String }, optional: true, nullable: false
|
|
11
|
+
field :loan_id, -> { String }, optional: true, nullable: false
|
|
12
|
+
field :amount, -> { String }, optional: true, nullable: false
|
|
13
|
+
end
|
|
14
|
+
end
|
|
15
|
+
end
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module Voltaria
|
|
4
|
+
module Types
|
|
5
|
+
class BulkRepaymentResult < Internal::Types::Model
|
|
6
|
+
field :success_count, -> { Integer }, optional: false, nullable: false
|
|
7
|
+
field :failure_count, -> { Integer }, optional: false, nullable: false
|
|
8
|
+
field :total_processed, -> { Integer }, optional: false, nullable: false
|
|
9
|
+
field :processing_time_seconds, -> { Integer }, optional: false, nullable: false
|
|
10
|
+
field :results, -> { Internal::Types::Array[Voltaria::Types::BulkRepaymentItemResult] }, optional: false, nullable: false
|
|
11
|
+
end
|
|
12
|
+
end
|
|
13
|
+
end
|