Class: WalleeRubySdk::DebtCollectionCasesService

Inherits:
Object
  • Object
show all
Defined in:
lib/wallee-ruby-sdk/service/debt_collection_cases_service.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(api_client = ApiClient.default) ⇒ DebtCollectionCasesService



30
31
32
# File 'lib/wallee-ruby-sdk/service/debt_collection_cases_service.rb', line 30

def initialize(api_client = ApiClient.default)
  @api_client = api_client
end

Instance Attribute Details

#api_clientObject

Returns the value of attribute api_client.



27
28
29
# File 'lib/wallee-ruby-sdk/service/debt_collection_cases_service.rb', line 27

def api_client
  @api_client
end

Instance Method Details

#delete_debt_collection_cases_id(id, space, opts = {}) ⇒ nil

Delete a debt collection case



38
39
40
41
# File 'lib/wallee-ruby-sdk/service/debt_collection_cases_service.rb', line 38

def delete_debt_collection_cases_id(id, space, opts = {})
  delete_debt_collection_cases_id_with_http_info(id, space, opts)
  nil
end

#delete_debt_collection_cases_id_with_http_info(id, space, opts = {}) ⇒ Array<(nil, Integer, Hash)>



49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
# File 'lib/wallee-ruby-sdk/service/debt_collection_cases_service.rb', line 49

def delete_debt_collection_cases_id_with_http_info(id, space, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: DebtCollectionCasesService.delete_debt_collection_cases_id ...'
  end
  # verify the required parameter 'id' is set
  if @api_client.config.client_side_validation && id.nil?
    fail ArgumentError, "Missing the required parameter 'id' when calling DebtCollectionCasesService.delete_debt_collection_cases_id"
  end
  # verify the required parameter 'space' is set
  if @api_client.config.client_side_validation && space.nil?
    fail ArgumentError, "Missing the required parameter 'space' when calling DebtCollectionCasesService.delete_debt_collection_cases_id"
  end
  # resource path
  local_var_path = '/debt-collection/cases/{id}'.sub('{' + 'id' + '}', CGI.escape(id.to_s))

  # query parameters
  query_params = opts[:query_params] || {}

  # header parameters
  header_params = opts[:header_params] || {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
  header_params[:'Space'] = space

  # form parameters
  form_params = opts[:form_params] || {}

  # connection timeout
  connection_timeout = @api_client.config.timeout

  # http body (model)
  post_body = opts[:debug_body]

  # return_type
  return_type = opts[:debug_return_type]

  new_options = opts.merge(
    :operation => :"DebtCollectionCasesService.delete_debt_collection_cases_id",
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :return_type => return_type
  )

  data, status_code, headers = @api_client.call_api(:DELETE.to_sym.downcase, local_var_path, new_options, connection_timeout)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: DebtCollectionCasesService#delete_debt_collection_cases_id\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}\nConnection Timeout: #{connection_timeout}"
  end
  return data, status_code, headers
end

#get_debt_collection_cases(space, opts = {}) ⇒ DebtCollectionCaseListResponse

List all debt collection cases

Options Hash (opts):

  • :after (Integer)

    Set to an object&#39;s ID to retrieve the page of objects coming immediately after the named object.

  • :before (Integer)

    Set to an object&#39;s ID to retrieve the page of objects coming immediately before the named object.

  • :expand (Array<String>)
  • :limit (Integer)

    A limit on the number of objects to be returned, between 1 and 100. Default is 10.

  • :order (SortingOrder)

    Specify to retrieve objects in chronological (ASC) or reverse chronological (DESC) order.



111
112
113
114
# File 'lib/wallee-ruby-sdk/service/debt_collection_cases_service.rb', line 111

def get_debt_collection_cases(space, opts = {})
  data, _status_code, _headers = get_debt_collection_cases_with_http_info(space, opts)
  data
end

#get_debt_collection_cases_id(id, space, opts = {}) ⇒ DebtCollectionCase

Retrieve a debt collection case

Options Hash (opts):

  • :expand (Array<String>)


202
203
204
205
# File 'lib/wallee-ruby-sdk/service/debt_collection_cases_service.rb', line 202

def get_debt_collection_cases_id(id, space, opts = {})
  data, _status_code, _headers = get_debt_collection_cases_id_with_http_info(id, space, opts)
  data
end

#get_debt_collection_cases_id_documents(id, space, opts = {}) ⇒ DebtCollectionCaseDocumentListResponse

Retrieve all documents of a debt collection case

Options Hash (opts):

  • :expand (Array<String>)


274
275
276
277
# File 'lib/wallee-ruby-sdk/service/debt_collection_cases_service.rb', line 274

def get_debt_collection_cases_id_documents(id, space, opts = {})
  data, _status_code, _headers = get_debt_collection_cases_id_documents_with_http_info(id, space, opts)
  data
end

#get_debt_collection_cases_id_documents_with_http_info(id, space, opts = {}) ⇒ Array<(DebtCollectionCaseDocumentListResponse, Integer, Hash)>

Returns DebtCollectionCaseDocumentListResponse data, response status code and response headers.

Options Hash (opts):

  • :expand (Array<String>)


286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
# File 'lib/wallee-ruby-sdk/service/debt_collection_cases_service.rb', line 286

def get_debt_collection_cases_id_documents_with_http_info(id, space, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: DebtCollectionCasesService.get_debt_collection_cases_id_documents ...'
  end
  # verify the required parameter 'id' is set
  if @api_client.config.client_side_validation && id.nil?
    fail ArgumentError, "Missing the required parameter 'id' when calling DebtCollectionCasesService.get_debt_collection_cases_id_documents"
  end
  # verify the required parameter 'space' is set
  if @api_client.config.client_side_validation && space.nil?
    fail ArgumentError, "Missing the required parameter 'space' when calling DebtCollectionCasesService.get_debt_collection_cases_id_documents"
  end
  # resource path
  local_var_path = '/debt-collection/cases/{id}/documents'.sub('{' + 'id' + '}', CGI.escape(id.to_s))

  # query parameters
  query_params = opts[:query_params] || {}
  query_params[:'expand'] = @api_client.build_collection_param(opts[:'expand'], :multi) if !opts[:'expand'].nil?

  # header parameters
  header_params = opts[:header_params] || {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
  header_params[:'Space'] = space

  # form parameters
  form_params = opts[:form_params] || {}

  # connection timeout
  connection_timeout = @api_client.config.timeout

  # http body (model)
  post_body = opts[:debug_body]

  # return_type
  return_type = opts[:debug_return_type] || 'DebtCollectionCaseDocumentListResponse'

  new_options = opts.merge(
    :operation => :"DebtCollectionCasesService.get_debt_collection_cases_id_documents",
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :return_type => return_type
  )

  data, status_code, headers = @api_client.call_api(:GET.to_sym.downcase, local_var_path, new_options, connection_timeout)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: DebtCollectionCasesService#get_debt_collection_cases_id_documents\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}\nConnection Timeout: #{connection_timeout}"
  end
  return data, status_code, headers
end

#get_debt_collection_cases_id_with_http_info(id, space, opts = {}) ⇒ Array<(DebtCollectionCase, Integer, Hash)>

Returns DebtCollectionCase data, response status code and response headers.

Options Hash (opts):

  • :expand (Array<String>)


214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
# File 'lib/wallee-ruby-sdk/service/debt_collection_cases_service.rb', line 214

def get_debt_collection_cases_id_with_http_info(id, space, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: DebtCollectionCasesService.get_debt_collection_cases_id ...'
  end
  # verify the required parameter 'id' is set
  if @api_client.config.client_side_validation && id.nil?
    fail ArgumentError, "Missing the required parameter 'id' when calling DebtCollectionCasesService.get_debt_collection_cases_id"
  end
  # verify the required parameter 'space' is set
  if @api_client.config.client_side_validation && space.nil?
    fail ArgumentError, "Missing the required parameter 'space' when calling DebtCollectionCasesService.get_debt_collection_cases_id"
  end
  # resource path
  local_var_path = '/debt-collection/cases/{id}'.sub('{' + 'id' + '}', CGI.escape(id.to_s))

  # query parameters
  query_params = opts[:query_params] || {}
  query_params[:'expand'] = @api_client.build_collection_param(opts[:'expand'], :multi) if !opts[:'expand'].nil?

  # header parameters
  header_params = opts[:header_params] || {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
  header_params[:'Space'] = space

  # form parameters
  form_params = opts[:form_params] || {}

  # connection timeout
  connection_timeout = @api_client.config.timeout

  # http body (model)
  post_body = opts[:debug_body]

  # return_type
  return_type = opts[:debug_return_type] || 'DebtCollectionCase'

  new_options = opts.merge(
    :operation => :"DebtCollectionCasesService.get_debt_collection_cases_id",
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :return_type => return_type
  )

  data, status_code, headers = @api_client.call_api(:GET.to_sym.downcase, local_var_path, new_options, connection_timeout)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: DebtCollectionCasesService#get_debt_collection_cases_id\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}\nConnection Timeout: #{connection_timeout}"
  end
  return data, status_code, headers
end

#get_debt_collection_cases_search(space, opts = {}) ⇒ DebtCollectionCaseSearchResponse

Search debt collection cases

Options Hash (opts):

  • :expand (Array<String>)
  • :limit (Integer)

    A limit on the number of objects to be returned, between 1 and 100. Default is 10.

  • :offset (Integer)

    A cursor for pagination, specifies the number of objects to skip.

  • :order (String)

    The fields and order to sort the objects by.

  • :query (String)

    The search query to filter the objects by.



349
350
351
352
# File 'lib/wallee-ruby-sdk/service/debt_collection_cases_service.rb', line 349

def get_debt_collection_cases_search(space, opts = {})
  data, _status_code, _headers = get_debt_collection_cases_search_with_http_info(space, opts)
  data
end

#get_debt_collection_cases_search_with_http_info(space, opts = {}) ⇒ Array<(DebtCollectionCaseSearchResponse, Integer, Hash)>

Returns DebtCollectionCaseSearchResponse data, response status code and response headers.

Options Hash (opts):

  • :expand (Array<String>)
  • :limit (Integer)

    A limit on the number of objects to be returned, between 1 and 100. Default is 10.

  • :offset (Integer)

    A cursor for pagination, specifies the number of objects to skip.

  • :order (String)

    The fields and order to sort the objects by.

  • :query (String)

    The search query to filter the objects by.



364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
# File 'lib/wallee-ruby-sdk/service/debt_collection_cases_service.rb', line 364

def get_debt_collection_cases_search_with_http_info(space, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: DebtCollectionCasesService.get_debt_collection_cases_search ...'
  end
  # verify the required parameter 'space' is set
  if @api_client.config.client_side_validation && space.nil?
    fail ArgumentError, "Missing the required parameter 'space' when calling DebtCollectionCasesService.get_debt_collection_cases_search"
  end
  if @api_client.config.client_side_validation && !opts[:'limit'].nil? && opts[:'limit'] > 100
    fail ArgumentError, 'invalid value for "opts[:"limit"]" when calling DebtCollectionCasesService.get_debt_collection_cases_search, must be smaller than or equal to 100.'
  end

  if @api_client.config.client_side_validation && !opts[:'limit'].nil? && opts[:'limit'] < 1
    fail ArgumentError, 'invalid value for "opts[:"limit"]" when calling DebtCollectionCasesService.get_debt_collection_cases_search, must be greater than or equal to 1.'
  end

  if @api_client.config.client_side_validation && !opts[:'offset'].nil? && opts[:'offset'] > 10000
    fail ArgumentError, 'invalid value for "opts[:"offset"]" when calling DebtCollectionCasesService.get_debt_collection_cases_search, must be smaller than or equal to 10000.'
  end

  # resource path
  local_var_path = '/debt-collection/cases/search'

  # query parameters
  query_params = opts[:query_params] || {}
  query_params[:'expand'] = @api_client.build_collection_param(opts[:'expand'], :multi) if !opts[:'expand'].nil?
  query_params[:'limit'] = opts[:'limit'] if !opts[:'limit'].nil?
  query_params[:'offset'] = opts[:'offset'] if !opts[:'offset'].nil?
  query_params[:'order'] = opts[:'order'] if !opts[:'order'].nil?
  query_params[:'query'] = opts[:'query'] if !opts[:'query'].nil?

  # header parameters
  header_params = opts[:header_params] || {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
  header_params[:'Space'] = space

  # form parameters
  form_params = opts[:form_params] || {}

  # connection timeout
  connection_timeout = @api_client.config.timeout

  # http body (model)
  post_body = opts[:debug_body]

  # return_type
  return_type = opts[:debug_return_type] || 'DebtCollectionCaseSearchResponse'

  new_options = opts.merge(
    :operation => :"DebtCollectionCasesService.get_debt_collection_cases_search",
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :return_type => return_type
  )

  data, status_code, headers = @api_client.call_api(:GET.to_sym.downcase, local_var_path, new_options, connection_timeout)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: DebtCollectionCasesService#get_debt_collection_cases_search\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}\nConnection Timeout: #{connection_timeout}"
  end
  return data, status_code, headers
end

#get_debt_collection_cases_with_http_info(space, opts = {}) ⇒ Array<(DebtCollectionCaseListResponse, Integer, Hash)>

Returns DebtCollectionCaseListResponse data, response status code and response headers.

Options Hash (opts):

  • :after (Integer)

    Set to an object&#39;s ID to retrieve the page of objects coming immediately after the named object.

  • :before (Integer)

    Set to an object&#39;s ID to retrieve the page of objects coming immediately before the named object.

  • :expand (Array<String>)
  • :limit (Integer)

    A limit on the number of objects to be returned, between 1 and 100. Default is 10.

  • :order (SortingOrder)

    Specify to retrieve objects in chronological (ASC) or reverse chronological (DESC) order.



126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
# File 'lib/wallee-ruby-sdk/service/debt_collection_cases_service.rb', line 126

def get_debt_collection_cases_with_http_info(space, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: DebtCollectionCasesService.get_debt_collection_cases ...'
  end
  # verify the required parameter 'space' is set
  if @api_client.config.client_side_validation && space.nil?
    fail ArgumentError, "Missing the required parameter 'space' when calling DebtCollectionCasesService.get_debt_collection_cases"
  end
  if @api_client.config.client_side_validation && !opts[:'after'].nil? && opts[:'after'] < 1
    fail ArgumentError, 'invalid value for "opts[:"after"]" when calling DebtCollectionCasesService.get_debt_collection_cases, must be greater than or equal to 1.'
  end

  if @api_client.config.client_side_validation && !opts[:'before'].nil? && opts[:'before'] < 1
    fail ArgumentError, 'invalid value for "opts[:"before"]" when calling DebtCollectionCasesService.get_debt_collection_cases, must be greater than or equal to 1.'
  end

  if @api_client.config.client_side_validation && !opts[:'limit'].nil? && opts[:'limit'] > 100
    fail ArgumentError, 'invalid value for "opts[:"limit"]" when calling DebtCollectionCasesService.get_debt_collection_cases, must be smaller than or equal to 100.'
  end

  if @api_client.config.client_side_validation && !opts[:'limit'].nil? && opts[:'limit'] < 1
    fail ArgumentError, 'invalid value for "opts[:"limit"]" when calling DebtCollectionCasesService.get_debt_collection_cases, must be greater than or equal to 1.'
  end

  # resource path
  local_var_path = '/debt-collection/cases'

  # query parameters
  query_params = opts[:query_params] || {}
  query_params[:'after'] = opts[:'after'] if !opts[:'after'].nil?
  query_params[:'before'] = opts[:'before'] if !opts[:'before'].nil?
  query_params[:'expand'] = @api_client.build_collection_param(opts[:'expand'], :multi) if !opts[:'expand'].nil?
  query_params[:'limit'] = opts[:'limit'] if !opts[:'limit'].nil?
  query_params[:'order'] = opts[:'order'] if !opts[:'order'].nil?

  # header parameters
  header_params = opts[:header_params] || {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
  header_params[:'Space'] = space

  # form parameters
  form_params = opts[:form_params] || {}

  # connection timeout
  connection_timeout = @api_client.config.timeout

  # http body (model)
  post_body = opts[:debug_body]

  # return_type
  return_type = opts[:debug_return_type] || 'DebtCollectionCaseListResponse'

  new_options = opts.merge(
    :operation => :"DebtCollectionCasesService.get_debt_collection_cases",
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :return_type => return_type
  )

  data, status_code, headers = @api_client.call_api(:GET.to_sym.downcase, local_var_path, new_options, connection_timeout)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: DebtCollectionCasesService#get_debt_collection_cases\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}\nConnection Timeout: #{connection_timeout}"
  end
  return data, status_code, headers
end

#patch_debt_collection_cases_id(id, space, debt_collection_case_update, opts = {}) ⇒ DebtCollectionCase

Update a debt collection case

Options Hash (opts):

  • :expand (Array<String>)


437
438
439
440
# File 'lib/wallee-ruby-sdk/service/debt_collection_cases_service.rb', line 437

def patch_debt_collection_cases_id(id, space, debt_collection_case_update, opts = {})
  data, _status_code, _headers = patch_debt_collection_cases_id_with_http_info(id, space, debt_collection_case_update, opts)
  data
end

#patch_debt_collection_cases_id_with_http_info(id, space, debt_collection_case_update, opts = {}) ⇒ Array<(DebtCollectionCase, Integer, Hash)>

Returns DebtCollectionCase data, response status code and response headers.

Options Hash (opts):

  • :expand (Array<String>)


450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
# File 'lib/wallee-ruby-sdk/service/debt_collection_cases_service.rb', line 450

def patch_debt_collection_cases_id_with_http_info(id, space, debt_collection_case_update, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: DebtCollectionCasesService.patch_debt_collection_cases_id ...'
  end
  # verify the required parameter 'id' is set
  if @api_client.config.client_side_validation && id.nil?
    fail ArgumentError, "Missing the required parameter 'id' when calling DebtCollectionCasesService.patch_debt_collection_cases_id"
  end
  # verify the required parameter 'space' is set
  if @api_client.config.client_side_validation && space.nil?
    fail ArgumentError, "Missing the required parameter 'space' when calling DebtCollectionCasesService.patch_debt_collection_cases_id"
  end
  # verify the required parameter 'debt_collection_case_update' is set
  if @api_client.config.client_side_validation && debt_collection_case_update.nil?
    fail ArgumentError, "Missing the required parameter 'debt_collection_case_update' when calling DebtCollectionCasesService.patch_debt_collection_cases_id"
  end
  # resource path
  local_var_path = '/debt-collection/cases/{id}'.sub('{' + 'id' + '}', CGI.escape(id.to_s))

  # query parameters
  query_params = opts[:query_params] || {}
  query_params[:'expand'] = @api_client.build_collection_param(opts[:'expand'], :multi) if !opts[:'expand'].nil?

  # header parameters
  header_params = opts[:header_params] || {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
  # HTTP header 'Content-Type'
  content_type = @api_client.select_header_content_type(['application/json'])
  if !content_type.nil?
      header_params['Content-Type'] = content_type
  end
  header_params[:'Space'] = space

  # form parameters
  form_params = opts[:form_params] || {}

  # connection timeout
  connection_timeout = @api_client.config.timeout

  # http body (model)
  post_body = opts[:debug_body] || @api_client.object_to_http_body(debt_collection_case_update)

  # return_type
  return_type = opts[:debug_return_type] || 'DebtCollectionCase'

  new_options = opts.merge(
    :operation => :"DebtCollectionCasesService.patch_debt_collection_cases_id",
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :return_type => return_type
  )

  data, status_code, headers = @api_client.call_api(:PATCH.to_sym.downcase, local_var_path, new_options, connection_timeout)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: DebtCollectionCasesService#patch_debt_collection_cases_id\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}\nConnection Timeout: #{connection_timeout}"
  end
  return data, status_code, headers
end

#post_debt_collection_cases(space, debt_collection_case_create, opts = {}) ⇒ DebtCollectionCase

Create a debt collection case

Options Hash (opts):

  • :expand (Array<String>)


519
520
521
522
# File 'lib/wallee-ruby-sdk/service/debt_collection_cases_service.rb', line 519

def post_debt_collection_cases(space, debt_collection_case_create, opts = {})
  data, _status_code, _headers = post_debt_collection_cases_with_http_info(space, debt_collection_case_create, opts)
  data
end

#post_debt_collection_cases_id_close(id, space, opts = {}) ⇒ DebtCollectionCase

Close a debt collection case

Options Hash (opts):

  • :expand (Array<String>)


596
597
598
599
# File 'lib/wallee-ruby-sdk/service/debt_collection_cases_service.rb', line 596

def post_debt_collection_cases_id_close(id, space, opts = {})
  data, _status_code, _headers = post_debt_collection_cases_id_close_with_http_info(id, space, opts)
  data
end

#post_debt_collection_cases_id_close_with_http_info(id, space, opts = {}) ⇒ Array<(DebtCollectionCase, Integer, Hash)>

Returns DebtCollectionCase data, response status code and response headers.

Options Hash (opts):

  • :expand (Array<String>)


608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
# File 'lib/wallee-ruby-sdk/service/debt_collection_cases_service.rb', line 608

def post_debt_collection_cases_id_close_with_http_info(id, space, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: DebtCollectionCasesService.post_debt_collection_cases_id_close ...'
  end
  # verify the required parameter 'id' is set
  if @api_client.config.client_side_validation && id.nil?
    fail ArgumentError, "Missing the required parameter 'id' when calling DebtCollectionCasesService.post_debt_collection_cases_id_close"
  end
  # verify the required parameter 'space' is set
  if @api_client.config.client_side_validation && space.nil?
    fail ArgumentError, "Missing the required parameter 'space' when calling DebtCollectionCasesService.post_debt_collection_cases_id_close"
  end
  # resource path
  local_var_path = '/debt-collection/cases/{id}/close'.sub('{' + 'id' + '}', CGI.escape(id.to_s))

  # query parameters
  query_params = opts[:query_params] || {}
  query_params[:'expand'] = @api_client.build_collection_param(opts[:'expand'], :multi) if !opts[:'expand'].nil?

  # header parameters
  header_params = opts[:header_params] || {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
  header_params[:'Space'] = space

  # form parameters
  form_params = opts[:form_params] || {}

  # connection timeout
  connection_timeout = @api_client.config.timeout

  # http body (model)
  post_body = opts[:debug_body]

  # return_type
  return_type = opts[:debug_return_type] || 'DebtCollectionCase'

  new_options = opts.merge(
    :operation => :"DebtCollectionCasesService.post_debt_collection_cases_id_close",
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :return_type => return_type
  )

  data, status_code, headers = @api_client.call_api(:POST.to_sym.downcase, local_var_path, new_options, connection_timeout)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: DebtCollectionCasesService#post_debt_collection_cases_id_close\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}\nConnection Timeout: #{connection_timeout}"
  end
  return data, status_code, headers
end

#post_debt_collection_cases_id_documents(id, file_name, content, space, opts = {}) ⇒ DebtCollectionCaseDocument

Attach a document to a debt collection case

Options Hash (opts):

  • :expand (Array<String>)


670
671
672
673
# File 'lib/wallee-ruby-sdk/service/debt_collection_cases_service.rb', line 670

def post_debt_collection_cases_id_documents(id, file_name, content, space, opts = {})
  data, _status_code, _headers = post_debt_collection_cases_id_documents_with_http_info(id, file_name, content, space, opts)
  data
end

#post_debt_collection_cases_id_documents_with_http_info(id, file_name, content, space, opts = {}) ⇒ Array<(DebtCollectionCaseDocument, Integer, Hash)>

Returns DebtCollectionCaseDocument data, response status code and response headers.

Options Hash (opts):

  • :expand (Array<String>)


684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
# File 'lib/wallee-ruby-sdk/service/debt_collection_cases_service.rb', line 684

def post_debt_collection_cases_id_documents_with_http_info(id, file_name, content, space, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: DebtCollectionCasesService.post_debt_collection_cases_id_documents ...'
  end
  # verify the required parameter 'id' is set
  if @api_client.config.client_side_validation && id.nil?
    fail ArgumentError, "Missing the required parameter 'id' when calling DebtCollectionCasesService.post_debt_collection_cases_id_documents"
  end
  # verify the required parameter 'file_name' is set
  if @api_client.config.client_side_validation && file_name.nil?
    fail ArgumentError, "Missing the required parameter 'file_name' when calling DebtCollectionCasesService.post_debt_collection_cases_id_documents"
  end
  # verify the required parameter 'content' is set
  if @api_client.config.client_side_validation && content.nil?
    fail ArgumentError, "Missing the required parameter 'content' when calling DebtCollectionCasesService.post_debt_collection_cases_id_documents"
  end
  # verify the required parameter 'space' is set
  if @api_client.config.client_side_validation && space.nil?
    fail ArgumentError, "Missing the required parameter 'space' when calling DebtCollectionCasesService.post_debt_collection_cases_id_documents"
  end
  # resource path
  local_var_path = '/debt-collection/cases/{id}/documents'.sub('{' + 'id' + '}', CGI.escape(id.to_s))

  # query parameters
  query_params = opts[:query_params] || {}
  query_params[:'fileName'] = file_name
  query_params[:'content'] = content
  query_params[:'expand'] = @api_client.build_collection_param(opts[:'expand'], :multi) if !opts[:'expand'].nil?

  # header parameters
  header_params = opts[:header_params] || {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
  header_params[:'Space'] = space

  # form parameters
  form_params = opts[:form_params] || {}

  # connection timeout
  connection_timeout = @api_client.config.timeout

  # http body (model)
  post_body = opts[:debug_body]

  # return_type
  return_type = opts[:debug_return_type] || 'DebtCollectionCaseDocument'

  new_options = opts.merge(
    :operation => :"DebtCollectionCasesService.post_debt_collection_cases_id_documents",
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :return_type => return_type
  )

  data, status_code, headers = @api_client.call_api(:POST.to_sym.downcase, local_var_path, new_options, connection_timeout)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: DebtCollectionCasesService#post_debt_collection_cases_id_documents\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}\nConnection Timeout: #{connection_timeout}"
  end
  return data, status_code, headers
end

#post_debt_collection_cases_id_mark_prepared(id, space, opts = {}) ⇒ DebtCollectionCase

Mark a debt collection case as prepared

Options Hash (opts):

  • :expand (Array<String>)


754
755
756
757
# File 'lib/wallee-ruby-sdk/service/debt_collection_cases_service.rb', line 754

def post_debt_collection_cases_id_mark_prepared(id, space, opts = {})
  data, _status_code, _headers = post_debt_collection_cases_id_mark_prepared_with_http_info(id, space, opts)
  data
end

#post_debt_collection_cases_id_mark_prepared_with_http_info(id, space, opts = {}) ⇒ Array<(DebtCollectionCase, Integer, Hash)>

Returns DebtCollectionCase data, response status code and response headers.

Options Hash (opts):

  • :expand (Array<String>)


766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
# File 'lib/wallee-ruby-sdk/service/debt_collection_cases_service.rb', line 766

def post_debt_collection_cases_id_mark_prepared_with_http_info(id, space, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: DebtCollectionCasesService.post_debt_collection_cases_id_mark_prepared ...'
  end
  # verify the required parameter 'id' is set
  if @api_client.config.client_side_validation && id.nil?
    fail ArgumentError, "Missing the required parameter 'id' when calling DebtCollectionCasesService.post_debt_collection_cases_id_mark_prepared"
  end
  # verify the required parameter 'space' is set
  if @api_client.config.client_side_validation && space.nil?
    fail ArgumentError, "Missing the required parameter 'space' when calling DebtCollectionCasesService.post_debt_collection_cases_id_mark_prepared"
  end
  # resource path
  local_var_path = '/debt-collection/cases/{id}/mark-prepared'.sub('{' + 'id' + '}', CGI.escape(id.to_s))

  # query parameters
  query_params = opts[:query_params] || {}
  query_params[:'expand'] = @api_client.build_collection_param(opts[:'expand'], :multi) if !opts[:'expand'].nil?

  # header parameters
  header_params = opts[:header_params] || {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
  header_params[:'Space'] = space

  # form parameters
  form_params = opts[:form_params] || {}

  # connection timeout
  connection_timeout = @api_client.config.timeout

  # http body (model)
  post_body = opts[:debug_body]

  # return_type
  return_type = opts[:debug_return_type] || 'DebtCollectionCase'

  new_options = opts.merge(
    :operation => :"DebtCollectionCasesService.post_debt_collection_cases_id_mark_prepared",
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :return_type => return_type
  )

  data, status_code, headers = @api_client.call_api(:POST.to_sym.downcase, local_var_path, new_options, connection_timeout)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: DebtCollectionCasesService#post_debt_collection_cases_id_mark_prepared\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}\nConnection Timeout: #{connection_timeout}"
  end
  return data, status_code, headers
end

#post_debt_collection_cases_id_mark_reviewed(id, space, opts = {}) ⇒ DebtCollectionCase

Mark a debt collection case as reviewed

Options Hash (opts):

  • :expand (Array<String>)


826
827
828
829
# File 'lib/wallee-ruby-sdk/service/debt_collection_cases_service.rb', line 826

def post_debt_collection_cases_id_mark_reviewed(id, space, opts = {})
  data, _status_code, _headers = post_debt_collection_cases_id_mark_reviewed_with_http_info(id, space, opts)
  data
end

#post_debt_collection_cases_id_mark_reviewed_with_http_info(id, space, opts = {}) ⇒ Array<(DebtCollectionCase, Integer, Hash)>

Returns DebtCollectionCase data, response status code and response headers.

Options Hash (opts):

  • :expand (Array<String>)


838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
# File 'lib/wallee-ruby-sdk/service/debt_collection_cases_service.rb', line 838

def post_debt_collection_cases_id_mark_reviewed_with_http_info(id, space, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: DebtCollectionCasesService.post_debt_collection_cases_id_mark_reviewed ...'
  end
  # verify the required parameter 'id' is set
  if @api_client.config.client_side_validation && id.nil?
    fail ArgumentError, "Missing the required parameter 'id' when calling DebtCollectionCasesService.post_debt_collection_cases_id_mark_reviewed"
  end
  # verify the required parameter 'space' is set
  if @api_client.config.client_side_validation && space.nil?
    fail ArgumentError, "Missing the required parameter 'space' when calling DebtCollectionCasesService.post_debt_collection_cases_id_mark_reviewed"
  end
  # resource path
  local_var_path = '/debt-collection/cases/{id}/mark-reviewed'.sub('{' + 'id' + '}', CGI.escape(id.to_s))

  # query parameters
  query_params = opts[:query_params] || {}
  query_params[:'expand'] = @api_client.build_collection_param(opts[:'expand'], :multi) if !opts[:'expand'].nil?

  # header parameters
  header_params = opts[:header_params] || {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
  header_params[:'Space'] = space

  # form parameters
  form_params = opts[:form_params] || {}

  # connection timeout
  connection_timeout = @api_client.config.timeout

  # http body (model)
  post_body = opts[:debug_body]

  # return_type
  return_type = opts[:debug_return_type] || 'DebtCollectionCase'

  new_options = opts.merge(
    :operation => :"DebtCollectionCasesService.post_debt_collection_cases_id_mark_reviewed",
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :return_type => return_type
  )

  data, status_code, headers = @api_client.call_api(:POST.to_sym.downcase, local_var_path, new_options, connection_timeout)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: DebtCollectionCasesService#post_debt_collection_cases_id_mark_reviewed\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}\nConnection Timeout: #{connection_timeout}"
  end
  return data, status_code, headers
end

#post_debt_collection_cases_id_payment_receipts(id, collected_amount, external_id, space, opts = {}) ⇒ DebtCollectionReceipt

Create a payment receipt for a debt collection case

Options Hash (opts):

  • :expand (Array<String>)


900
901
902
903
# File 'lib/wallee-ruby-sdk/service/debt_collection_cases_service.rb', line 900

def post_debt_collection_cases_id_payment_receipts(id, collected_amount, external_id, space, opts = {})
  data, _status_code, _headers = post_debt_collection_cases_id_payment_receipts_with_http_info(id, collected_amount, external_id, space, opts)
  data
end

#post_debt_collection_cases_id_payment_receipts_with_http_info(id, collected_amount, external_id, space, opts = {}) ⇒ Array<(DebtCollectionReceipt, Integer, Hash)>

Returns DebtCollectionReceipt data, response status code and response headers.

Options Hash (opts):

  • :expand (Array<String>)


914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
# File 'lib/wallee-ruby-sdk/service/debt_collection_cases_service.rb', line 914

def post_debt_collection_cases_id_payment_receipts_with_http_info(id, collected_amount, external_id, space, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: DebtCollectionCasesService.post_debt_collection_cases_id_payment_receipts ...'
  end
  # verify the required parameter 'id' is set
  if @api_client.config.client_side_validation && id.nil?
    fail ArgumentError, "Missing the required parameter 'id' when calling DebtCollectionCasesService.post_debt_collection_cases_id_payment_receipts"
  end
  # verify the required parameter 'collected_amount' is set
  if @api_client.config.client_side_validation && collected_amount.nil?
    fail ArgumentError, "Missing the required parameter 'collected_amount' when calling DebtCollectionCasesService.post_debt_collection_cases_id_payment_receipts"
  end
  # verify the required parameter 'external_id' is set
  if @api_client.config.client_side_validation && external_id.nil?
    fail ArgumentError, "Missing the required parameter 'external_id' when calling DebtCollectionCasesService.post_debt_collection_cases_id_payment_receipts"
  end
  # verify the required parameter 'space' is set
  if @api_client.config.client_side_validation && space.nil?
    fail ArgumentError, "Missing the required parameter 'space' when calling DebtCollectionCasesService.post_debt_collection_cases_id_payment_receipts"
  end
  # resource path
  local_var_path = '/debt-collection/cases/{id}/payment-receipts'.sub('{' + 'id' + '}', CGI.escape(id.to_s))

  # query parameters
  query_params = opts[:query_params] || {}
  query_params[:'collectedAmount'] = collected_amount
  query_params[:'externalId'] = external_id
  query_params[:'expand'] = @api_client.build_collection_param(opts[:'expand'], :multi) if !opts[:'expand'].nil?

  # header parameters
  header_params = opts[:header_params] || {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
  header_params[:'Space'] = space

  # form parameters
  form_params = opts[:form_params] || {}

  # connection timeout
  connection_timeout = @api_client.config.timeout

  # http body (model)
  post_body = opts[:debug_body]

  # return_type
  return_type = opts[:debug_return_type] || 'DebtCollectionReceipt'

  new_options = opts.merge(
    :operation => :"DebtCollectionCasesService.post_debt_collection_cases_id_payment_receipts",
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :return_type => return_type
  )

  data, status_code, headers = @api_client.call_api(:POST.to_sym.downcase, local_var_path, new_options, connection_timeout)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: DebtCollectionCasesService#post_debt_collection_cases_id_payment_receipts\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}\nConnection Timeout: #{connection_timeout}"
  end
  return data, status_code, headers
end

#post_debt_collection_cases_with_http_info(space, debt_collection_case_create, opts = {}) ⇒ Array<(DebtCollectionCase, Integer, Hash)>

Returns DebtCollectionCase data, response status code and response headers.

Options Hash (opts):

  • :expand (Array<String>)


531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
# File 'lib/wallee-ruby-sdk/service/debt_collection_cases_service.rb', line 531

def post_debt_collection_cases_with_http_info(space, debt_collection_case_create, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: DebtCollectionCasesService.post_debt_collection_cases ...'
  end
  # verify the required parameter 'space' is set
  if @api_client.config.client_side_validation && space.nil?
    fail ArgumentError, "Missing the required parameter 'space' when calling DebtCollectionCasesService.post_debt_collection_cases"
  end
  # verify the required parameter 'debt_collection_case_create' is set
  if @api_client.config.client_side_validation && debt_collection_case_create.nil?
    fail ArgumentError, "Missing the required parameter 'debt_collection_case_create' when calling DebtCollectionCasesService.post_debt_collection_cases"
  end
  # resource path
  local_var_path = '/debt-collection/cases'

  # query parameters
  query_params = opts[:query_params] || {}
  query_params[:'expand'] = @api_client.build_collection_param(opts[:'expand'], :multi) if !opts[:'expand'].nil?

  # header parameters
  header_params = opts[:header_params] || {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
  # HTTP header 'Content-Type'
  content_type = @api_client.select_header_content_type(['application/json'])
  if !content_type.nil?
      header_params['Content-Type'] = content_type
  end
  header_params[:'Space'] = space

  # form parameters
  form_params = opts[:form_params] || {}

  # connection timeout
  connection_timeout = @api_client.config.timeout

  # http body (model)
  post_body = opts[:debug_body] || @api_client.object_to_http_body(debt_collection_case_create)

  # return_type
  return_type = opts[:debug_return_type] || 'DebtCollectionCase'

  new_options = opts.merge(
    :operation => :"DebtCollectionCasesService.post_debt_collection_cases",
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :return_type => return_type
  )

  data, status_code, headers = @api_client.call_api(:POST.to_sym.downcase, local_var_path, new_options, connection_timeout)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: DebtCollectionCasesService#post_debt_collection_cases\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}\nConnection Timeout: #{connection_timeout}"
  end
  return data, status_code, headers
end