voltaria_sdk 2.40.0 → 2.42.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/lib/voltaria/client.rb +5 -0
- data/lib/voltaria/tasks/client.rb +311 -0
- data/lib/voltaria/tasks/types/get_task_request.rb +11 -0
- data/lib/voltaria/tasks/types/list_task_notes_request.rb +15 -0
- data/lib/voltaria/tasks/types/list_task_status_history_request.rb +14 -0
- data/lib/voltaria/tasks/types/list_tasks_request.rb +19 -0
- data/lib/voltaria/tasks/types/task_note_create_payload.rb +12 -0
- data/lib/voltaria/tasks/types/task_partner_create_payload.rb +18 -0
- data/lib/voltaria/tasks/types/task_partner_status_update_payload.rb +12 -0
- data/lib/voltaria/tasks/types/task_partner_status_update_payload_status.rb +16 -0
- data/lib/voltaria/types/client_account_response.rb +1 -0
- data/lib/voltaria/types/cop_status_enum.rb +15 -0
- data/lib/voltaria/types/note_response.rb +18 -0
- data/lib/voltaria/types/paginated_response_note_response.rb +16 -0
- data/lib/voltaria/types/paginated_response_task_partner_response.rb +16 -0
- data/lib/voltaria/types/paginated_response_task_partner_status_history_response.rb +16 -0
- data/lib/voltaria/types/task_partner_response.rb +24 -0
- data/lib/voltaria/types/task_partner_status_history_response.rb +14 -0
- data/lib/voltaria/types/task_priority_enum.rb +14 -0
- data/lib/voltaria/types/task_public_actor_type_enum.rb +12 -0
- data/lib/voltaria/types/task_status_enum.rb +15 -0
- data/lib/voltaria/version.rb +1 -1
- data/lib/voltaria.rb +19 -0
- data/reference.md +633 -0
- metadata +21 -2
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: dd0b1b9b89cbde6df47f25014084a5c6b4d82bc14ea522e2dc4d722d325e5a58
|
|
4
|
+
data.tar.gz: '09e2b3503b0ff68b2cde6405686ca93881849756251004c68a6d53c731ab822d'
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: a3d89e785db76e665079e3f34b17d3570c2f37e2572e6629021981ce5a5374f54f5774f2ee5ee6e78431f2c304432242b37ca8894213f10f389c30418272eb8e
|
|
7
|
+
data.tar.gz: f9afeaa5a62878dc9c494e17f7678870cb391a49f1cca3a1c315f4dacae133570681c052ef17727705ba9a39397e4f222e698ced11591d7b64a969b3d7401258
|
data/lib/voltaria/client.rb
CHANGED
|
@@ -76,6 +76,11 @@ module Voltaria
|
|
|
76
76
|
@repayments ||= Voltaria::Repayments::Client.new(client: @raw_client)
|
|
77
77
|
end
|
|
78
78
|
|
|
79
|
+
# @return [Voltaria::Tasks::Client]
|
|
80
|
+
def tasks
|
|
81
|
+
@tasks ||= Voltaria::Tasks::Client.new(client: @raw_client)
|
|
82
|
+
end
|
|
83
|
+
|
|
79
84
|
# @return [Voltaria::Drawdowns::Client]
|
|
80
85
|
def drawdowns
|
|
81
86
|
@drawdowns ||= Voltaria::Drawdowns::Client.new(client: @raw_client)
|
|
@@ -0,0 +1,311 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module Voltaria
|
|
4
|
+
module Tasks
|
|
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
|
+
# Paginated list of the tasks shared with your partner account, optionally filtered by status or by the client,
|
|
14
|
+
# loan, installment or waterfall they relate to.
|
|
15
|
+
#
|
|
16
|
+
# @param request_options [Hash]
|
|
17
|
+
# @param params [Hash]
|
|
18
|
+
# @option request_options [String] :base_url
|
|
19
|
+
# @option request_options [Hash{String => Object}] :additional_headers
|
|
20
|
+
# @option request_options [Hash{String => Object}] :additional_query_parameters
|
|
21
|
+
# @option request_options [Hash{String => Object}] :additional_body_parameters
|
|
22
|
+
# @option request_options [Integer] :timeout_in_seconds
|
|
23
|
+
# @option params [Voltaria::Types::TaskStatusEnum, nil] :status
|
|
24
|
+
# @option params [String, nil] :client_id
|
|
25
|
+
# @option params [String, nil] :loan_id
|
|
26
|
+
# @option params [String, nil] :installment_id
|
|
27
|
+
# @option params [String, nil] :waterfall_id
|
|
28
|
+
# @option params [Integer, nil] :page
|
|
29
|
+
# @option params [Integer, nil] :page_size
|
|
30
|
+
# @option params [String, nil] :order_by
|
|
31
|
+
# @option params [String, nil] :q
|
|
32
|
+
#
|
|
33
|
+
# @return [Voltaria::Types::PaginatedResponseTaskPartnerResponse]
|
|
34
|
+
def list_tasks(request_options: {}, **params)
|
|
35
|
+
params = Voltaria::Internal::Types::Utils.normalize_keys(params)
|
|
36
|
+
query_param_names = %i[status client_id loan_id installment_id waterfall_id page page_size order_by q]
|
|
37
|
+
query_params = {}
|
|
38
|
+
query_params["status"] = params[:status] if params.key?(:status)
|
|
39
|
+
query_params["client_id"] = params[:client_id] if params.key?(:client_id)
|
|
40
|
+
query_params["loan_id"] = params[:loan_id] if params.key?(:loan_id)
|
|
41
|
+
query_params["installment_id"] = params[:installment_id] if params.key?(:installment_id)
|
|
42
|
+
query_params["waterfall_id"] = params[:waterfall_id] if params.key?(:waterfall_id)
|
|
43
|
+
query_params["page"] = params[:page] if params.key?(:page)
|
|
44
|
+
query_params["page_size"] = params[:page_size] if params.key?(:page_size)
|
|
45
|
+
query_params["order_by"] = params[:order_by] if params.key?(:order_by)
|
|
46
|
+
query_params["q"] = params[:q] if params.key?(:q)
|
|
47
|
+
params.except(*query_param_names)
|
|
48
|
+
|
|
49
|
+
request = Voltaria::Internal::JSON::Request.new(
|
|
50
|
+
base_url: request_options[:base_url],
|
|
51
|
+
method: "GET",
|
|
52
|
+
path: "v2/tasks",
|
|
53
|
+
query: query_params,
|
|
54
|
+
request_options: request_options
|
|
55
|
+
)
|
|
56
|
+
begin
|
|
57
|
+
response = @client.send(request)
|
|
58
|
+
rescue Net::HTTPRequestTimeout
|
|
59
|
+
raise Voltaria::Errors::TimeoutError
|
|
60
|
+
end
|
|
61
|
+
code = response.code.to_i
|
|
62
|
+
if code.between?(200, 299)
|
|
63
|
+
Voltaria::Types::PaginatedResponseTaskPartnerResponse.load(response.body)
|
|
64
|
+
else
|
|
65
|
+
error_class = Voltaria::Errors::ResponseError.subclass_for_code(code)
|
|
66
|
+
raise error_class.new(response.body, code: code)
|
|
67
|
+
end
|
|
68
|
+
end
|
|
69
|
+
|
|
70
|
+
# Open a task for your partner account. Any entity you link to it must belong to you.
|
|
71
|
+
#
|
|
72
|
+
# @param request_options [Hash]
|
|
73
|
+
# @param params [Voltaria::Tasks::Types::TaskPartnerCreatePayload]
|
|
74
|
+
# @option request_options [String] :base_url
|
|
75
|
+
# @option request_options [Hash{String => Object}] :additional_headers
|
|
76
|
+
# @option request_options [Hash{String => Object}] :additional_query_parameters
|
|
77
|
+
# @option request_options [Hash{String => Object}] :additional_body_parameters
|
|
78
|
+
# @option request_options [Integer] :timeout_in_seconds
|
|
79
|
+
#
|
|
80
|
+
# @return [Voltaria::Types::TaskPartnerResponse]
|
|
81
|
+
def create_task(request_options: {}, **params)
|
|
82
|
+
params = Voltaria::Internal::Types::Utils.normalize_keys(params)
|
|
83
|
+
request = Voltaria::Internal::JSON::Request.new(
|
|
84
|
+
base_url: request_options[:base_url],
|
|
85
|
+
method: "POST",
|
|
86
|
+
path: "v2/tasks",
|
|
87
|
+
body: Voltaria::Tasks::Types::TaskPartnerCreatePayload.new(params).to_h,
|
|
88
|
+
request_options: request_options
|
|
89
|
+
)
|
|
90
|
+
begin
|
|
91
|
+
response = @client.send(request)
|
|
92
|
+
rescue Net::HTTPRequestTimeout
|
|
93
|
+
raise Voltaria::Errors::TimeoutError
|
|
94
|
+
end
|
|
95
|
+
code = response.code.to_i
|
|
96
|
+
if code.between?(200, 299)
|
|
97
|
+
Voltaria::Types::TaskPartnerResponse.load(response.body)
|
|
98
|
+
else
|
|
99
|
+
error_class = Voltaria::Errors::ResponseError.subclass_for_code(code)
|
|
100
|
+
raise error_class.new(response.body, code: code)
|
|
101
|
+
end
|
|
102
|
+
end
|
|
103
|
+
|
|
104
|
+
# Retrieve one of your tasks by its ID.
|
|
105
|
+
#
|
|
106
|
+
# @param request_options [Hash]
|
|
107
|
+
# @param params [Hash]
|
|
108
|
+
# @option request_options [String] :base_url
|
|
109
|
+
# @option request_options [Hash{String => Object}] :additional_headers
|
|
110
|
+
# @option request_options [Hash{String => Object}] :additional_query_parameters
|
|
111
|
+
# @option request_options [Hash{String => Object}] :additional_body_parameters
|
|
112
|
+
# @option request_options [Integer] :timeout_in_seconds
|
|
113
|
+
# @option params [String] :task_id
|
|
114
|
+
#
|
|
115
|
+
# @return [Voltaria::Types::TaskPartnerResponse]
|
|
116
|
+
def get_task(request_options: {}, **params)
|
|
117
|
+
params = Voltaria::Internal::Types::Utils.normalize_keys(params)
|
|
118
|
+
request = Voltaria::Internal::JSON::Request.new(
|
|
119
|
+
base_url: request_options[:base_url],
|
|
120
|
+
method: "GET",
|
|
121
|
+
path: "v2/tasks/#{URI.encode_uri_component(params[:task_id].to_s)}",
|
|
122
|
+
request_options: request_options
|
|
123
|
+
)
|
|
124
|
+
begin
|
|
125
|
+
response = @client.send(request)
|
|
126
|
+
rescue Net::HTTPRequestTimeout
|
|
127
|
+
raise Voltaria::Errors::TimeoutError
|
|
128
|
+
end
|
|
129
|
+
code = response.code.to_i
|
|
130
|
+
if code.between?(200, 299)
|
|
131
|
+
Voltaria::Types::TaskPartnerResponse.load(response.body)
|
|
132
|
+
else
|
|
133
|
+
error_class = Voltaria::Errors::ResponseError.subclass_for_code(code)
|
|
134
|
+
raise error_class.new(response.body, code: code)
|
|
135
|
+
end
|
|
136
|
+
end
|
|
137
|
+
|
|
138
|
+
# Move one of your tasks to another status. Status is the only field you can change. Requires a signed-in user —
|
|
139
|
+
# API keys cannot change a task.
|
|
140
|
+
#
|
|
141
|
+
# @param request_options [Hash]
|
|
142
|
+
# @param params [Voltaria::Tasks::Types::TaskPartnerStatusUpdatePayload]
|
|
143
|
+
# @option request_options [String] :base_url
|
|
144
|
+
# @option request_options [Hash{String => Object}] :additional_headers
|
|
145
|
+
# @option request_options [Hash{String => Object}] :additional_query_parameters
|
|
146
|
+
# @option request_options [Hash{String => Object}] :additional_body_parameters
|
|
147
|
+
# @option request_options [Integer] :timeout_in_seconds
|
|
148
|
+
# @option params [String] :task_id
|
|
149
|
+
#
|
|
150
|
+
# @return [Voltaria::Types::TaskPartnerResponse]
|
|
151
|
+
def update_task_status(request_options: {}, **params)
|
|
152
|
+
params = Voltaria::Internal::Types::Utils.normalize_keys(params)
|
|
153
|
+
request_data = Voltaria::Tasks::Types::TaskPartnerStatusUpdatePayload.new(params).to_h
|
|
154
|
+
non_body_param_names = ["task_id"]
|
|
155
|
+
body = request_data.except(*non_body_param_names)
|
|
156
|
+
|
|
157
|
+
request = Voltaria::Internal::JSON::Request.new(
|
|
158
|
+
base_url: request_options[:base_url],
|
|
159
|
+
method: "PATCH",
|
|
160
|
+
path: "v2/tasks/#{URI.encode_uri_component(params[:task_id].to_s)}/status",
|
|
161
|
+
body: body,
|
|
162
|
+
request_options: request_options
|
|
163
|
+
)
|
|
164
|
+
begin
|
|
165
|
+
response = @client.send(request)
|
|
166
|
+
rescue Net::HTTPRequestTimeout
|
|
167
|
+
raise Voltaria::Errors::TimeoutError
|
|
168
|
+
end
|
|
169
|
+
code = response.code.to_i
|
|
170
|
+
if code.between?(200, 299)
|
|
171
|
+
Voltaria::Types::TaskPartnerResponse.load(response.body)
|
|
172
|
+
else
|
|
173
|
+
error_class = Voltaria::Errors::ResponseError.subclass_for_code(code)
|
|
174
|
+
raise error_class.new(response.body, code: code)
|
|
175
|
+
end
|
|
176
|
+
end
|
|
177
|
+
|
|
178
|
+
# The status transitions of one of your tasks, and whether each one was made by your team or by Voltaria support.
|
|
179
|
+
#
|
|
180
|
+
# @param request_options [Hash]
|
|
181
|
+
# @param params [Hash]
|
|
182
|
+
# @option request_options [String] :base_url
|
|
183
|
+
# @option request_options [Hash{String => Object}] :additional_headers
|
|
184
|
+
# @option request_options [Hash{String => Object}] :additional_query_parameters
|
|
185
|
+
# @option request_options [Hash{String => Object}] :additional_body_parameters
|
|
186
|
+
# @option request_options [Integer] :timeout_in_seconds
|
|
187
|
+
# @option params [String] :task_id
|
|
188
|
+
# @option params [Integer, nil] :page
|
|
189
|
+
# @option params [Integer, nil] :page_size
|
|
190
|
+
# @option params [String, nil] :order_by
|
|
191
|
+
#
|
|
192
|
+
# @return [Voltaria::Types::PaginatedResponseTaskPartnerStatusHistoryResponse]
|
|
193
|
+
def list_task_status_history(request_options: {}, **params)
|
|
194
|
+
params = Voltaria::Internal::Types::Utils.normalize_keys(params)
|
|
195
|
+
query_param_names = %i[page page_size order_by]
|
|
196
|
+
query_params = {}
|
|
197
|
+
query_params["page"] = params[:page] if params.key?(:page)
|
|
198
|
+
query_params["page_size"] = params[:page_size] if params.key?(:page_size)
|
|
199
|
+
query_params["order_by"] = params[:order_by] if params.key?(:order_by)
|
|
200
|
+
params = params.except(*query_param_names)
|
|
201
|
+
|
|
202
|
+
request = Voltaria::Internal::JSON::Request.new(
|
|
203
|
+
base_url: request_options[:base_url],
|
|
204
|
+
method: "GET",
|
|
205
|
+
path: "v2/tasks/#{URI.encode_uri_component(params[:task_id].to_s)}/status-history",
|
|
206
|
+
query: query_params,
|
|
207
|
+
request_options: request_options
|
|
208
|
+
)
|
|
209
|
+
begin
|
|
210
|
+
response = @client.send(request)
|
|
211
|
+
rescue Net::HTTPRequestTimeout
|
|
212
|
+
raise Voltaria::Errors::TimeoutError
|
|
213
|
+
end
|
|
214
|
+
code = response.code.to_i
|
|
215
|
+
if code.between?(200, 299)
|
|
216
|
+
Voltaria::Types::PaginatedResponseTaskPartnerStatusHistoryResponse.load(response.body)
|
|
217
|
+
else
|
|
218
|
+
error_class = Voltaria::Errors::ResponseError.subclass_for_code(code)
|
|
219
|
+
raise error_class.new(response.body, code: code)
|
|
220
|
+
end
|
|
221
|
+
end
|
|
222
|
+
|
|
223
|
+
# Notes exchanged with Voltaria on one of your tasks.
|
|
224
|
+
#
|
|
225
|
+
# @param request_options [Hash]
|
|
226
|
+
# @param params [Hash]
|
|
227
|
+
# @option request_options [String] :base_url
|
|
228
|
+
# @option request_options [Hash{String => Object}] :additional_headers
|
|
229
|
+
# @option request_options [Hash{String => Object}] :additional_query_parameters
|
|
230
|
+
# @option request_options [Hash{String => Object}] :additional_body_parameters
|
|
231
|
+
# @option request_options [Integer] :timeout_in_seconds
|
|
232
|
+
# @option params [String] :task_id
|
|
233
|
+
# @option params [Integer, nil] :page
|
|
234
|
+
# @option params [Integer, nil] :page_size
|
|
235
|
+
# @option params [String, nil] :order_by
|
|
236
|
+
# @option params [String, nil] :q
|
|
237
|
+
#
|
|
238
|
+
# @return [Voltaria::Types::PaginatedResponseNoteResponse]
|
|
239
|
+
def list_task_notes(request_options: {}, **params)
|
|
240
|
+
params = Voltaria::Internal::Types::Utils.normalize_keys(params)
|
|
241
|
+
query_param_names = %i[page page_size order_by q]
|
|
242
|
+
query_params = {}
|
|
243
|
+
query_params["page"] = params[:page] if params.key?(:page)
|
|
244
|
+
query_params["page_size"] = params[:page_size] if params.key?(:page_size)
|
|
245
|
+
query_params["order_by"] = params[:order_by] if params.key?(:order_by)
|
|
246
|
+
query_params["q"] = params[:q] if params.key?(:q)
|
|
247
|
+
params = params.except(*query_param_names)
|
|
248
|
+
|
|
249
|
+
request = Voltaria::Internal::JSON::Request.new(
|
|
250
|
+
base_url: request_options[:base_url],
|
|
251
|
+
method: "GET",
|
|
252
|
+
path: "v2/tasks/#{URI.encode_uri_component(params[:task_id].to_s)}/notes",
|
|
253
|
+
query: query_params,
|
|
254
|
+
request_options: request_options
|
|
255
|
+
)
|
|
256
|
+
begin
|
|
257
|
+
response = @client.send(request)
|
|
258
|
+
rescue Net::HTTPRequestTimeout
|
|
259
|
+
raise Voltaria::Errors::TimeoutError
|
|
260
|
+
end
|
|
261
|
+
code = response.code.to_i
|
|
262
|
+
if code.between?(200, 299)
|
|
263
|
+
Voltaria::Types::PaginatedResponseNoteResponse.load(response.body)
|
|
264
|
+
else
|
|
265
|
+
error_class = Voltaria::Errors::ResponseError.subclass_for_code(code)
|
|
266
|
+
raise error_class.new(response.body, code: code)
|
|
267
|
+
end
|
|
268
|
+
end
|
|
269
|
+
|
|
270
|
+
# Add a note to one of your tasks. Requires a signed-in user — API keys cannot write notes, because a note needs
|
|
271
|
+
# an author.
|
|
272
|
+
#
|
|
273
|
+
# @param request_options [Hash]
|
|
274
|
+
# @param params [Voltaria::Tasks::Types::TaskNoteCreatePayload]
|
|
275
|
+
# @option request_options [String] :base_url
|
|
276
|
+
# @option request_options [Hash{String => Object}] :additional_headers
|
|
277
|
+
# @option request_options [Hash{String => Object}] :additional_query_parameters
|
|
278
|
+
# @option request_options [Hash{String => Object}] :additional_body_parameters
|
|
279
|
+
# @option request_options [Integer] :timeout_in_seconds
|
|
280
|
+
# @option params [String] :task_id
|
|
281
|
+
#
|
|
282
|
+
# @return [Voltaria::Types::NoteResponse]
|
|
283
|
+
def create_task_note(request_options: {}, **params)
|
|
284
|
+
params = Voltaria::Internal::Types::Utils.normalize_keys(params)
|
|
285
|
+
request_data = Voltaria::Tasks::Types::TaskNoteCreatePayload.new(params).to_h
|
|
286
|
+
non_body_param_names = ["task_id"]
|
|
287
|
+
body = request_data.except(*non_body_param_names)
|
|
288
|
+
|
|
289
|
+
request = Voltaria::Internal::JSON::Request.new(
|
|
290
|
+
base_url: request_options[:base_url],
|
|
291
|
+
method: "POST",
|
|
292
|
+
path: "v2/tasks/#{URI.encode_uri_component(params[:task_id].to_s)}/notes",
|
|
293
|
+
body: body,
|
|
294
|
+
request_options: request_options
|
|
295
|
+
)
|
|
296
|
+
begin
|
|
297
|
+
response = @client.send(request)
|
|
298
|
+
rescue Net::HTTPRequestTimeout
|
|
299
|
+
raise Voltaria::Errors::TimeoutError
|
|
300
|
+
end
|
|
301
|
+
code = response.code.to_i
|
|
302
|
+
if code.between?(200, 299)
|
|
303
|
+
Voltaria::Types::NoteResponse.load(response.body)
|
|
304
|
+
else
|
|
305
|
+
error_class = Voltaria::Errors::ResponseError.subclass_for_code(code)
|
|
306
|
+
raise error_class.new(response.body, code: code)
|
|
307
|
+
end
|
|
308
|
+
end
|
|
309
|
+
end
|
|
310
|
+
end
|
|
311
|
+
end
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module Voltaria
|
|
4
|
+
module Tasks
|
|
5
|
+
module Types
|
|
6
|
+
class ListTaskNotesRequest < Internal::Types::Model
|
|
7
|
+
field :task_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,14 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module Voltaria
|
|
4
|
+
module Tasks
|
|
5
|
+
module Types
|
|
6
|
+
class ListTaskStatusHistoryRequest < Internal::Types::Model
|
|
7
|
+
field :task_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
|
+
end
|
|
12
|
+
end
|
|
13
|
+
end
|
|
14
|
+
end
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module Voltaria
|
|
4
|
+
module Tasks
|
|
5
|
+
module Types
|
|
6
|
+
class ListTasksRequest < Internal::Types::Model
|
|
7
|
+
field :status, -> { Voltaria::Types::TaskStatusEnum }, optional: true, nullable: false
|
|
8
|
+
field :client_id, -> { String }, optional: true, nullable: false
|
|
9
|
+
field :loan_id, -> { String }, optional: true, nullable: false
|
|
10
|
+
field :installment_id, -> { String }, optional: true, nullable: false
|
|
11
|
+
field :waterfall_id, -> { String }, 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,12 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module Voltaria
|
|
4
|
+
module Tasks
|
|
5
|
+
module Types
|
|
6
|
+
class TaskNoteCreatePayload < Internal::Types::Model
|
|
7
|
+
field :task_id, -> { String }, optional: false, nullable: false
|
|
8
|
+
field :content, -> { String }, optional: false, nullable: false
|
|
9
|
+
end
|
|
10
|
+
end
|
|
11
|
+
end
|
|
12
|
+
end
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module Voltaria
|
|
4
|
+
module Tasks
|
|
5
|
+
module Types
|
|
6
|
+
class TaskPartnerCreatePayload < Internal::Types::Model
|
|
7
|
+
field :title, -> { String }, optional: false, nullable: false
|
|
8
|
+
field :description, -> { String }, optional: true, nullable: false
|
|
9
|
+
field :priority, -> { Voltaria::Types::TaskPriorityEnum }, optional: true, nullable: false
|
|
10
|
+
field :due_at, -> { String }, optional: true, nullable: false
|
|
11
|
+
field :client_id, -> { String }, optional: true, nullable: false
|
|
12
|
+
field :loan_id, -> { String }, optional: true, nullable: false
|
|
13
|
+
field :installment_id, -> { String }, optional: true, nullable: false
|
|
14
|
+
field :waterfall_id, -> { String }, optional: true, nullable: false
|
|
15
|
+
end
|
|
16
|
+
end
|
|
17
|
+
end
|
|
18
|
+
end
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module Voltaria
|
|
4
|
+
module Tasks
|
|
5
|
+
module Types
|
|
6
|
+
class TaskPartnerStatusUpdatePayload < Internal::Types::Model
|
|
7
|
+
field :task_id, -> { String }, optional: false, nullable: false
|
|
8
|
+
field :status, -> { Voltaria::Tasks::Types::TaskPartnerStatusUpdatePayloadStatus }, optional: false, nullable: false
|
|
9
|
+
end
|
|
10
|
+
end
|
|
11
|
+
end
|
|
12
|
+
end
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module Voltaria
|
|
4
|
+
module Tasks
|
|
5
|
+
module Types
|
|
6
|
+
module TaskPartnerStatusUpdatePayloadStatus
|
|
7
|
+
extend Voltaria::Internal::Types::Enum
|
|
8
|
+
|
|
9
|
+
ACTIVE = "active"
|
|
10
|
+
IN_PROGRESS = "in_progress"
|
|
11
|
+
BLOCKED = "blocked"
|
|
12
|
+
DONE = "done"
|
|
13
|
+
end
|
|
14
|
+
end
|
|
15
|
+
end
|
|
16
|
+
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 :cop_status, -> { Voltaria::Types::CopStatusEnum }, optional: true, nullable: false
|
|
19
20
|
field :created_at, -> { String }, optional: false, nullable: false
|
|
20
21
|
end
|
|
21
22
|
end
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module Voltaria
|
|
4
|
+
module Types
|
|
5
|
+
module CopStatusEnum
|
|
6
|
+
extend Voltaria::Internal::Types::Enum
|
|
7
|
+
|
|
8
|
+
MATCHED = "matched"
|
|
9
|
+
CLOSE_MATCH = "close_match"
|
|
10
|
+
NOT_MATCHED = "not_matched"
|
|
11
|
+
ACCOUNT_NOT_FOUND = "account_not_found"
|
|
12
|
+
UNAVAILABLE = "unavailable"
|
|
13
|
+
end
|
|
14
|
+
end
|
|
15
|
+
end
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module Voltaria
|
|
4
|
+
module Types
|
|
5
|
+
# A note, with the name and email of whoever wrote it.
|
|
6
|
+
class NoteResponse < Internal::Types::Model
|
|
7
|
+
field :id, -> { String }, optional: false, nullable: false
|
|
8
|
+
field :created_at, -> { String }, optional: false, nullable: false
|
|
9
|
+
field :updated_at, -> { String }, optional: false, nullable: false
|
|
10
|
+
field :content, -> { String }, optional: false, nullable: false
|
|
11
|
+
field :loan_id, -> { String }, optional: true, nullable: false
|
|
12
|
+
field :installment_id, -> { String }, optional: true, nullable: false
|
|
13
|
+
field :author_first_name, -> { String }, optional: true, nullable: false
|
|
14
|
+
field :author_last_name, -> { String }, optional: true, nullable: false
|
|
15
|
+
field :author_email, -> { String }, optional: true, nullable: false
|
|
16
|
+
end
|
|
17
|
+
end
|
|
18
|
+
end
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module Voltaria
|
|
4
|
+
module Types
|
|
5
|
+
class PaginatedResponseNoteResponse < Internal::Types::Model
|
|
6
|
+
field :items, -> { Internal::Types::Array[Voltaria::Types::NoteResponse] }, 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 PaginatedResponseTaskPartnerResponse < Internal::Types::Model
|
|
6
|
+
field :items, -> { Internal::Types::Array[Voltaria::Types::TaskPartnerResponse] }, 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 PaginatedResponseTaskPartnerStatusHistoryResponse < Internal::Types::Model
|
|
6
|
+
field :items, -> { Internal::Types::Array[Voltaria::Types::TaskPartnerStatusHistoryResponse] }, 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,24 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module Voltaria
|
|
4
|
+
module Types
|
|
5
|
+
# A task shared with your partner account.
|
|
6
|
+
class TaskPartnerResponse < Internal::Types::Model
|
|
7
|
+
field :id, -> { String }, optional: false, nullable: false
|
|
8
|
+
field :title, -> { String }, optional: false, nullable: false
|
|
9
|
+
field :description, -> { String }, optional: true, nullable: false
|
|
10
|
+
field :status, -> { Voltaria::Types::TaskStatusEnum }, optional: false, nullable: false
|
|
11
|
+
field :priority, -> { Voltaria::Types::TaskPriorityEnum }, optional: true, nullable: false
|
|
12
|
+
field :assignee_id, -> { String }, optional: true, nullable: false
|
|
13
|
+
field :due_at, -> { String }, optional: true, nullable: false
|
|
14
|
+
field :completed_at, -> { String }, optional: true, nullable: false
|
|
15
|
+
field :created_at, -> { String }, optional: false, nullable: false
|
|
16
|
+
field :updated_at, -> { String }, optional: false, nullable: false
|
|
17
|
+
field :partner_id, -> { String }, optional: true, nullable: false
|
|
18
|
+
field :client_id, -> { String }, optional: true, nullable: false
|
|
19
|
+
field :loan_id, -> { String }, optional: true, nullable: false
|
|
20
|
+
field :installment_id, -> { String }, optional: true, nullable: false
|
|
21
|
+
field :waterfall_id, -> { String }, optional: true, nullable: false
|
|
22
|
+
end
|
|
23
|
+
end
|
|
24
|
+
end
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module Voltaria
|
|
4
|
+
module Types
|
|
5
|
+
# One status change on a task: when it happened, what it moved from and to, and
|
|
6
|
+
# who made it.
|
|
7
|
+
class TaskPartnerStatusHistoryResponse < Internal::Types::Model
|
|
8
|
+
field :created_at, -> { String }, optional: false, nullable: false
|
|
9
|
+
field :old_status, -> { Voltaria::Types::TaskStatusEnum }, optional: true, nullable: false
|
|
10
|
+
field :new_status, -> { Voltaria::Types::TaskStatusEnum }, optional: false, nullable: false
|
|
11
|
+
field :actor_type, -> { Voltaria::Types::TaskPublicActorTypeEnum }, 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
|
+
module TaskStatusEnum
|
|
6
|
+
extend Voltaria::Internal::Types::Enum
|
|
7
|
+
|
|
8
|
+
ACTIVE = "active"
|
|
9
|
+
IN_PROGRESS = "in_progress"
|
|
10
|
+
BLOCKED = "blocked"
|
|
11
|
+
DONE = "done"
|
|
12
|
+
CANCELLED = "cancelled"
|
|
13
|
+
end
|
|
14
|
+
end
|
|
15
|
+
end
|
data/lib/voltaria/version.rb
CHANGED