Class: WalleeRubySdk::TransactionInvoicesService

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

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(api_client = ApiClient.default) ⇒ TransactionInvoicesService

Returns a new instance of TransactionInvoicesService.



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

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

Instance Attribute Details

#api_clientObject

Returns the value of attribute api_client.



25
26
27
# File 'lib/wallee-ruby-sdk/service/transaction_invoices_service.rb', line 25

def api_client
  @api_client
end

Instance Method Details

#get_payment_transactions_invoices(space, opts = {}) ⇒ InvoiceListResponse

List all transaction invoices

Parameters:

  • space (Integer)

    Specifies the ID of the space the operation should be executed in.

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :after (Integer)

    Set to an object's ID to retrieve the page of objects coming immediately after the named object.

  • :before (Integer)

    Set to an object'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.

Returns:



40
41
42
43
# File 'lib/wallee-ruby-sdk/service/transaction_invoices_service.rb', line 40

def get_payment_transactions_invoices(space, opts = {})
  data, _status_code, _headers = get_payment_transactions_invoices_with_http_info(space, opts)
  data
end

#get_payment_transactions_invoices_id(id, space, opts = {}) ⇒ TransactionInvoice

Retrieve a transaction invoice

Parameters:

  • id (Integer)
  • space (Integer)

    Specifies the ID of the space the operation should be executed in.

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :expand (Array<String>)

Returns:



131
132
133
134
# File 'lib/wallee-ruby-sdk/service/transaction_invoices_service.rb', line 131

def get_payment_transactions_invoices_id(id, space, opts = {})
  data, _status_code, _headers = get_payment_transactions_invoices_id_with_http_info(id, space, opts)
  data
end

#get_payment_transactions_invoices_id_check_replacement_possible(id, space, opts = {}) ⇒ Boolean

Check if a transaction invoice can be replaced

Parameters:

  • id (Integer)
  • space (Integer)

    Specifies the ID of the space the operation should be executed in.

  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:

  • (Boolean)


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

def get_payment_transactions_invoices_id_check_replacement_possible(id, space, opts = {})
  data, _status_code, _headers = get_payment_transactions_invoices_id_check_replacement_possible_with_http_info(id, space, opts)
  data
end

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

Returns Boolean data, response status code and response headers.

Parameters:

  • id (Integer)
  • space (Integer)

    Specifies the ID of the space the operation should be executed in.

  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:

  • (Array<(Boolean, Integer, Hash)>)

    Boolean data, response status code and response headers



213
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
# File 'lib/wallee-ruby-sdk/service/transaction_invoices_service.rb', line 213

def get_payment_transactions_invoices_id_check_replacement_possible_with_http_info(id, space, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: TransactionInvoicesService.get_payment_transactions_invoices_id_check_replacement_possible ...'
  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 TransactionInvoicesService.get_payment_transactions_invoices_id_check_replacement_possible"
  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 TransactionInvoicesService.get_payment_transactions_invoices_id_check_replacement_possible"
  end
  # resource path
  local_var_path = '/payment/transactions/invoices/{id}/check-replacement-possible'.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] || 'Boolean'

  new_options = opts.merge(
    :operation => :"TransactionInvoicesService.get_payment_transactions_invoices_id_check_replacement_possible",
    :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: TransactionInvoicesService#get_payment_transactions_invoices_id_check_replacement_possible\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}\nConnection Timeout: #{connection_timeout}"
  end
  return data, status_code, headers
end

#get_payment_transactions_invoices_id_document(id, space, opts = {}) ⇒ RenderedDocument

Retrieve an invoice document

Parameters:

  • id (Integer)
  • space (Integer)

    Specifies the ID of the space the operation should be executed in.

  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:



271
272
273
274
# File 'lib/wallee-ruby-sdk/service/transaction_invoices_service.rb', line 271

def get_payment_transactions_invoices_id_document(id, space, opts = {})
  data, _status_code, _headers = get_payment_transactions_invoices_id_document_with_http_info(id, space, opts)
  data
end

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

Returns RenderedDocument data, response status code and response headers.

Parameters:

  • id (Integer)
  • space (Integer)

    Specifies the ID of the space the operation should be executed in.

  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:

  • (Array<(RenderedDocument, Integer, Hash)>)

    RenderedDocument data, response status code and response headers



282
283
284
285
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
# File 'lib/wallee-ruby-sdk/service/transaction_invoices_service.rb', line 282

def get_payment_transactions_invoices_id_document_with_http_info(id, space, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: TransactionInvoicesService.get_payment_transactions_invoices_id_document ...'
  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 TransactionInvoicesService.get_payment_transactions_invoices_id_document"
  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 TransactionInvoicesService.get_payment_transactions_invoices_id_document"
  end
  # resource path
  local_var_path = '/payment/transactions/invoices/{id}/document'.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] || 'RenderedDocument'

  new_options = opts.merge(
    :operation => :"TransactionInvoicesService.get_payment_transactions_invoices_id_document",
    :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: TransactionInvoicesService#get_payment_transactions_invoices_id_document\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}\nConnection Timeout: #{connection_timeout}"
  end
  return data, status_code, headers
end

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

Returns TransactionInvoice data, response status code and response headers.

Parameters:

  • id (Integer)
  • space (Integer)

    Specifies the ID of the space the operation should be executed in.

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :expand (Array<String>)

Returns:

  • (Array<(TransactionInvoice, Integer, Hash)>)

    TransactionInvoice data, response status code and response headers



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
194
# File 'lib/wallee-ruby-sdk/service/transaction_invoices_service.rb', line 143

def get_payment_transactions_invoices_id_with_http_info(id, space, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: TransactionInvoicesService.get_payment_transactions_invoices_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 TransactionInvoicesService.get_payment_transactions_invoices_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 TransactionInvoicesService.get_payment_transactions_invoices_id"
  end
  # resource path
  local_var_path = '/payment/transactions/invoices/{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) unless 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] || 'TransactionInvoice'

  new_options = opts.merge(
    :operation => :"TransactionInvoicesService.get_payment_transactions_invoices_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: TransactionInvoicesService#get_payment_transactions_invoices_id\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}\nConnection Timeout: #{connection_timeout}"
  end
  return data, status_code, headers
end

#get_payment_transactions_invoices_search(space, opts = {}) ⇒ InvoiceSearchResponse

Search transaction invoices

Parameters:

  • space (Integer)

    Specifies the ID of the space the operation should be executed in.

  • opts (Hash) (defaults to: {})

    the optional parameters

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.

Returns:



344
345
346
347
# File 'lib/wallee-ruby-sdk/service/transaction_invoices_service.rb', line 344

def get_payment_transactions_invoices_search(space, opts = {})
  data, _status_code, _headers = get_payment_transactions_invoices_search_with_http_info(space, opts)
  data
end

#get_payment_transactions_invoices_search_with_http_info(space, opts = {}) ⇒ Array<(InvoiceSearchResponse, Integer, Hash)>

Returns InvoiceSearchResponse data, response status code and response headers.

Parameters:

  • space (Integer)

    Specifies the ID of the space the operation should be executed in.

  • opts (Hash) (defaults to: {})

    the optional parameters

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.

Returns:

  • (Array<(InvoiceSearchResponse, Integer, Hash)>)

    InvoiceSearchResponse data, response status code and response headers



359
360
361
362
363
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
# File 'lib/wallee-ruby-sdk/service/transaction_invoices_service.rb', line 359

def get_payment_transactions_invoices_search_with_http_info(space, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: TransactionInvoicesService.get_payment_transactions_invoices_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 TransactionInvoicesService.get_payment_transactions_invoices_search"
  end
  if @api_client.config.client_side_validation && !opts[:'limit'].nil? && opts[:'limit'] > 100
    fail ArgumentError, 'invalid value for "opts[:"limit"]" when calling TransactionInvoicesService.get_payment_transactions_invoices_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 TransactionInvoicesService.get_payment_transactions_invoices_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 TransactionInvoicesService.get_payment_transactions_invoices_search, must be smaller than or equal to 10000.'
  end

  # resource path
  local_var_path = '/payment/transactions/invoices/search'

  # query parameters
  query_params = opts[:query_params] || {}
  query_params[:'expand'] = @api_client.build_collection_param(opts[:'expand'], :multi) unless opts[:'expand'].nil?
  query_params[:'limit'] = opts[:'limit'] unless opts[:'limit'].nil?
  query_params[:'offset'] = opts[:'offset'] unless opts[:'offset'].nil?
  query_params[:'order'] = opts[:'order'] unless opts[:'order'].nil?
  query_params[:'query'] = opts[:'query'] unless 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] || 'InvoiceSearchResponse'

  new_options = opts.merge(
    :operation => :"TransactionInvoicesService.get_payment_transactions_invoices_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: TransactionInvoicesService#get_payment_transactions_invoices_search\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}\nConnection Timeout: #{connection_timeout}"
  end
  return data, status_code, headers
end

#get_payment_transactions_invoices_with_http_info(space, opts = {}) ⇒ Array<(InvoiceListResponse, Integer, Hash)>

Returns InvoiceListResponse data, response status code and response headers.

Parameters:

  • space (Integer)

    Specifies the ID of the space the operation should be executed in.

  • opts (Hash) (defaults to: {})

    the optional parameters

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.

Returns:

  • (Array<(InvoiceListResponse, Integer, Hash)>)

    InvoiceListResponse data, response status code and response headers



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
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
# File 'lib/wallee-ruby-sdk/service/transaction_invoices_service.rb', line 55

def get_payment_transactions_invoices_with_http_info(space, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: TransactionInvoicesService.get_payment_transactions_invoices ...'
  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 TransactionInvoicesService.get_payment_transactions_invoices"
  end
  if @api_client.config.client_side_validation && !opts[:'after'].nil? && opts[:'after'] < 1
    fail ArgumentError, 'invalid value for "opts[:"after"]" when calling TransactionInvoicesService.get_payment_transactions_invoices, 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 TransactionInvoicesService.get_payment_transactions_invoices, 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 TransactionInvoicesService.get_payment_transactions_invoices, 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 TransactionInvoicesService.get_payment_transactions_invoices, must be greater than or equal to 1.'
  end

  # resource path
  local_var_path = '/payment/transactions/invoices'

  # query parameters
  query_params = opts[:query_params] || {}
  query_params[:'after'] = opts[:'after'] unless opts[:'after'].nil?
  query_params[:'before'] = opts[:'before'] unless opts[:'before'].nil?
  query_params[:'expand'] = @api_client.build_collection_param(opts[:'expand'], :multi) unless opts[:'expand'].nil?
  query_params[:'limit'] = opts[:'limit'] unless opts[:'limit'].nil?
  query_params[:'order'] = opts[:'order'] unless 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] || 'InvoiceListResponse'

  new_options = opts.merge(
    :operation => :"TransactionInvoicesService.get_payment_transactions_invoices",
    :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: TransactionInvoicesService#get_payment_transactions_invoices\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}\nConnection Timeout: #{connection_timeout}"
  end
  return data, status_code, headers
end

#post_payment_transactions_invoices_id_derecognize(id, space, opts = {}) ⇒ TransactionInvoice

Derecognize a transaction invoice

Parameters:

  • id (Integer)
  • space (Integer)

    Specifies the ID of the space the operation should be executed in.

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :expand (Array<String>)

Returns:



431
432
433
434
# File 'lib/wallee-ruby-sdk/service/transaction_invoices_service.rb', line 431

def post_payment_transactions_invoices_id_derecognize(id, space, opts = {})
  data, _status_code, _headers = post_payment_transactions_invoices_id_derecognize_with_http_info(id, space, opts)
  data
end

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

Returns TransactionInvoice data, response status code and response headers.

Parameters:

  • id (Integer)
  • space (Integer)

    Specifies the ID of the space the operation should be executed in.

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :expand (Array<String>)

Returns:

  • (Array<(TransactionInvoice, Integer, Hash)>)

    TransactionInvoice data, response status code and response headers



443
444
445
446
447
448
449
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
# File 'lib/wallee-ruby-sdk/service/transaction_invoices_service.rb', line 443

def post_payment_transactions_invoices_id_derecognize_with_http_info(id, space, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: TransactionInvoicesService.post_payment_transactions_invoices_id_derecognize ...'
  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 TransactionInvoicesService.post_payment_transactions_invoices_id_derecognize"
  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 TransactionInvoicesService.post_payment_transactions_invoices_id_derecognize"
  end
  # resource path
  local_var_path = '/payment/transactions/invoices/{id}/derecognize'.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) unless 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] || 'TransactionInvoice'

  new_options = opts.merge(
    :operation => :"TransactionInvoicesService.post_payment_transactions_invoices_id_derecognize",
    :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: TransactionInvoicesService#post_payment_transactions_invoices_id_derecognize\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}\nConnection Timeout: #{connection_timeout}"
  end
  return data, status_code, headers
end

#post_payment_transactions_invoices_id_mark_paid(id, space, opts = {}) ⇒ TransactionInvoice

Mark a transaction invoice as paid

Parameters:

  • id (Integer)
  • space (Integer)

    Specifies the ID of the space the operation should be executed in.

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :expand (Array<String>)

Returns:



503
504
505
506
# File 'lib/wallee-ruby-sdk/service/transaction_invoices_service.rb', line 503

def post_payment_transactions_invoices_id_mark_paid(id, space, opts = {})
  data, _status_code, _headers = post_payment_transactions_invoices_id_mark_paid_with_http_info(id, space, opts)
  data
end

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

Returns TransactionInvoice data, response status code and response headers.

Parameters:

  • id (Integer)
  • space (Integer)

    Specifies the ID of the space the operation should be executed in.

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :expand (Array<String>)

Returns:

  • (Array<(TransactionInvoice, Integer, Hash)>)

    TransactionInvoice data, response status code and response headers



515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
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
# File 'lib/wallee-ruby-sdk/service/transaction_invoices_service.rb', line 515

def post_payment_transactions_invoices_id_mark_paid_with_http_info(id, space, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: TransactionInvoicesService.post_payment_transactions_invoices_id_mark_paid ...'
  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 TransactionInvoicesService.post_payment_transactions_invoices_id_mark_paid"
  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 TransactionInvoicesService.post_payment_transactions_invoices_id_mark_paid"
  end
  # resource path
  local_var_path = '/payment/transactions/invoices/{id}/mark-paid'.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) unless 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] || 'TransactionInvoice'

  new_options = opts.merge(
    :operation => :"TransactionInvoicesService.post_payment_transactions_invoices_id_mark_paid",
    :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: TransactionInvoicesService#post_payment_transactions_invoices_id_mark_paid\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}\nConnection Timeout: #{connection_timeout}"
  end
  return data, status_code, headers
end

#post_payment_transactions_invoices_id_replace(id, space, transaction_invoice_replacement, opts = {}) ⇒ TransactionInvoice

Replace a transaction invoice

Parameters:

  • id (Integer)
  • space (Integer)

    Specifies the ID of the space the operation should be executed in.

  • transaction_invoice_replacement (TransactionInvoiceReplacement)
  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :expand (Array<String>)

Returns:



576
577
578
579
# File 'lib/wallee-ruby-sdk/service/transaction_invoices_service.rb', line 576

def post_payment_transactions_invoices_id_replace(id, space, transaction_invoice_replacement, opts = {})
  data, _status_code, _headers = post_payment_transactions_invoices_id_replace_with_http_info(id, space, transaction_invoice_replacement, opts)
  data
end

#post_payment_transactions_invoices_id_replace_with_http_info(id, space, transaction_invoice_replacement, opts = {}) ⇒ Array<(TransactionInvoice, Integer, Hash)>

Returns TransactionInvoice data, response status code and response headers.

Parameters:

  • id (Integer)
  • space (Integer)

    Specifies the ID of the space the operation should be executed in.

  • transaction_invoice_replacement (TransactionInvoiceReplacement)
  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :expand (Array<String>)

Returns:

  • (Array<(TransactionInvoice, Integer, Hash)>)

    TransactionInvoice data, response status code and response headers



589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
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
# File 'lib/wallee-ruby-sdk/service/transaction_invoices_service.rb', line 589

def post_payment_transactions_invoices_id_replace_with_http_info(id, space, transaction_invoice_replacement, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: TransactionInvoicesService.post_payment_transactions_invoices_id_replace ...'
  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 TransactionInvoicesService.post_payment_transactions_invoices_id_replace"
  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 TransactionInvoicesService.post_payment_transactions_invoices_id_replace"
  end
  # verify the required parameter 'transaction_invoice_replacement' is set
  if @api_client.config.client_side_validation && transaction_invoice_replacement.nil?
    fail ArgumentError, "Missing the required parameter 'transaction_invoice_replacement' when calling TransactionInvoicesService.post_payment_transactions_invoices_id_replace"
  end
  # resource path
  local_var_path = '/payment/transactions/invoices/{id}/replace'.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) unless 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'])
  unless 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(transaction_invoice_replacement)

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

  new_options = opts.merge(
    :operation => :"TransactionInvoicesService.post_payment_transactions_invoices_id_replace",
    :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: TransactionInvoicesService#post_payment_transactions_invoices_id_replace\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}\nConnection Timeout: #{connection_timeout}"
  end
  return data, status_code, headers
end