cybersource_rest_client 0.0.40 → 0.0.41

Sign up to get free protection for your applications and to get access to all the features.
Files changed (66) hide show
  1. checksums.yaml +4 -4
  2. data/lib/AuthenticationSDK/logging/sensitive_logging.rb +7 -4
  3. data/lib/cybersource_rest_client/api/asymmetric_key_management_api.rb +223 -219
  4. data/lib/cybersource_rest_client/api/chargeback_details_api.rb +116 -112
  5. data/lib/cybersource_rest_client/api/chargeback_summaries_api.rb +116 -112
  6. data/lib/cybersource_rest_client/api/conversion_details_api.rb +5 -1
  7. data/lib/cybersource_rest_client/api/customer_api.rb +368 -360
  8. data/lib/cybersource_rest_client/api/customer_payment_instrument_api.rb +530 -518
  9. data/lib/cybersource_rest_client/api/customer_shipping_address_api.rb +530 -518
  10. data/lib/cybersource_rest_client/api/download_dtd_api.rb +92 -88
  11. data/lib/cybersource_rest_client/api/download_xsd_api.rb +92 -88
  12. data/lib/cybersource_rest_client/api/instrument_identifier_api.rb +15 -3
  13. data/lib/cybersource_rest_client/api/interchange_clearing_level_details_api.rb +116 -112
  14. data/lib/cybersource_rest_client/api/invoice_settings_api.rb +152 -148
  15. data/lib/cybersource_rest_client/api/invoices_api.rb +447 -431
  16. data/lib/cybersource_rest_client/api/net_fundings_api.rb +5 -1
  17. data/lib/cybersource_rest_client/api/notification_of_changes_api.rb +5 -1
  18. data/lib/cybersource_rest_client/api/payer_authentication_api.rb +219 -219
  19. data/lib/cybersource_rest_client/api/payment_batch_summaries_api.rb +133 -129
  20. data/lib/cybersource_rest_client/api/payment_instrument_api.rb +10 -2
  21. data/lib/cybersource_rest_client/api/purchase_and_refund_details_api.rb +5 -1
  22. data/lib/cybersource_rest_client/api/report_definitions_api.rb +10 -2
  23. data/lib/cybersource_rest_client/api/report_downloads_api.rb +5 -1
  24. data/lib/cybersource_rest_client/api/report_subscriptions_api.rb +15 -3
  25. data/lib/cybersource_rest_client/api/reports_api.rb +10 -2
  26. data/lib/cybersource_rest_client/api/retrieval_details_api.rb +116 -112
  27. data/lib/cybersource_rest_client/api/retrieval_summaries_api.rb +116 -112
  28. data/lib/cybersource_rest_client/api/search_transactions_api.rb +5 -1
  29. data/lib/cybersource_rest_client/api/secure_file_share_api.rb +206 -198
  30. data/lib/cybersource_rest_client/api/symmetric_key_management_api.rb +5 -1
  31. data/lib/cybersource_rest_client/api/taxes_api.rb +160 -160
  32. data/lib/cybersource_rest_client/api/tokenization_api.rb +89 -89
  33. data/lib/cybersource_rest_client/api/transaction_batches_api.rb +15 -3
  34. data/lib/cybersource_rest_client/api/transaction_details_api.rb +5 -1
  35. data/lib/cybersource_rest_client/api/user_management_api.rb +5 -1
  36. data/lib/cybersource_rest_client/api/user_management_search_api.rb +89 -89
  37. data/lib/cybersource_rest_client/api/verification_api.rb +154 -154
  38. data/lib/cybersource_rest_client/models/pts_v2_payments_post201_response_payment_account_information_card.rb +20 -4
  39. data/lib/cybersource_rest_client/models/pts_v2_payments_post201_response_processor_information_merchant_advice.rb +20 -4
  40. data/lib/cybersource_rest_client/models/ptsv2payments_merchant_information_merchant_descriptor.rb +20 -4
  41. data/lib/cybersource_rest_client/models/ptsv2payments_order_information.rb +11 -1
  42. data/lib/cybersource_rest_client/models/ptsv2payments_order_information_invoice_details.rb +20 -4
  43. data/lib/cybersource_rest_client/models/ptsv2payments_payment_information_tokenized_card.rb +1 -1
  44. data/lib/cybersource_rest_client/models/ptsv2payments_point_of_sale_information.rb +20 -4
  45. data/lib/cybersource_rest_client/models/ptsv2payments_point_of_sale_information_emv.rb +21 -7
  46. data/lib/cybersource_rest_client/models/ptsv2payments_processing_information_authorization_options.rb +17 -1
  47. data/lib/cybersource_rest_client/models/ptsv2payments_processor_information.rb +13 -4
  48. data/lib/cybersource_rest_client/models/ptsv2payments_processor_information_authorization_options.rb +190 -0
  49. data/lib/cybersource_rest_client/models/ptsv2paymentsidcaptures_point_of_sale_information_emv.rb +0 -2
  50. data/lib/cybersource_rest_client/models/ptsv2paymentsidvoids_order_information.rb +183 -0
  51. data/lib/cybersource_rest_client/models/ptsv2payouts_order_information.rb +14 -4
  52. data/lib/cybersource_rest_client/models/ptsv2payouts_processing_information.rb +13 -4
  53. data/lib/cybersource_rest_client/models/ptsv2payouts_processing_information_funding_options.rb +183 -0
  54. data/lib/cybersource_rest_client/models/ptsv2payouts_processing_information_funding_options_initiator.rb +190 -0
  55. data/lib/cybersource_rest_client/models/ptsv2payouts_sender_information.rb +52 -4
  56. data/lib/cybersource_rest_client/models/riskv1authenticationresults_payment_information_tokenized_card.rb +1 -1
  57. data/lib/cybersource_rest_client/models/riskv1authentications_payment_information_tokenized_card.rb +1 -1
  58. data/lib/cybersource_rest_client/models/riskv1authenticationsetups_payment_information_tokenized_card.rb +1 -1
  59. data/lib/cybersource_rest_client/models/riskv1decisions_payment_information_tokenized_card.rb +1 -1
  60. data/lib/cybersource_rest_client/models/tss_v2_transactions_get200_response_order_information_amount_details.rb +1 -1
  61. data/lib/cybersource_rest_client/models/void_capture_request.rb +13 -4
  62. data/lib/cybersource_rest_client/models/void_credit_request.rb +13 -4
  63. data/lib/cybersource_rest_client/models/void_payment_request.rb +13 -4
  64. data/lib/cybersource_rest_client/models/void_refund_request.rb +13 -4
  65. data/lib/cybersource_rest_client.rb +4 -0
  66. metadata +7 -3
@@ -1,431 +1,447 @@
1
- =begin
2
- #CyberSource Merged Spec
3
-
4
- #All CyberSource API specs merged together. These are available at https://developer.cybersource.com/api/reference/api-reference.html
5
-
6
- OpenAPI spec version: 0.0.1
7
-
8
- Generated by: https://github.com/swagger-api/swagger-codegen.git
9
- Swagger Codegen version: 2.2.3
10
-
11
- =end
12
-
13
- require 'uri'
14
-
15
- module CyberSource
16
- class InvoicesApi
17
- attr_accessor :api_client
18
-
19
- def initialize(api_client = ApiClient.default, config)
20
- @api_client = api_client
21
- @api_client.set_configuration(config)
22
- end
23
- # Create a New Invoice
24
- # Create a new invoice.
25
- # @param create_invoice_request
26
- # @param [Hash] opts the optional parameters
27
- # @return [InvoicingV2InvoicesPost201Response]
28
- def create_invoice(create_invoice_request, opts = {})
29
- data, status_code, headers = create_invoice_with_http_info(create_invoice_request, opts)
30
- return data, status_code, headers
31
- end
32
-
33
- # Create a New Invoice
34
- # Create a new invoice.
35
- # @param create_invoice_request
36
- # @param [Hash] opts the optional parameters
37
- # @return [Array<(InvoicingV2InvoicesPost201Response, Fixnum, Hash)>] InvoicingV2InvoicesPost201Response data, response status code and response headers
38
- def create_invoice_with_http_info(create_invoice_request, opts = {})
39
-
40
- if @api_client.config.debugging
41
- begin
42
- raise
43
- @api_client.config.logger.debug 'Calling API: InvoicesApi.create_invoice ...'
44
- rescue
45
- puts 'Cannot write to log'
46
- end
47
- end
48
- # verify the required parameter 'create_invoice_request' is set
49
- if @api_client.config.client_side_validation && create_invoice_request.nil?
50
- fail ArgumentError, "Missing the required parameter 'create_invoice_request' when calling InvoicesApi.create_invoice"
51
- end
52
- # resource path
53
- local_var_path = 'invoicing/v2/invoices'
54
-
55
- # query parameters
56
- query_params = {}
57
-
58
- # header parameters
59
- header_params = {}
60
- # HTTP header 'Accept' (if needed)
61
- header_params['Accept'] = @api_client.select_header_accept(['application/json;charset=utf-8'])
62
- # HTTP header 'Content-Type'
63
- header_params['Content-Type'] = @api_client.select_header_content_type(['application/json;charset=utf-8'])
64
-
65
- # form parameters
66
- form_params = {}
67
-
68
- # http body (model)
69
- post_body = @api_client.object_to_http_body(create_invoice_request)
70
- auth_names = []
71
- data, status_code, headers = @api_client.call_api(:POST, local_var_path,
72
- :header_params => header_params,
73
- :query_params => query_params,
74
- :form_params => form_params,
75
- :body => post_body,
76
- :auth_names => auth_names,
77
- :return_type => 'InvoicingV2InvoicesPost201Response')
78
- if @api_client.config.debugging
79
- begin
80
- raise
81
- @api_client.config.logger.debug "API called: InvoicesApi#create_invoice\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
82
- rescue
83
- puts 'Cannot write to log'
84
- end
85
- end
86
- return data, status_code, headers
87
- end
88
- # Get a List of Invoices
89
- # Get a list of invoices.
90
- # @param offset Page offset number.
91
- # @param limit Maximum number of items you would like returned.
92
- # @param [Hash] opts the optional parameters
93
- # @option opts [String] :status The status of the invoice. Possible values: - DRAFT - CREATED - SENT - PARTIAL - PAID - CANCELED
94
- # @return [InvoicingV2InvoicesAllGet200Response]
95
- def get_all_invoices(offset, limit, opts = {})
96
- data, status_code, headers = get_all_invoices_with_http_info(offset, limit, opts)
97
- return data, status_code, headers
98
- end
99
-
100
- # Get a List of Invoices
101
- # Get a list of invoices.
102
- # @param offset Page offset number.
103
- # @param limit Maximum number of items you would like returned.
104
- # @param [Hash] opts the optional parameters
105
- # @option opts [String] :status The status of the invoice. Possible values: - DRAFT - CREATED - SENT - PARTIAL - PAID - CANCELED
106
- # @return [Array<(InvoicingV2InvoicesAllGet200Response, Fixnum, Hash)>] InvoicingV2InvoicesAllGet200Response data, response status code and response headers
107
- def get_all_invoices_with_http_info(offset, limit, opts = {})
108
-
109
- if @api_client.config.debugging
110
- begin
111
- raise
112
- @api_client.config.logger.debug 'Calling API: InvoicesApi.get_all_invoices ...'
113
- rescue
114
- puts 'Cannot write to log'
115
- end
116
- end
117
- # verify the required parameter 'offset' is set
118
- if @api_client.config.client_side_validation && offset.nil?
119
- fail ArgumentError, "Missing the required parameter 'offset' when calling InvoicesApi.get_all_invoices"
120
- end
121
- # verify the required parameter 'limit' is set
122
- if @api_client.config.client_side_validation && limit.nil?
123
- fail ArgumentError, "Missing the required parameter 'limit' when calling InvoicesApi.get_all_invoices"
124
- end
125
- # resource path
126
- local_var_path = 'invoicing/v2/invoices'
127
-
128
- # query parameters
129
- query_params = {}
130
- query_params[:'offset'] = offset
131
- query_params[:'limit'] = limit
132
- query_params[:'status'] = opts[:'status'] if !opts[:'status'].nil?
133
-
134
- # header parameters
135
- header_params = {}
136
- # HTTP header 'Accept' (if needed)
137
- header_params['Accept'] = @api_client.select_header_accept(['application/json;charset=utf-8'])
138
- # HTTP header 'Content-Type'
139
- header_params['Content-Type'] = @api_client.select_header_content_type(['application/json;charset=utf-8'])
140
-
141
- # form parameters
142
- form_params = {}
143
-
144
- # http body (model)
145
- post_body = nil
146
- auth_names = []
147
- data, status_code, headers = @api_client.call_api(:GET, local_var_path,
148
- :header_params => header_params,
149
- :query_params => query_params,
150
- :form_params => form_params,
151
- :body => post_body,
152
- :auth_names => auth_names,
153
- :return_type => 'InvoicingV2InvoicesAllGet200Response')
154
- if @api_client.config.debugging
155
- begin
156
- raise
157
- @api_client.config.logger.debug "API called: InvoicesApi#get_all_invoices\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
158
- rescue
159
- puts 'Cannot write to log'
160
- end
161
- end
162
- return data, status_code, headers
163
- end
164
- # Get Invoice Details
165
- # Get the details of a specific invoice.
166
- # @param id The invoice number.
167
- # @param [Hash] opts the optional parameters
168
- # @return [InvoicingV2InvoicesGet200Response]
169
- def get_invoice(id, opts = {})
170
- data, status_code, headers = get_invoice_with_http_info(id, opts)
171
- return data, status_code, headers
172
- end
173
-
174
- # Get Invoice Details
175
- # Get the details of a specific invoice.
176
- # @param id The invoice number.
177
- # @param [Hash] opts the optional parameters
178
- # @return [Array<(InvoicingV2InvoicesGet200Response, Fixnum, Hash)>] InvoicingV2InvoicesGet200Response data, response status code and response headers
179
- def get_invoice_with_http_info(id, opts = {})
180
-
181
- if @api_client.config.debugging
182
- begin
183
- raise
184
- @api_client.config.logger.debug 'Calling API: InvoicesApi.get_invoice ...'
185
- rescue
186
- puts 'Cannot write to log'
187
- end
188
- end
189
- # verify the required parameter 'id' is set
190
- if @api_client.config.client_side_validation && id.nil?
191
- fail ArgumentError, "Missing the required parameter 'id' when calling InvoicesApi.get_invoice"
192
- end
193
- # resource path
194
- local_var_path = 'invoicing/v2/invoices/{id}'.sub('{' + 'id' + '}', id.to_s)
195
-
196
- # query parameters
197
- query_params = {}
198
-
199
- # header parameters
200
- header_params = {}
201
- # HTTP header 'Accept' (if needed)
202
- header_params['Accept'] = @api_client.select_header_accept(['application/json;charset=utf-8'])
203
- # HTTP header 'Content-Type'
204
- header_params['Content-Type'] = @api_client.select_header_content_type(['application/json;charset=utf-8'])
205
-
206
- # form parameters
207
- form_params = {}
208
-
209
- # http body (model)
210
- post_body = nil
211
- auth_names = []
212
- data, status_code, headers = @api_client.call_api(:GET, local_var_path,
213
- :header_params => header_params,
214
- :query_params => query_params,
215
- :form_params => form_params,
216
- :body => post_body,
217
- :auth_names => auth_names,
218
- :return_type => 'InvoicingV2InvoicesGet200Response')
219
- if @api_client.config.debugging
220
- begin
221
- raise
222
- @api_client.config.logger.debug "API called: InvoicesApi#get_invoice\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
223
- rescue
224
- puts 'Cannot write to log'
225
- end
226
- end
227
- return data, status_code, headers
228
- end
229
- # Cancel an Invoice
230
- # Cancel an invoice.
231
- # @param id The invoice number.
232
- # @param [Hash] opts the optional parameters
233
- # @return [InvoicingV2InvoicesPost201Response]
234
- def perform_cancel_action(id, opts = {})
235
- data, status_code, headers = perform_cancel_action_with_http_info(id, opts)
236
- return data, status_code, headers
237
- end
238
-
239
- # Cancel an Invoice
240
- # Cancel an invoice.
241
- # @param id The invoice number.
242
- # @param [Hash] opts the optional parameters
243
- # @return [Array<(InvoicingV2InvoicesPost201Response, Fixnum, Hash)>] InvoicingV2InvoicesPost201Response data, response status code and response headers
244
- def perform_cancel_action_with_http_info(id, opts = {})
245
-
246
- if @api_client.config.debugging
247
- begin
248
- raise
249
- @api_client.config.logger.debug 'Calling API: InvoicesApi.perform_cancel_action ...'
250
- rescue
251
- puts 'Cannot write to log'
252
- end
253
- end
254
- # verify the required parameter 'id' is set
255
- if @api_client.config.client_side_validation && id.nil?
256
- fail ArgumentError, "Missing the required parameter 'id' when calling InvoicesApi.perform_cancel_action"
257
- end
258
- # resource path
259
- local_var_path = 'invoicing/v2/invoices/{id}/cancelation'.sub('{' + 'id' + '}', id.to_s)
260
-
261
- # query parameters
262
- query_params = {}
263
-
264
- # header parameters
265
- header_params = {}
266
- # HTTP header 'Accept' (if needed)
267
- header_params['Accept'] = @api_client.select_header_accept(['application/json;charset=utf-8'])
268
- # HTTP header 'Content-Type'
269
- header_params['Content-Type'] = @api_client.select_header_content_type(['application/json;charset=utf-8'])
270
-
271
- # form parameters
272
- form_params = {}
273
-
274
- # http body (model)
275
- post_body = nil
276
- auth_names = []
277
- data, status_code, headers = @api_client.call_api(:POST, local_var_path,
278
- :header_params => header_params,
279
- :query_params => query_params,
280
- :form_params => form_params,
281
- :body => post_body,
282
- :auth_names => auth_names,
283
- :return_type => 'InvoicingV2InvoicesPost201Response')
284
- if @api_client.config.debugging
285
- begin
286
- raise
287
- @api_client.config.logger.debug "API called: InvoicesApi#perform_cancel_action\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
288
- rescue
289
- puts 'Cannot write to log'
290
- end
291
- end
292
- return data, status_code, headers
293
- end
294
- # Send an Invoice
295
- # Send an invoice.
296
- # @param id The invoice number.
297
- # @param [Hash] opts the optional parameters
298
- # @return [InvoicingV2InvoicesPost201Response]
299
- def perform_send_action(id, opts = {})
300
- data, status_code, headers = perform_send_action_with_http_info(id, opts)
301
- return data, status_code, headers
302
- end
303
-
304
- # Send an Invoice
305
- # Send an invoice.
306
- # @param id The invoice number.
307
- # @param [Hash] opts the optional parameters
308
- # @return [Array<(InvoicingV2InvoicesPost201Response, Fixnum, Hash)>] InvoicingV2InvoicesPost201Response data, response status code and response headers
309
- def perform_send_action_with_http_info(id, opts = {})
310
-
311
- if @api_client.config.debugging
312
- begin
313
- raise
314
- @api_client.config.logger.debug 'Calling API: InvoicesApi.perform_send_action ...'
315
- rescue
316
- puts 'Cannot write to log'
317
- end
318
- end
319
- # verify the required parameter 'id' is set
320
- if @api_client.config.client_side_validation && id.nil?
321
- fail ArgumentError, "Missing the required parameter 'id' when calling InvoicesApi.perform_send_action"
322
- end
323
- # resource path
324
- local_var_path = 'invoicing/v2/invoices/{id}/delivery'.sub('{' + 'id' + '}', id.to_s)
325
-
326
- # query parameters
327
- query_params = {}
328
-
329
- # header parameters
330
- header_params = {}
331
- # HTTP header 'Accept' (if needed)
332
- header_params['Accept'] = @api_client.select_header_accept(['application/json;charset=utf-8'])
333
- # HTTP header 'Content-Type'
334
- header_params['Content-Type'] = @api_client.select_header_content_type(['application/json;charset=utf-8'])
335
-
336
- # form parameters
337
- form_params = {}
338
-
339
- # http body (model)
340
- post_body = nil
341
- auth_names = []
342
- data, status_code, headers = @api_client.call_api(:POST, local_var_path,
343
- :header_params => header_params,
344
- :query_params => query_params,
345
- :form_params => form_params,
346
- :body => post_body,
347
- :auth_names => auth_names,
348
- :return_type => 'InvoicingV2InvoicesPost201Response')
349
- if @api_client.config.debugging
350
- begin
351
- raise
352
- @api_client.config.logger.debug "API called: InvoicesApi#perform_send_action\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
353
- rescue
354
- puts 'Cannot write to log'
355
- end
356
- end
357
- return data, status_code, headers
358
- end
359
- # Update an Invoice
360
- # Update an invoice.
361
- # @param id The invoice number.
362
- # @param update_invoice_request Updating the invoice does not resend the invoice automatically. You must resend the invoice separately.
363
- # @param [Hash] opts the optional parameters
364
- # @return [InvoicingV2InvoicesPost201Response]
365
- def update_invoice(id, update_invoice_request, opts = {})
366
- data, status_code, headers = update_invoice_with_http_info(id, update_invoice_request, opts)
367
- return data, status_code, headers
368
- end
369
-
370
- # Update an Invoice
371
- # Update an invoice.
372
- # @param id The invoice number.
373
- # @param update_invoice_request Updating the invoice does not resend the invoice automatically. You must resend the invoice separately.
374
- # @param [Hash] opts the optional parameters
375
- # @return [Array<(InvoicingV2InvoicesPost201Response, Fixnum, Hash)>] InvoicingV2InvoicesPost201Response data, response status code and response headers
376
- def update_invoice_with_http_info(id, update_invoice_request, opts = {})
377
-
378
- if @api_client.config.debugging
379
- begin
380
- raise
381
- @api_client.config.logger.debug 'Calling API: InvoicesApi.update_invoice ...'
382
- rescue
383
- puts 'Cannot write to log'
384
- end
385
- end
386
- # verify the required parameter 'id' is set
387
- if @api_client.config.client_side_validation && id.nil?
388
- fail ArgumentError, "Missing the required parameter 'id' when calling InvoicesApi.update_invoice"
389
- end
390
- # verify the required parameter 'update_invoice_request' is set
391
- if @api_client.config.client_side_validation && update_invoice_request.nil?
392
- fail ArgumentError, "Missing the required parameter 'update_invoice_request' when calling InvoicesApi.update_invoice"
393
- end
394
- # resource path
395
- local_var_path = 'invoicing/v2/invoices/{id}'.sub('{' + 'id' + '}', id.to_s)
396
-
397
- # query parameters
398
- query_params = {}
399
-
400
- # header parameters
401
- header_params = {}
402
- # HTTP header 'Accept' (if needed)
403
- header_params['Accept'] = @api_client.select_header_accept(['application/json;charset=utf-8'])
404
- # HTTP header 'Content-Type'
405
- header_params['Content-Type'] = @api_client.select_header_content_type(['application/json;charset=utf-8'])
406
-
407
- # form parameters
408
- form_params = {}
409
-
410
- # http body (model)
411
- post_body = @api_client.object_to_http_body(update_invoice_request)
412
- auth_names = []
413
- data, status_code, headers = @api_client.call_api(:PUT, local_var_path,
414
- :header_params => header_params,
415
- :query_params => query_params,
416
- :form_params => form_params,
417
- :body => post_body,
418
- :auth_names => auth_names,
419
- :return_type => 'InvoicingV2InvoicesPost201Response')
420
- if @api_client.config.debugging
421
- begin
422
- raise
423
- @api_client.config.logger.debug "API called: InvoicesApi#update_invoice\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
424
- rescue
425
- puts 'Cannot write to log'
426
- end
427
- end
428
- return data, status_code, headers
429
- end
430
- end
431
- end
1
+ =begin
2
+ #CyberSource Merged Spec
3
+
4
+ #All CyberSource API specs merged together. These are available at https://developer.cybersource.com/api/reference/api-reference.html
5
+
6
+ OpenAPI spec version: 0.0.1
7
+
8
+ Generated by: https://github.com/swagger-api/swagger-codegen.git
9
+ Swagger Codegen version: 2.2.3
10
+
11
+ =end
12
+
13
+ require 'uri'
14
+
15
+ module CyberSource
16
+ class InvoicesApi
17
+ attr_accessor :api_client
18
+
19
+ def initialize(api_client = ApiClient.default, config)
20
+ @api_client = api_client
21
+ @api_client.set_configuration(config)
22
+ end
23
+ # Create a New Invoice
24
+ # Create a new invoice.
25
+ # @param create_invoice_request
26
+ # @param [Hash] opts the optional parameters
27
+ # @return [InvoicingV2InvoicesPost201Response]
28
+ def create_invoice(create_invoice_request, opts = {})
29
+ data, status_code, headers = create_invoice_with_http_info(create_invoice_request, opts)
30
+ return data, status_code, headers
31
+ end
32
+
33
+ # Create a New Invoice
34
+ # Create a new invoice.
35
+ # @param create_invoice_request
36
+ # @param [Hash] opts the optional parameters
37
+ # @return [Array<(InvoicingV2InvoicesPost201Response, Fixnum, Hash)>] InvoicingV2InvoicesPost201Response data, response status code and response headers
38
+ def create_invoice_with_http_info(create_invoice_request, opts = {})
39
+
40
+ if @api_client.config.debugging
41
+ begin
42
+ raise
43
+ @api_client.config.logger.debug 'Calling API: InvoicesApi.create_invoice ...'
44
+ rescue
45
+ puts 'Cannot write to log'
46
+ end
47
+ end
48
+ # verify the required parameter 'create_invoice_request' is set
49
+ if @api_client.config.client_side_validation && create_invoice_request.nil?
50
+ fail ArgumentError, "Missing the required parameter 'create_invoice_request' when calling InvoicesApi.create_invoice"
51
+ end
52
+ # resource path
53
+ local_var_path = 'invoicing/v2/invoices'
54
+
55
+ # query parameters
56
+ query_params = {}
57
+
58
+ # header parameters
59
+ header_params = {}
60
+ # HTTP header 'Accept' (if needed)
61
+ header_params['Accept'] = @api_client.select_header_accept(['application/json;charset=utf-8'])
62
+ # HTTP header 'Content-Type'
63
+ header_params['Content-Type'] = @api_client.select_header_content_type(['application/json;charset=utf-8'])
64
+
65
+ # form parameters
66
+ form_params = {}
67
+
68
+ # http body (model)
69
+ post_body = @api_client.object_to_http_body(create_invoice_request)
70
+ auth_names = []
71
+ data, status_code, headers = @api_client.call_api(:POST, local_var_path,
72
+ :header_params => header_params,
73
+ :query_params => query_params,
74
+ :form_params => form_params,
75
+ :body => post_body,
76
+ :auth_names => auth_names,
77
+ :return_type => 'InvoicingV2InvoicesPost201Response')
78
+ if @api_client.config.debugging
79
+ begin
80
+ raise
81
+ @api_client.config.logger.debug "API called: InvoicesApi#create_invoice\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
82
+ rescue
83
+ puts 'Cannot write to log'
84
+ end
85
+ end
86
+ return data, status_code, headers
87
+ end
88
+ # Get a List of Invoices
89
+ # Get a list of invoices.
90
+ # @param offset Page offset number.
91
+ # @param limit Maximum number of items you would like returned.
92
+ # @param [Hash] opts the optional parameters
93
+ # @option opts [String] :status The status of the invoice. Possible values: - DRAFT - CREATED - SENT - PARTIAL - PAID - CANCELED
94
+ # @return [InvoicingV2InvoicesAllGet200Response]
95
+ def get_all_invoices(offset, limit, opts = {})
96
+ data, status_code, headers = get_all_invoices_with_http_info(offset, limit, opts)
97
+ return data, status_code, headers
98
+ end
99
+
100
+ # Get a List of Invoices
101
+ # Get a list of invoices.
102
+ # @param offset Page offset number.
103
+ # @param limit Maximum number of items you would like returned.
104
+ # @param [Hash] opts the optional parameters
105
+ # @option opts [String] :status The status of the invoice. Possible values: - DRAFT - CREATED - SENT - PARTIAL - PAID - CANCELED
106
+ # @return [Array<(InvoicingV2InvoicesAllGet200Response, Fixnum, Hash)>] InvoicingV2InvoicesAllGet200Response data, response status code and response headers
107
+ def get_all_invoices_with_http_info(offset, limit, opts = {})
108
+
109
+ if @api_client.config.debugging
110
+ begin
111
+ raise
112
+ @api_client.config.logger.debug 'Calling API: InvoicesApi.get_all_invoices ...'
113
+ rescue
114
+ puts 'Cannot write to log'
115
+ end
116
+ end
117
+ # verify the required parameter 'offset' is set
118
+ if @api_client.config.client_side_validation && offset.nil?
119
+ fail ArgumentError, "Missing the required parameter 'offset' when calling InvoicesApi.get_all_invoices"
120
+ end
121
+ # verify the required parameter 'limit' is set
122
+ if @api_client.config.client_side_validation && limit.nil?
123
+ fail ArgumentError, "Missing the required parameter 'limit' when calling InvoicesApi.get_all_invoices"
124
+ end
125
+ # resource path
126
+ local_var_path = 'invoicing/v2/invoices'
127
+
128
+ # query parameters
129
+ query_params = {}
130
+ query_params[:'offset'] = offset
131
+ query_params[:'limit'] = limit
132
+ query_params[:'status'] = opts[:'status'] if !opts[:'status'].nil?
133
+
134
+ # header parameters
135
+ header_params = {}
136
+ # HTTP header 'Accept' (if needed)
137
+ header_params['Accept'] = @api_client.select_header_accept(['application/json;charset=utf-8'])
138
+ # HTTP header 'Content-Type'
139
+ header_params['Content-Type'] = @api_client.select_header_content_type(['application/json;charset=utf-8'])
140
+
141
+ # form parameters
142
+ form_params = {}
143
+
144
+ # http body (model)
145
+ if 'GET' == 'POST'
146
+ post_body = '{}'
147
+ else
148
+ post_body = nil
149
+ end
150
+ auth_names = []
151
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path,
152
+ :header_params => header_params,
153
+ :query_params => query_params,
154
+ :form_params => form_params,
155
+ :body => post_body,
156
+ :auth_names => auth_names,
157
+ :return_type => 'InvoicingV2InvoicesAllGet200Response')
158
+ if @api_client.config.debugging
159
+ begin
160
+ raise
161
+ @api_client.config.logger.debug "API called: InvoicesApi#get_all_invoices\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
162
+ rescue
163
+ puts 'Cannot write to log'
164
+ end
165
+ end
166
+ return data, status_code, headers
167
+ end
168
+ # Get Invoice Details
169
+ # Get the details of a specific invoice.
170
+ # @param id The invoice number.
171
+ # @param [Hash] opts the optional parameters
172
+ # @return [InvoicingV2InvoicesGet200Response]
173
+ def get_invoice(id, opts = {})
174
+ data, status_code, headers = get_invoice_with_http_info(id, opts)
175
+ return data, status_code, headers
176
+ end
177
+
178
+ # Get Invoice Details
179
+ # Get the details of a specific invoice.
180
+ # @param id The invoice number.
181
+ # @param [Hash] opts the optional parameters
182
+ # @return [Array<(InvoicingV2InvoicesGet200Response, Fixnum, Hash)>] InvoicingV2InvoicesGet200Response data, response status code and response headers
183
+ def get_invoice_with_http_info(id, opts = {})
184
+
185
+ if @api_client.config.debugging
186
+ begin
187
+ raise
188
+ @api_client.config.logger.debug 'Calling API: InvoicesApi.get_invoice ...'
189
+ rescue
190
+ puts 'Cannot write to log'
191
+ end
192
+ end
193
+ # verify the required parameter 'id' is set
194
+ if @api_client.config.client_side_validation && id.nil?
195
+ fail ArgumentError, "Missing the required parameter 'id' when calling InvoicesApi.get_invoice"
196
+ end
197
+ # resource path
198
+ local_var_path = 'invoicing/v2/invoices/{id}'.sub('{' + 'id' + '}', id.to_s)
199
+
200
+ # query parameters
201
+ query_params = {}
202
+
203
+ # header parameters
204
+ header_params = {}
205
+ # HTTP header 'Accept' (if needed)
206
+ header_params['Accept'] = @api_client.select_header_accept(['application/json;charset=utf-8'])
207
+ # HTTP header 'Content-Type'
208
+ header_params['Content-Type'] = @api_client.select_header_content_type(['application/json;charset=utf-8'])
209
+
210
+ # form parameters
211
+ form_params = {}
212
+
213
+ # http body (model)
214
+ if 'GET' == 'POST'
215
+ post_body = '{}'
216
+ else
217
+ post_body = nil
218
+ end
219
+ auth_names = []
220
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path,
221
+ :header_params => header_params,
222
+ :query_params => query_params,
223
+ :form_params => form_params,
224
+ :body => post_body,
225
+ :auth_names => auth_names,
226
+ :return_type => 'InvoicingV2InvoicesGet200Response')
227
+ if @api_client.config.debugging
228
+ begin
229
+ raise
230
+ @api_client.config.logger.debug "API called: InvoicesApi#get_invoice\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
231
+ rescue
232
+ puts 'Cannot write to log'
233
+ end
234
+ end
235
+ return data, status_code, headers
236
+ end
237
+ # Cancel an Invoice
238
+ # Cancel an invoice.
239
+ # @param id The invoice number.
240
+ # @param [Hash] opts the optional parameters
241
+ # @return [InvoicingV2InvoicesPost201Response]
242
+ def perform_cancel_action(id, opts = {})
243
+ data, status_code, headers = perform_cancel_action_with_http_info(id, opts)
244
+ return data, status_code, headers
245
+ end
246
+
247
+ # Cancel an Invoice
248
+ # Cancel an invoice.
249
+ # @param id The invoice number.
250
+ # @param [Hash] opts the optional parameters
251
+ # @return [Array<(InvoicingV2InvoicesPost201Response, Fixnum, Hash)>] InvoicingV2InvoicesPost201Response data, response status code and response headers
252
+ def perform_cancel_action_with_http_info(id, opts = {})
253
+
254
+ if @api_client.config.debugging
255
+ begin
256
+ raise
257
+ @api_client.config.logger.debug 'Calling API: InvoicesApi.perform_cancel_action ...'
258
+ rescue
259
+ puts 'Cannot write to log'
260
+ end
261
+ end
262
+ # verify the required parameter 'id' is set
263
+ if @api_client.config.client_side_validation && id.nil?
264
+ fail ArgumentError, "Missing the required parameter 'id' when calling InvoicesApi.perform_cancel_action"
265
+ end
266
+ # resource path
267
+ local_var_path = 'invoicing/v2/invoices/{id}/cancelation'.sub('{' + 'id' + '}', id.to_s)
268
+
269
+ # query parameters
270
+ query_params = {}
271
+
272
+ # header parameters
273
+ header_params = {}
274
+ # HTTP header 'Accept' (if needed)
275
+ header_params['Accept'] = @api_client.select_header_accept(['application/json;charset=utf-8'])
276
+ # HTTP header 'Content-Type'
277
+ header_params['Content-Type'] = @api_client.select_header_content_type(['application/json;charset=utf-8'])
278
+
279
+ # form parameters
280
+ form_params = {}
281
+
282
+ # http body (model)
283
+ if 'POST' == 'POST'
284
+ post_body = '{}'
285
+ else
286
+ post_body = nil
287
+ end
288
+ auth_names = []
289
+ data, status_code, headers = @api_client.call_api(:POST, local_var_path,
290
+ :header_params => header_params,
291
+ :query_params => query_params,
292
+ :form_params => form_params,
293
+ :body => post_body,
294
+ :auth_names => auth_names,
295
+ :return_type => 'InvoicingV2InvoicesPost201Response')
296
+ if @api_client.config.debugging
297
+ begin
298
+ raise
299
+ @api_client.config.logger.debug "API called: InvoicesApi#perform_cancel_action\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
300
+ rescue
301
+ puts 'Cannot write to log'
302
+ end
303
+ end
304
+ return data, status_code, headers
305
+ end
306
+ # Send an Invoice
307
+ # Send an invoice.
308
+ # @param id The invoice number.
309
+ # @param [Hash] opts the optional parameters
310
+ # @return [InvoicingV2InvoicesPost201Response]
311
+ def perform_send_action(id, opts = {})
312
+ data, status_code, headers = perform_send_action_with_http_info(id, opts)
313
+ return data, status_code, headers
314
+ end
315
+
316
+ # Send an Invoice
317
+ # Send an invoice.
318
+ # @param id The invoice number.
319
+ # @param [Hash] opts the optional parameters
320
+ # @return [Array<(InvoicingV2InvoicesPost201Response, Fixnum, Hash)>] InvoicingV2InvoicesPost201Response data, response status code and response headers
321
+ def perform_send_action_with_http_info(id, opts = {})
322
+
323
+ if @api_client.config.debugging
324
+ begin
325
+ raise
326
+ @api_client.config.logger.debug 'Calling API: InvoicesApi.perform_send_action ...'
327
+ rescue
328
+ puts 'Cannot write to log'
329
+ end
330
+ end
331
+ # verify the required parameter 'id' is set
332
+ if @api_client.config.client_side_validation && id.nil?
333
+ fail ArgumentError, "Missing the required parameter 'id' when calling InvoicesApi.perform_send_action"
334
+ end
335
+ # resource path
336
+ local_var_path = 'invoicing/v2/invoices/{id}/delivery'.sub('{' + 'id' + '}', id.to_s)
337
+
338
+ # query parameters
339
+ query_params = {}
340
+
341
+ # header parameters
342
+ header_params = {}
343
+ # HTTP header 'Accept' (if needed)
344
+ header_params['Accept'] = @api_client.select_header_accept(['application/json;charset=utf-8'])
345
+ # HTTP header 'Content-Type'
346
+ header_params['Content-Type'] = @api_client.select_header_content_type(['application/json;charset=utf-8'])
347
+
348
+ # form parameters
349
+ form_params = {}
350
+
351
+ # http body (model)
352
+ if 'POST' == 'POST'
353
+ post_body = '{}'
354
+ else
355
+ post_body = nil
356
+ end
357
+ auth_names = []
358
+ data, status_code, headers = @api_client.call_api(:POST, local_var_path,
359
+ :header_params => header_params,
360
+ :query_params => query_params,
361
+ :form_params => form_params,
362
+ :body => post_body,
363
+ :auth_names => auth_names,
364
+ :return_type => 'InvoicingV2InvoicesPost201Response')
365
+ if @api_client.config.debugging
366
+ begin
367
+ raise
368
+ @api_client.config.logger.debug "API called: InvoicesApi#perform_send_action\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
369
+ rescue
370
+ puts 'Cannot write to log'
371
+ end
372
+ end
373
+ return data, status_code, headers
374
+ end
375
+ # Update an Invoice
376
+ # Update an invoice.
377
+ # @param id The invoice number.
378
+ # @param update_invoice_request Updating the invoice does not resend the invoice automatically. You must resend the invoice separately.
379
+ # @param [Hash] opts the optional parameters
380
+ # @return [InvoicingV2InvoicesPost201Response]
381
+ def update_invoice(id, update_invoice_request, opts = {})
382
+ data, status_code, headers = update_invoice_with_http_info(id, update_invoice_request, opts)
383
+ return data, status_code, headers
384
+ end
385
+
386
+ # Update an Invoice
387
+ # Update an invoice.
388
+ # @param id The invoice number.
389
+ # @param update_invoice_request Updating the invoice does not resend the invoice automatically. You must resend the invoice separately.
390
+ # @param [Hash] opts the optional parameters
391
+ # @return [Array<(InvoicingV2InvoicesPost201Response, Fixnum, Hash)>] InvoicingV2InvoicesPost201Response data, response status code and response headers
392
+ def update_invoice_with_http_info(id, update_invoice_request, opts = {})
393
+
394
+ if @api_client.config.debugging
395
+ begin
396
+ raise
397
+ @api_client.config.logger.debug 'Calling API: InvoicesApi.update_invoice ...'
398
+ rescue
399
+ puts 'Cannot write to log'
400
+ end
401
+ end
402
+ # verify the required parameter 'id' is set
403
+ if @api_client.config.client_side_validation && id.nil?
404
+ fail ArgumentError, "Missing the required parameter 'id' when calling InvoicesApi.update_invoice"
405
+ end
406
+ # verify the required parameter 'update_invoice_request' is set
407
+ if @api_client.config.client_side_validation && update_invoice_request.nil?
408
+ fail ArgumentError, "Missing the required parameter 'update_invoice_request' when calling InvoicesApi.update_invoice"
409
+ end
410
+ # resource path
411
+ local_var_path = 'invoicing/v2/invoices/{id}'.sub('{' + 'id' + '}', id.to_s)
412
+
413
+ # query parameters
414
+ query_params = {}
415
+
416
+ # header parameters
417
+ header_params = {}
418
+ # HTTP header 'Accept' (if needed)
419
+ header_params['Accept'] = @api_client.select_header_accept(['application/json;charset=utf-8'])
420
+ # HTTP header 'Content-Type'
421
+ header_params['Content-Type'] = @api_client.select_header_content_type(['application/json;charset=utf-8'])
422
+
423
+ # form parameters
424
+ form_params = {}
425
+
426
+ # http body (model)
427
+ post_body = @api_client.object_to_http_body(update_invoice_request)
428
+ auth_names = []
429
+ data, status_code, headers = @api_client.call_api(:PUT, local_var_path,
430
+ :header_params => header_params,
431
+ :query_params => query_params,
432
+ :form_params => form_params,
433
+ :body => post_body,
434
+ :auth_names => auth_names,
435
+ :return_type => 'InvoicingV2InvoicesPost201Response')
436
+ if @api_client.config.debugging
437
+ begin
438
+ raise
439
+ @api_client.config.logger.debug "API called: InvoicesApi#update_invoice\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
440
+ rescue
441
+ puts 'Cannot write to log'
442
+ end
443
+ end
444
+ return data, status_code, headers
445
+ end
446
+ end
447
+ end