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.
- checksums.yaml +4 -4
- data/lib/AuthenticationSDK/logging/sensitive_logging.rb +7 -4
- data/lib/cybersource_rest_client/api/asymmetric_key_management_api.rb +223 -219
- data/lib/cybersource_rest_client/api/chargeback_details_api.rb +116 -112
- data/lib/cybersource_rest_client/api/chargeback_summaries_api.rb +116 -112
- data/lib/cybersource_rest_client/api/conversion_details_api.rb +5 -1
- data/lib/cybersource_rest_client/api/customer_api.rb +368 -360
- data/lib/cybersource_rest_client/api/customer_payment_instrument_api.rb +530 -518
- data/lib/cybersource_rest_client/api/customer_shipping_address_api.rb +530 -518
- data/lib/cybersource_rest_client/api/download_dtd_api.rb +92 -88
- data/lib/cybersource_rest_client/api/download_xsd_api.rb +92 -88
- data/lib/cybersource_rest_client/api/instrument_identifier_api.rb +15 -3
- data/lib/cybersource_rest_client/api/interchange_clearing_level_details_api.rb +116 -112
- data/lib/cybersource_rest_client/api/invoice_settings_api.rb +152 -148
- data/lib/cybersource_rest_client/api/invoices_api.rb +447 -431
- data/lib/cybersource_rest_client/api/net_fundings_api.rb +5 -1
- data/lib/cybersource_rest_client/api/notification_of_changes_api.rb +5 -1
- data/lib/cybersource_rest_client/api/payer_authentication_api.rb +219 -219
- data/lib/cybersource_rest_client/api/payment_batch_summaries_api.rb +133 -129
- data/lib/cybersource_rest_client/api/payment_instrument_api.rb +10 -2
- data/lib/cybersource_rest_client/api/purchase_and_refund_details_api.rb +5 -1
- data/lib/cybersource_rest_client/api/report_definitions_api.rb +10 -2
- data/lib/cybersource_rest_client/api/report_downloads_api.rb +5 -1
- data/lib/cybersource_rest_client/api/report_subscriptions_api.rb +15 -3
- data/lib/cybersource_rest_client/api/reports_api.rb +10 -2
- data/lib/cybersource_rest_client/api/retrieval_details_api.rb +116 -112
- data/lib/cybersource_rest_client/api/retrieval_summaries_api.rb +116 -112
- data/lib/cybersource_rest_client/api/search_transactions_api.rb +5 -1
- data/lib/cybersource_rest_client/api/secure_file_share_api.rb +206 -198
- data/lib/cybersource_rest_client/api/symmetric_key_management_api.rb +5 -1
- data/lib/cybersource_rest_client/api/taxes_api.rb +160 -160
- data/lib/cybersource_rest_client/api/tokenization_api.rb +89 -89
- data/lib/cybersource_rest_client/api/transaction_batches_api.rb +15 -3
- data/lib/cybersource_rest_client/api/transaction_details_api.rb +5 -1
- data/lib/cybersource_rest_client/api/user_management_api.rb +5 -1
- data/lib/cybersource_rest_client/api/user_management_search_api.rb +89 -89
- data/lib/cybersource_rest_client/api/verification_api.rb +154 -154
- data/lib/cybersource_rest_client/models/pts_v2_payments_post201_response_payment_account_information_card.rb +20 -4
- data/lib/cybersource_rest_client/models/pts_v2_payments_post201_response_processor_information_merchant_advice.rb +20 -4
- data/lib/cybersource_rest_client/models/ptsv2payments_merchant_information_merchant_descriptor.rb +20 -4
- data/lib/cybersource_rest_client/models/ptsv2payments_order_information.rb +11 -1
- data/lib/cybersource_rest_client/models/ptsv2payments_order_information_invoice_details.rb +20 -4
- data/lib/cybersource_rest_client/models/ptsv2payments_payment_information_tokenized_card.rb +1 -1
- data/lib/cybersource_rest_client/models/ptsv2payments_point_of_sale_information.rb +20 -4
- data/lib/cybersource_rest_client/models/ptsv2payments_point_of_sale_information_emv.rb +21 -7
- data/lib/cybersource_rest_client/models/ptsv2payments_processing_information_authorization_options.rb +17 -1
- data/lib/cybersource_rest_client/models/ptsv2payments_processor_information.rb +13 -4
- data/lib/cybersource_rest_client/models/ptsv2payments_processor_information_authorization_options.rb +190 -0
- data/lib/cybersource_rest_client/models/ptsv2paymentsidcaptures_point_of_sale_information_emv.rb +0 -2
- data/lib/cybersource_rest_client/models/ptsv2paymentsidvoids_order_information.rb +183 -0
- data/lib/cybersource_rest_client/models/ptsv2payouts_order_information.rb +14 -4
- data/lib/cybersource_rest_client/models/ptsv2payouts_processing_information.rb +13 -4
- data/lib/cybersource_rest_client/models/ptsv2payouts_processing_information_funding_options.rb +183 -0
- data/lib/cybersource_rest_client/models/ptsv2payouts_processing_information_funding_options_initiator.rb +190 -0
- data/lib/cybersource_rest_client/models/ptsv2payouts_sender_information.rb +52 -4
- data/lib/cybersource_rest_client/models/riskv1authenticationresults_payment_information_tokenized_card.rb +1 -1
- data/lib/cybersource_rest_client/models/riskv1authentications_payment_information_tokenized_card.rb +1 -1
- data/lib/cybersource_rest_client/models/riskv1authenticationsetups_payment_information_tokenized_card.rb +1 -1
- data/lib/cybersource_rest_client/models/riskv1decisions_payment_information_tokenized_card.rb +1 -1
- data/lib/cybersource_rest_client/models/tss_v2_transactions_get200_response_order_information_amount_details.rb +1 -1
- data/lib/cybersource_rest_client/models/void_capture_request.rb +13 -4
- data/lib/cybersource_rest_client/models/void_credit_request.rb +13 -4
- data/lib/cybersource_rest_client/models/void_payment_request.rb +13 -4
- data/lib/cybersource_rest_client/models/void_refund_request.rb +13 -4
- data/lib/cybersource_rest_client.rb +4 -0
- 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
|
-
|
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
|
-
end
|
193
|
-
#
|
194
|
-
|
195
|
-
|
196
|
-
|
197
|
-
|
198
|
-
|
199
|
-
|
200
|
-
|
201
|
-
|
202
|
-
|
203
|
-
#
|
204
|
-
header_params
|
205
|
-
|
206
|
-
|
207
|
-
|
208
|
-
|
209
|
-
|
210
|
-
|
211
|
-
|
212
|
-
|
213
|
-
|
214
|
-
|
215
|
-
|
216
|
-
|
217
|
-
|
218
|
-
|
219
|
-
|
220
|
-
|
221
|
-
|
222
|
-
|
223
|
-
|
224
|
-
|
225
|
-
|
226
|
-
|
227
|
-
|
228
|
-
|
229
|
-
|
230
|
-
|
231
|
-
|
232
|
-
|
233
|
-
|
234
|
-
|
235
|
-
data, status_code, headers
|
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
|
-
|
266
|
-
#
|
267
|
-
|
268
|
-
|
269
|
-
|
270
|
-
|
271
|
-
|
272
|
-
|
273
|
-
|
274
|
-
#
|
275
|
-
|
276
|
-
|
277
|
-
|
278
|
-
|
279
|
-
|
280
|
-
|
281
|
-
|
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
|
-
|
333
|
-
|
334
|
-
|
335
|
-
|
336
|
-
|
337
|
-
|
338
|
-
|
339
|
-
|
340
|
-
|
341
|
-
|
342
|
-
|
343
|
-
|
344
|
-
|
345
|
-
|
346
|
-
|
347
|
-
|
348
|
-
|
349
|
-
|
350
|
-
|
351
|
-
|
352
|
-
|
353
|
-
|
354
|
-
|
355
|
-
|
356
|
-
end
|
357
|
-
|
358
|
-
|
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
|
-
|
423
|
-
|
424
|
-
|
425
|
-
|
426
|
-
|
427
|
-
|
428
|
-
|
429
|
-
|
430
|
-
|
431
|
-
|
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
|