biz_api 3.9.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (136) hide show
  1. checksums.yaml +7 -0
  2. data/Gemfile +9 -0
  3. data/README.md +155 -0
  4. data/Rakefile +10 -0
  5. data/biz_api.gemspec +39 -0
  6. data/docs/AppInfo.md +22 -0
  7. data/docs/AuthRequest.md +26 -0
  8. data/docs/BizEvent.md +50 -0
  9. data/docs/BizEventsHelpdeskApi.md +157 -0
  10. data/docs/CartItem.md +28 -0
  11. data/docs/Creditor.md +26 -0
  12. data/docs/CtReceiptModelResponse.md +72 -0
  13. data/docs/Debtor.md +36 -0
  14. data/docs/DebtorPosition.md +24 -0
  15. data/docs/Details.md +22 -0
  16. data/docs/HomeApi.md +81 -0
  17. data/docs/IOTransactionsRESTAPIsApi.md +328 -0
  18. data/docs/Info.md +34 -0
  19. data/docs/InfoNotice.md +38 -0
  20. data/docs/InfoTransaction.md +26 -0
  21. data/docs/InfoTransactionView.md +38 -0
  22. data/docs/MBD.md +26 -0
  23. data/docs/MapEntry.md +20 -0
  24. data/docs/NoticeDetailResponse.md +20 -0
  25. data/docs/NoticeListItem.md +32 -0
  26. data/docs/NoticeListWrapResponse.md +18 -0
  27. data/docs/PageInfo.md +24 -0
  28. data/docs/PaidNoticeRESTAPIsApi.md +322 -0
  29. data/docs/Payer.md +36 -0
  30. data/docs/PaymentAuthorizationRequest.md +28 -0
  31. data/docs/PaymentInfo.md +50 -0
  32. data/docs/PaymentReceiptsRESTAPIsApi.md +161 -0
  33. data/docs/ProblemJson.md +22 -0
  34. data/docs/Psp.md +30 -0
  35. data/docs/Transaction.md +44 -0
  36. data/docs/TransactionDetailResponse.md +20 -0
  37. data/docs/TransactionDetails.md +28 -0
  38. data/docs/TransactionListItem.md +32 -0
  39. data/docs/TransactionListWrapResponse.md +20 -0
  40. data/docs/TransactionPsp.md +22 -0
  41. data/docs/Transfer.md +34 -0
  42. data/docs/TransferPA.md +32 -0
  43. data/docs/User.md +30 -0
  44. data/docs/UserDetail.md +20 -0
  45. data/docs/WalletInfo.md +24 -0
  46. data/docs/WalletItem.md +34 -0
  47. data/git_push.sh +57 -0
  48. data/lib/biz_api/api/biz_events_helpdesk_api.rb +156 -0
  49. data/lib/biz_api/api/home_api.rb +82 -0
  50. data/lib/biz_api/api/io_transactions_restapis_api.rb +334 -0
  51. data/lib/biz_api/api/paid_notice_restapis_api.rb +328 -0
  52. data/lib/biz_api/api/payment_receipts_restapis_api.rb +168 -0
  53. data/lib/biz_api/api_client.rb +394 -0
  54. data/lib/biz_api/api_error.rb +58 -0
  55. data/lib/biz_api/configuration.rb +333 -0
  56. data/lib/biz_api/models/app_info.rb +232 -0
  57. data/lib/biz_api/models/auth_request.rb +250 -0
  58. data/lib/biz_api/models/biz_event.rb +396 -0
  59. data/lib/biz_api/models/cart_item.rb +287 -0
  60. data/lib/biz_api/models/creditor.rb +250 -0
  61. data/lib/biz_api/models/ct_receipt_model_response.rb +552 -0
  62. data/lib/biz_api/models/debtor.rb +295 -0
  63. data/lib/biz_api/models/debtor_position.rb +241 -0
  64. data/lib/biz_api/models/details.rb +232 -0
  65. data/lib/biz_api/models/info.rb +286 -0
  66. data/lib/biz_api/models/info_notice.rb +392 -0
  67. data/lib/biz_api/models/info_transaction.rb +250 -0
  68. data/lib/biz_api/models/info_transaction_view.rb +350 -0
  69. data/lib/biz_api/models/map_entry.rb +223 -0
  70. data/lib/biz_api/models/mbd.rb +250 -0
  71. data/lib/biz_api/models/notice_detail_response.rb +225 -0
  72. data/lib/biz_api/models/notice_list_item.rb +326 -0
  73. data/lib/biz_api/models/notice_list_wrap_response.rb +223 -0
  74. data/lib/biz_api/models/page_info.rb +273 -0
  75. data/lib/biz_api/models/payer.rb +295 -0
  76. data/lib/biz_api/models/payment_authorization_request.rb +259 -0
  77. data/lib/biz_api/models/payment_info.rb +360 -0
  78. data/lib/biz_api/models/problem_json.rb +259 -0
  79. data/lib/biz_api/models/psp.rb +268 -0
  80. data/lib/biz_api/models/transaction.rb +331 -0
  81. data/lib/biz_api/models/transaction_detail_response.rb +225 -0
  82. data/lib/biz_api/models/transaction_details.rb +259 -0
  83. data/lib/biz_api/models/transaction_list_item.rb +277 -0
  84. data/lib/biz_api/models/transaction_list_wrap_response.rb +225 -0
  85. data/lib/biz_api/models/transaction_psp.rb +232 -0
  86. data/lib/biz_api/models/transfer.rb +288 -0
  87. data/lib/biz_api/models/transfer_pa.rb +345 -0
  88. data/lib/biz_api/models/user.rb +302 -0
  89. data/lib/biz_api/models/user_detail.rb +230 -0
  90. data/lib/biz_api/models/wallet_info.rb +241 -0
  91. data/lib/biz_api/models/wallet_item.rb +322 -0
  92. data/lib/biz_api/version.rb +15 -0
  93. data/lib/biz_api.rb +80 -0
  94. data/spec/api/biz_events_helpdesk_api_spec.rb +60 -0
  95. data/spec/api/home_api_spec.rb +47 -0
  96. data/spec/api/io_transactions_restapis_api_spec.rb +96 -0
  97. data/spec/api/paid_notice_restapis_api_spec.rb +93 -0
  98. data/spec/api/payment_receipts_restapis_api_spec.rb +62 -0
  99. data/spec/models/app_info_spec.rb +48 -0
  100. data/spec/models/auth_request_spec.rb +60 -0
  101. data/spec/models/biz_event_spec.rb +136 -0
  102. data/spec/models/cart_item_spec.rb +66 -0
  103. data/spec/models/creditor_spec.rb +60 -0
  104. data/spec/models/ct_receipt_model_response_spec.rb +198 -0
  105. data/spec/models/debtor_position_spec.rb +54 -0
  106. data/spec/models/debtor_spec.rb +90 -0
  107. data/spec/models/details_spec.rb +48 -0
  108. data/spec/models/info_notice_spec.rb +104 -0
  109. data/spec/models/info_spec.rb +84 -0
  110. data/spec/models/info_transaction_spec.rb +60 -0
  111. data/spec/models/info_transaction_view_spec.rb +104 -0
  112. data/spec/models/map_entry_spec.rb +42 -0
  113. data/spec/models/mbd_spec.rb +60 -0
  114. data/spec/models/notice_detail_response_spec.rb +42 -0
  115. data/spec/models/notice_list_item_spec.rb +78 -0
  116. data/spec/models/notice_list_wrap_response_spec.rb +36 -0
  117. data/spec/models/page_info_spec.rb +54 -0
  118. data/spec/models/payer_spec.rb +90 -0
  119. data/spec/models/payment_authorization_request_spec.rb +66 -0
  120. data/spec/models/payment_info_spec.rb +132 -0
  121. data/spec/models/problem_json_spec.rb +48 -0
  122. data/spec/models/psp_spec.rb +72 -0
  123. data/spec/models/transaction_detail_response_spec.rb +42 -0
  124. data/spec/models/transaction_details_spec.rb +66 -0
  125. data/spec/models/transaction_list_item_spec.rb +78 -0
  126. data/spec/models/transaction_list_wrap_response_spec.rb +42 -0
  127. data/spec/models/transaction_psp_spec.rb +48 -0
  128. data/spec/models/transaction_spec.rb +114 -0
  129. data/spec/models/transfer_pa_spec.rb +78 -0
  130. data/spec/models/transfer_spec.rb +84 -0
  131. data/spec/models/user_detail_spec.rb +42 -0
  132. data/spec/models/user_spec.rb +76 -0
  133. data/spec/models/wallet_info_spec.rb +54 -0
  134. data/spec/models/wallet_item_spec.rb +88 -0
  135. data/spec/spec_helper.rb +111 -0
  136. metadata +259 -0
@@ -0,0 +1,334 @@
1
+ =begin
2
+ #Biz-Events Service
3
+
4
+ #Microservice for exposing REST APIs about payment receipts.
5
+
6
+ The version of the OpenAPI document: 0.1.72
7
+
8
+ Generated by: https://openapi-generator.tech
9
+ Generator version: 7.11.0
10
+
11
+ =end
12
+
13
+ require 'cgi'
14
+
15
+ module BizReceipts
16
+ class IOTransactionsRESTAPIsApi
17
+ attr_accessor :api_client
18
+
19
+ def initialize(api_client = ApiClient.default)
20
+ @api_client = api_client
21
+ end
22
+ # Disable the transaction details given its id.
23
+ # This operation is deprecated. Use Paid Notice APIs instead
24
+ # @param x_fiscal_code [String]
25
+ # @param transaction_id [String] The id of the transaction.
26
+ # @param [Hash] opts the optional parameters
27
+ # @option opts [String] :x_request_id This header identifies the call, if not passed it is self-generated. This ID is returned in the response.
28
+ # @return [nil]
29
+ def disable_transaction(x_fiscal_code, transaction_id, opts = {})
30
+ disable_transaction_with_http_info(x_fiscal_code, transaction_id, opts)
31
+ nil
32
+ end
33
+
34
+ # Disable the transaction details given its id.
35
+ # This operation is deprecated. Use Paid Notice APIs instead
36
+ # @param x_fiscal_code [String]
37
+ # @param transaction_id [String] The id of the transaction.
38
+ # @param [Hash] opts the optional parameters
39
+ # @option opts [String] :x_request_id This header identifies the call, if not passed it is self-generated. This ID is returned in the response.
40
+ # @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers
41
+ def disable_transaction_with_http_info(x_fiscal_code, transaction_id, opts = {})
42
+ if @api_client.config.debugging
43
+ @api_client.config.logger.debug 'Calling API: IOTransactionsRESTAPIsApi.disable_transaction ...'
44
+ end
45
+ # verify the required parameter 'x_fiscal_code' is set
46
+ if @api_client.config.client_side_validation && x_fiscal_code.nil?
47
+ fail ArgumentError, "Missing the required parameter 'x_fiscal_code' when calling IOTransactionsRESTAPIsApi.disable_transaction"
48
+ end
49
+ # verify the required parameter 'transaction_id' is set
50
+ if @api_client.config.client_side_validation && transaction_id.nil?
51
+ fail ArgumentError, "Missing the required parameter 'transaction_id' when calling IOTransactionsRESTAPIsApi.disable_transaction"
52
+ end
53
+ # resource path
54
+ local_var_path = '/transactions/{transaction-id}/disable'.sub('{' + 'transaction-id' + '}', CGI.escape(transaction_id.to_s))
55
+
56
+ # query parameters
57
+ query_params = opts[:query_params] || {}
58
+
59
+ # header parameters
60
+ header_params = opts[:header_params] || {}
61
+ # HTTP header 'Accept' (if needed)
62
+ header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
63
+ header_params[:'x-fiscal-code'] = x_fiscal_code
64
+ header_params[:'X-Request-Id'] = opts[:'x_request_id'] if !opts[:'x_request_id'].nil?
65
+
66
+ # form parameters
67
+ form_params = opts[:form_params] || {}
68
+
69
+ # http body (model)
70
+ post_body = opts[:debug_body]
71
+
72
+ # return_type
73
+ return_type = opts[:debug_return_type]
74
+
75
+ # auth_names
76
+ auth_names = opts[:debug_auth_names] || ['ApiKey']
77
+
78
+ new_options = opts.merge(
79
+ :operation => :"IOTransactionsRESTAPIsApi.disable_transaction",
80
+ :header_params => header_params,
81
+ :query_params => query_params,
82
+ :form_params => form_params,
83
+ :body => post_body,
84
+ :auth_names => auth_names,
85
+ :return_type => return_type
86
+ )
87
+
88
+ data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
89
+ if @api_client.config.debugging
90
+ @api_client.config.logger.debug "API called: IOTransactionsRESTAPIsApi#disable_transaction\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
91
+ end
92
+ return data, status_code, headers
93
+ end
94
+
95
+ # Retrieve the PDF receipt given event id.
96
+ # This operation is deprecated. Use Paid Notice APIs instead
97
+ # @param x_fiscal_code [String]
98
+ # @param event_id [String] The id of the event.
99
+ # @param [Hash] opts the optional parameters
100
+ # @option opts [String] :x_request_id This header identifies the call, if not passed it is self-generated. This ID is returned in the response.
101
+ # @return [File]
102
+ def get_pdf_receipt(x_fiscal_code, event_id, opts = {})
103
+ data, _status_code, _headers = get_pdf_receipt_with_http_info(x_fiscal_code, event_id, opts)
104
+ data
105
+ end
106
+
107
+ # Retrieve the PDF receipt given event id.
108
+ # This operation is deprecated. Use Paid Notice APIs instead
109
+ # @param x_fiscal_code [String]
110
+ # @param event_id [String] The id of the event.
111
+ # @param [Hash] opts the optional parameters
112
+ # @option opts [String] :x_request_id This header identifies the call, if not passed it is self-generated. This ID is returned in the response.
113
+ # @return [Array<(File, Integer, Hash)>] File data, response status code and response headers
114
+ def get_pdf_receipt_with_http_info(x_fiscal_code, event_id, opts = {})
115
+ if @api_client.config.debugging
116
+ @api_client.config.logger.debug 'Calling API: IOTransactionsRESTAPIsApi.get_pdf_receipt ...'
117
+ end
118
+ # verify the required parameter 'x_fiscal_code' is set
119
+ if @api_client.config.client_side_validation && x_fiscal_code.nil?
120
+ fail ArgumentError, "Missing the required parameter 'x_fiscal_code' when calling IOTransactionsRESTAPIsApi.get_pdf_receipt"
121
+ end
122
+ # verify the required parameter 'event_id' is set
123
+ if @api_client.config.client_side_validation && event_id.nil?
124
+ fail ArgumentError, "Missing the required parameter 'event_id' when calling IOTransactionsRESTAPIsApi.get_pdf_receipt"
125
+ end
126
+ # resource path
127
+ local_var_path = '/transactions/{event-id}/pdf'.sub('{' + 'event-id' + '}', CGI.escape(event_id.to_s))
128
+
129
+ # query parameters
130
+ query_params = opts[:query_params] || {}
131
+
132
+ # header parameters
133
+ header_params = opts[:header_params] || {}
134
+ # HTTP header 'Accept' (if needed)
135
+ header_params['Accept'] = @api_client.select_header_accept(['application/pdf', 'application/json']) unless header_params['Accept']
136
+ header_params[:'x-fiscal-code'] = x_fiscal_code
137
+ header_params[:'X-Request-Id'] = opts[:'x_request_id'] if !opts[:'x_request_id'].nil?
138
+
139
+ # form parameters
140
+ form_params = opts[:form_params] || {}
141
+
142
+ # http body (model)
143
+ post_body = opts[:debug_body]
144
+
145
+ # return_type
146
+ return_type = opts[:debug_return_type] || 'File'
147
+
148
+ # auth_names
149
+ auth_names = opts[:debug_auth_names] || ['ApiKey']
150
+
151
+ new_options = opts.merge(
152
+ :operation => :"IOTransactionsRESTAPIsApi.get_pdf_receipt",
153
+ :header_params => header_params,
154
+ :query_params => query_params,
155
+ :form_params => form_params,
156
+ :body => post_body,
157
+ :auth_names => auth_names,
158
+ :return_type => return_type
159
+ )
160
+
161
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
162
+ if @api_client.config.debugging
163
+ @api_client.config.logger.debug "API called: IOTransactionsRESTAPIsApi#get_pdf_receipt\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
164
+ end
165
+ return data, status_code, headers
166
+ end
167
+
168
+ # Retrieve the transaction details given its id.
169
+ # This operation is deprecated. Use Paid Notice APIs instead
170
+ # @param x_fiscal_code [String]
171
+ # @param transaction_id [String] The id of the transaction.
172
+ # @param [Hash] opts the optional parameters
173
+ # @option opts [String] :x_request_id This header identifies the call, if not passed it is self-generated. This ID is returned in the response.
174
+ # @return [TransactionDetailResponse]
175
+ def get_transaction_details(x_fiscal_code, transaction_id, opts = {})
176
+ data, _status_code, _headers = get_transaction_details_with_http_info(x_fiscal_code, transaction_id, opts)
177
+ data
178
+ end
179
+
180
+ # Retrieve the transaction details given its id.
181
+ # This operation is deprecated. Use Paid Notice APIs instead
182
+ # @param x_fiscal_code [String]
183
+ # @param transaction_id [String] The id of the transaction.
184
+ # @param [Hash] opts the optional parameters
185
+ # @option opts [String] :x_request_id This header identifies the call, if not passed it is self-generated. This ID is returned in the response.
186
+ # @return [Array<(TransactionDetailResponse, Integer, Hash)>] TransactionDetailResponse data, response status code and response headers
187
+ def get_transaction_details_with_http_info(x_fiscal_code, transaction_id, opts = {})
188
+ if @api_client.config.debugging
189
+ @api_client.config.logger.debug 'Calling API: IOTransactionsRESTAPIsApi.get_transaction_details ...'
190
+ end
191
+ # verify the required parameter 'x_fiscal_code' is set
192
+ if @api_client.config.client_side_validation && x_fiscal_code.nil?
193
+ fail ArgumentError, "Missing the required parameter 'x_fiscal_code' when calling IOTransactionsRESTAPIsApi.get_transaction_details"
194
+ end
195
+ # verify the required parameter 'transaction_id' is set
196
+ if @api_client.config.client_side_validation && transaction_id.nil?
197
+ fail ArgumentError, "Missing the required parameter 'transaction_id' when calling IOTransactionsRESTAPIsApi.get_transaction_details"
198
+ end
199
+ # resource path
200
+ local_var_path = '/transactions/{transaction-id}'.sub('{' + 'transaction-id' + '}', CGI.escape(transaction_id.to_s))
201
+
202
+ # query parameters
203
+ query_params = opts[:query_params] || {}
204
+
205
+ # header parameters
206
+ header_params = opts[:header_params] || {}
207
+ # HTTP header 'Accept' (if needed)
208
+ header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
209
+ header_params[:'x-fiscal-code'] = x_fiscal_code
210
+ header_params[:'X-Request-Id'] = opts[:'x_request_id'] if !opts[:'x_request_id'].nil?
211
+
212
+ # form parameters
213
+ form_params = opts[:form_params] || {}
214
+
215
+ # http body (model)
216
+ post_body = opts[:debug_body]
217
+
218
+ # return_type
219
+ return_type = opts[:debug_return_type] || 'TransactionDetailResponse'
220
+
221
+ # auth_names
222
+ auth_names = opts[:debug_auth_names] || ['ApiKey']
223
+
224
+ new_options = opts.merge(
225
+ :operation => :"IOTransactionsRESTAPIsApi.get_transaction_details",
226
+ :header_params => header_params,
227
+ :query_params => query_params,
228
+ :form_params => form_params,
229
+ :body => post_body,
230
+ :auth_names => auth_names,
231
+ :return_type => return_type
232
+ )
233
+
234
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
235
+ if @api_client.config.debugging
236
+ @api_client.config.logger.debug "API called: IOTransactionsRESTAPIsApi#get_transaction_details\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
237
+ end
238
+ return data, status_code, headers
239
+ end
240
+
241
+ # Retrieve the paged transaction list from biz events.
242
+ # This operation is deprecated. Use Paid Notice APIs instead
243
+ # @param x_fiscal_code [String]
244
+ # @param [Hash] opts the optional parameters
245
+ # @option opts [String] :x_request_id This header identifies the call, if not passed it is self-generated. This ID is returned in the response.
246
+ # @option opts [Boolean] :is_payer Filter by payer
247
+ # @option opts [Boolean] :is_debtor Filter by debtor
248
+ # @option opts [String] :x_continuation_token
249
+ # @option opts [Integer] :size (default to 10)
250
+ # @option opts [String] :orderby Order by TRANSACTION_DATE (default to 'TRANSACTION_DATE')
251
+ # @option opts [String] :ordering Direction of ordering (default to 'DESC')
252
+ # @return [TransactionListWrapResponse]
253
+ def get_transaction_list(x_fiscal_code, opts = {})
254
+ data, _status_code, _headers = get_transaction_list_with_http_info(x_fiscal_code, opts)
255
+ data
256
+ end
257
+
258
+ # Retrieve the paged transaction list from biz events.
259
+ # This operation is deprecated. Use Paid Notice APIs instead
260
+ # @param x_fiscal_code [String]
261
+ # @param [Hash] opts the optional parameters
262
+ # @option opts [String] :x_request_id This header identifies the call, if not passed it is self-generated. This ID is returned in the response.
263
+ # @option opts [Boolean] :is_payer Filter by payer
264
+ # @option opts [Boolean] :is_debtor Filter by debtor
265
+ # @option opts [String] :x_continuation_token
266
+ # @option opts [Integer] :size (default to 10)
267
+ # @option opts [String] :orderby Order by TRANSACTION_DATE (default to 'TRANSACTION_DATE')
268
+ # @option opts [String] :ordering Direction of ordering (default to 'DESC')
269
+ # @return [Array<(TransactionListWrapResponse, Integer, Hash)>] TransactionListWrapResponse data, response status code and response headers
270
+ def get_transaction_list_with_http_info(x_fiscal_code, opts = {})
271
+ if @api_client.config.debugging
272
+ @api_client.config.logger.debug 'Calling API: IOTransactionsRESTAPIsApi.get_transaction_list ...'
273
+ end
274
+ # verify the required parameter 'x_fiscal_code' is set
275
+ if @api_client.config.client_side_validation && x_fiscal_code.nil?
276
+ fail ArgumentError, "Missing the required parameter 'x_fiscal_code' when calling IOTransactionsRESTAPIsApi.get_transaction_list"
277
+ end
278
+ allowable_values = ["TRANSACTION_DATE"]
279
+ if @api_client.config.client_side_validation && opts[:'orderby'] && !allowable_values.include?(opts[:'orderby'])
280
+ fail ArgumentError, "invalid value for \"orderby\", must be one of #{allowable_values}"
281
+ end
282
+ allowable_values = ["ASC", "DESC"]
283
+ if @api_client.config.client_side_validation && opts[:'ordering'] && !allowable_values.include?(opts[:'ordering'])
284
+ fail ArgumentError, "invalid value for \"ordering\", must be one of #{allowable_values}"
285
+ end
286
+ # resource path
287
+ local_var_path = '/transactions'
288
+
289
+ # query parameters
290
+ query_params = opts[:query_params] || {}
291
+ query_params[:'is_payer'] = opts[:'is_payer'] if !opts[:'is_payer'].nil?
292
+ query_params[:'is_debtor'] = opts[:'is_debtor'] if !opts[:'is_debtor'].nil?
293
+ query_params[:'size'] = opts[:'size'] if !opts[:'size'].nil?
294
+ query_params[:'orderby'] = opts[:'orderby'] if !opts[:'orderby'].nil?
295
+ query_params[:'ordering'] = opts[:'ordering'] if !opts[:'ordering'].nil?
296
+
297
+ # header parameters
298
+ header_params = opts[:header_params] || {}
299
+ # HTTP header 'Accept' (if needed)
300
+ header_params['Accept'] = @api_client.select_header_accept(['application/json', '*/*']) unless header_params['Accept']
301
+ header_params[:'x-fiscal-code'] = x_fiscal_code
302
+ header_params[:'X-Request-Id'] = opts[:'x_request_id'] if !opts[:'x_request_id'].nil?
303
+ header_params[:'x-continuation-token'] = opts[:'x_continuation_token'] if !opts[:'x_continuation_token'].nil?
304
+
305
+ # form parameters
306
+ form_params = opts[:form_params] || {}
307
+
308
+ # http body (model)
309
+ post_body = opts[:debug_body]
310
+
311
+ # return_type
312
+ return_type = opts[:debug_return_type] || 'TransactionListWrapResponse'
313
+
314
+ # auth_names
315
+ auth_names = opts[:debug_auth_names] || ['ApiKey']
316
+
317
+ new_options = opts.merge(
318
+ :operation => :"IOTransactionsRESTAPIsApi.get_transaction_list",
319
+ :header_params => header_params,
320
+ :query_params => query_params,
321
+ :form_params => form_params,
322
+ :body => post_body,
323
+ :auth_names => auth_names,
324
+ :return_type => return_type
325
+ )
326
+
327
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
328
+ if @api_client.config.debugging
329
+ @api_client.config.logger.debug "API called: IOTransactionsRESTAPIsApi#get_transaction_list\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
330
+ end
331
+ return data, status_code, headers
332
+ end
333
+ end
334
+ end
@@ -0,0 +1,328 @@
1
+ =begin
2
+ #Biz-Events Service
3
+
4
+ #Microservice for exposing REST APIs about payment receipts.
5
+
6
+ The version of the OpenAPI document: 0.1.72
7
+
8
+ Generated by: https://openapi-generator.tech
9
+ Generator version: 7.11.0
10
+
11
+ =end
12
+
13
+ require 'cgi'
14
+
15
+ module BizReceipts
16
+ class PaidNoticeRESTAPIsApi
17
+ attr_accessor :api_client
18
+
19
+ def initialize(api_client = ApiClient.default)
20
+ @api_client = api_client
21
+ end
22
+ # Disable the paid notice details given its id.
23
+ # @param x_fiscal_code [String]
24
+ # @param event_id [String] The id of the paid event.
25
+ # @param [Hash] opts the optional parameters
26
+ # @option opts [String] :x_request_id This header identifies the call, if not passed it is self-generated. This ID is returned in the response.
27
+ # @return [nil]
28
+ def disable_paid_notice(x_fiscal_code, event_id, opts = {})
29
+ disable_paid_notice_with_http_info(x_fiscal_code, event_id, opts)
30
+ nil
31
+ end
32
+
33
+ # Disable the paid notice details given its id.
34
+ # @param x_fiscal_code [String]
35
+ # @param event_id [String] The id of the paid event.
36
+ # @param [Hash] opts the optional parameters
37
+ # @option opts [String] :x_request_id This header identifies the call, if not passed it is self-generated. This ID is returned in the response.
38
+ # @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers
39
+ def disable_paid_notice_with_http_info(x_fiscal_code, event_id, opts = {})
40
+ if @api_client.config.debugging
41
+ @api_client.config.logger.debug 'Calling API: PaidNoticeRESTAPIsApi.disable_paid_notice ...'
42
+ end
43
+ # verify the required parameter 'x_fiscal_code' is set
44
+ if @api_client.config.client_side_validation && x_fiscal_code.nil?
45
+ fail ArgumentError, "Missing the required parameter 'x_fiscal_code' when calling PaidNoticeRESTAPIsApi.disable_paid_notice"
46
+ end
47
+ # verify the required parameter 'event_id' is set
48
+ if @api_client.config.client_side_validation && event_id.nil?
49
+ fail ArgumentError, "Missing the required parameter 'event_id' when calling PaidNoticeRESTAPIsApi.disable_paid_notice"
50
+ end
51
+ # resource path
52
+ local_var_path = '/paids/{event-id}/disable'.sub('{' + 'event-id' + '}', CGI.escape(event_id.to_s))
53
+
54
+ # query parameters
55
+ query_params = opts[:query_params] || {}
56
+
57
+ # header parameters
58
+ header_params = opts[:header_params] || {}
59
+ # HTTP header 'Accept' (if needed)
60
+ header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
61
+ header_params[:'x-fiscal-code'] = x_fiscal_code
62
+ header_params[:'X-Request-Id'] = opts[:'x_request_id'] if !opts[:'x_request_id'].nil?
63
+
64
+ # form parameters
65
+ form_params = opts[:form_params] || {}
66
+
67
+ # http body (model)
68
+ post_body = opts[:debug_body]
69
+
70
+ # return_type
71
+ return_type = opts[:debug_return_type]
72
+
73
+ # auth_names
74
+ auth_names = opts[:debug_auth_names] || ['ApiKey']
75
+
76
+ new_options = opts.merge(
77
+ :operation => :"PaidNoticeRESTAPIsApi.disable_paid_notice",
78
+ :header_params => header_params,
79
+ :query_params => query_params,
80
+ :form_params => form_params,
81
+ :body => post_body,
82
+ :auth_names => auth_names,
83
+ :return_type => return_type
84
+ )
85
+
86
+ data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
87
+ if @api_client.config.debugging
88
+ @api_client.config.logger.debug "API called: PaidNoticeRESTAPIsApi#disable_paid_notice\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
89
+ end
90
+ return data, status_code, headers
91
+ end
92
+
93
+ # Retrieve the PDF receipt given event id.
94
+ # @param x_fiscal_code [String]
95
+ # @param event_id [String] The id of the paid event.
96
+ # @param [Hash] opts the optional parameters
97
+ # @option opts [String] :x_request_id This header identifies the call, if not passed it is self-generated. This ID is returned in the response.
98
+ # @return [File]
99
+ def generate_pdf(x_fiscal_code, event_id, opts = {})
100
+ data, _status_code, _headers = generate_pdf_with_http_info(x_fiscal_code, event_id, opts)
101
+ data
102
+ end
103
+
104
+ # Retrieve the PDF receipt given event id.
105
+ # @param x_fiscal_code [String]
106
+ # @param event_id [String] The id of the paid event.
107
+ # @param [Hash] opts the optional parameters
108
+ # @option opts [String] :x_request_id This header identifies the call, if not passed it is self-generated. This ID is returned in the response.
109
+ # @return [Array<(File, Integer, Hash)>] File data, response status code and response headers
110
+ def generate_pdf_with_http_info(x_fiscal_code, event_id, opts = {})
111
+ if @api_client.config.debugging
112
+ @api_client.config.logger.debug 'Calling API: PaidNoticeRESTAPIsApi.generate_pdf ...'
113
+ end
114
+ # verify the required parameter 'x_fiscal_code' is set
115
+ if @api_client.config.client_side_validation && x_fiscal_code.nil?
116
+ fail ArgumentError, "Missing the required parameter 'x_fiscal_code' when calling PaidNoticeRESTAPIsApi.generate_pdf"
117
+ end
118
+ # verify the required parameter 'event_id' is set
119
+ if @api_client.config.client_side_validation && event_id.nil?
120
+ fail ArgumentError, "Missing the required parameter 'event_id' when calling PaidNoticeRESTAPIsApi.generate_pdf"
121
+ end
122
+ # resource path
123
+ local_var_path = '/paids/{event-id}/pdf'.sub('{' + 'event-id' + '}', CGI.escape(event_id.to_s))
124
+
125
+ # query parameters
126
+ query_params = opts[:query_params] || {}
127
+
128
+ # header parameters
129
+ header_params = opts[:header_params] || {}
130
+ # HTTP header 'Accept' (if needed)
131
+ header_params['Accept'] = @api_client.select_header_accept(['application/pdf', 'application/json']) unless header_params['Accept']
132
+ header_params[:'x-fiscal-code'] = x_fiscal_code
133
+ header_params[:'X-Request-Id'] = opts[:'x_request_id'] if !opts[:'x_request_id'].nil?
134
+
135
+ # form parameters
136
+ form_params = opts[:form_params] || {}
137
+
138
+ # http body (model)
139
+ post_body = opts[:debug_body]
140
+
141
+ # return_type
142
+ return_type = opts[:debug_return_type] || 'File'
143
+
144
+ # auth_names
145
+ auth_names = opts[:debug_auth_names] || ['ApiKey']
146
+
147
+ new_options = opts.merge(
148
+ :operation => :"PaidNoticeRESTAPIsApi.generate_pdf",
149
+ :header_params => header_params,
150
+ :query_params => query_params,
151
+ :form_params => form_params,
152
+ :body => post_body,
153
+ :auth_names => auth_names,
154
+ :return_type => return_type
155
+ )
156
+
157
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
158
+ if @api_client.config.debugging
159
+ @api_client.config.logger.debug "API called: PaidNoticeRESTAPIsApi#generate_pdf\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
160
+ end
161
+ return data, status_code, headers
162
+ end
163
+
164
+ # Retrieve the paid notice details given its id.
165
+ # @param x_fiscal_code [String]
166
+ # @param event_id [String] The id of the paid event.
167
+ # @param [Hash] opts the optional parameters
168
+ # @option opts [String] :x_request_id This header identifies the call, if not passed it is self-generated. This ID is returned in the response.
169
+ # @return [NoticeDetailResponse]
170
+ def get_paid_notice_detail(x_fiscal_code, event_id, opts = {})
171
+ data, _status_code, _headers = get_paid_notice_detail_with_http_info(x_fiscal_code, event_id, opts)
172
+ data
173
+ end
174
+
175
+ # Retrieve the paid notice details given its id.
176
+ # @param x_fiscal_code [String]
177
+ # @param event_id [String] The id of the paid event.
178
+ # @param [Hash] opts the optional parameters
179
+ # @option opts [String] :x_request_id This header identifies the call, if not passed it is self-generated. This ID is returned in the response.
180
+ # @return [Array<(NoticeDetailResponse, Integer, Hash)>] NoticeDetailResponse data, response status code and response headers
181
+ def get_paid_notice_detail_with_http_info(x_fiscal_code, event_id, opts = {})
182
+ if @api_client.config.debugging
183
+ @api_client.config.logger.debug 'Calling API: PaidNoticeRESTAPIsApi.get_paid_notice_detail ...'
184
+ end
185
+ # verify the required parameter 'x_fiscal_code' is set
186
+ if @api_client.config.client_side_validation && x_fiscal_code.nil?
187
+ fail ArgumentError, "Missing the required parameter 'x_fiscal_code' when calling PaidNoticeRESTAPIsApi.get_paid_notice_detail"
188
+ end
189
+ # verify the required parameter 'event_id' is set
190
+ if @api_client.config.client_side_validation && event_id.nil?
191
+ fail ArgumentError, "Missing the required parameter 'event_id' when calling PaidNoticeRESTAPIsApi.get_paid_notice_detail"
192
+ end
193
+ # resource path
194
+ local_var_path = '/paids/{event-id}'.sub('{' + 'event-id' + '}', CGI.escape(event_id.to_s))
195
+
196
+ # query parameters
197
+ query_params = opts[:query_params] || {}
198
+
199
+ # header parameters
200
+ header_params = opts[:header_params] || {}
201
+ # HTTP header 'Accept' (if needed)
202
+ header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
203
+ header_params[:'x-fiscal-code'] = x_fiscal_code
204
+ header_params[:'X-Request-Id'] = opts[:'x_request_id'] if !opts[:'x_request_id'].nil?
205
+
206
+ # form parameters
207
+ form_params = opts[:form_params] || {}
208
+
209
+ # http body (model)
210
+ post_body = opts[:debug_body]
211
+
212
+ # return_type
213
+ return_type = opts[:debug_return_type] || 'NoticeDetailResponse'
214
+
215
+ # auth_names
216
+ auth_names = opts[:debug_auth_names] || ['ApiKey']
217
+
218
+ new_options = opts.merge(
219
+ :operation => :"PaidNoticeRESTAPIsApi.get_paid_notice_detail",
220
+ :header_params => header_params,
221
+ :query_params => query_params,
222
+ :form_params => form_params,
223
+ :body => post_body,
224
+ :auth_names => auth_names,
225
+ :return_type => return_type
226
+ )
227
+
228
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
229
+ if @api_client.config.debugging
230
+ @api_client.config.logger.debug "API called: PaidNoticeRESTAPIsApi#get_paid_notice_detail\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
231
+ end
232
+ return data, status_code, headers
233
+ end
234
+
235
+ # Retrieve the paged transaction list from biz events.
236
+ # This operation is deprecated. Use Paid Notice APIs instead
237
+ # @param x_fiscal_code [String]
238
+ # @param [Hash] opts the optional parameters
239
+ # @option opts [String] :x_request_id This header identifies the call, if not passed it is self-generated. This ID is returned in the response.
240
+ # @option opts [String] :x_continuation_token
241
+ # @option opts [Integer] :size (default to 10)
242
+ # @option opts [Boolean] :is_payer Filter by payer
243
+ # @option opts [Boolean] :is_debtor Filter by debtor
244
+ # @option opts [String] :orderby Order by TRANSACTION_DATE (default to 'TRANSACTION_DATE')
245
+ # @option opts [String] :ordering Direction of ordering (default to 'DESC')
246
+ # @return [NoticeListWrapResponse]
247
+ def get_paid_notices(x_fiscal_code, opts = {})
248
+ data, _status_code, _headers = get_paid_notices_with_http_info(x_fiscal_code, opts)
249
+ data
250
+ end
251
+
252
+ # Retrieve the paged transaction list from biz events.
253
+ # This operation is deprecated. Use Paid Notice APIs instead
254
+ # @param x_fiscal_code [String]
255
+ # @param [Hash] opts the optional parameters
256
+ # @option opts [String] :x_request_id This header identifies the call, if not passed it is self-generated. This ID is returned in the response.
257
+ # @option opts [String] :x_continuation_token
258
+ # @option opts [Integer] :size (default to 10)
259
+ # @option opts [Boolean] :is_payer Filter by payer
260
+ # @option opts [Boolean] :is_debtor Filter by debtor
261
+ # @option opts [String] :orderby Order by TRANSACTION_DATE (default to 'TRANSACTION_DATE')
262
+ # @option opts [String] :ordering Direction of ordering (default to 'DESC')
263
+ # @return [Array<(NoticeListWrapResponse, Integer, Hash)>] NoticeListWrapResponse data, response status code and response headers
264
+ def get_paid_notices_with_http_info(x_fiscal_code, opts = {})
265
+ if @api_client.config.debugging
266
+ @api_client.config.logger.debug 'Calling API: PaidNoticeRESTAPIsApi.get_paid_notices ...'
267
+ end
268
+ # verify the required parameter 'x_fiscal_code' is set
269
+ if @api_client.config.client_side_validation && x_fiscal_code.nil?
270
+ fail ArgumentError, "Missing the required parameter 'x_fiscal_code' when calling PaidNoticeRESTAPIsApi.get_paid_notices"
271
+ end
272
+ allowable_values = ["TRANSACTION_DATE"]
273
+ if @api_client.config.client_side_validation && opts[:'orderby'] && !allowable_values.include?(opts[:'orderby'])
274
+ fail ArgumentError, "invalid value for \"orderby\", must be one of #{allowable_values}"
275
+ end
276
+ allowable_values = ["ASC", "DESC"]
277
+ if @api_client.config.client_side_validation && opts[:'ordering'] && !allowable_values.include?(opts[:'ordering'])
278
+ fail ArgumentError, "invalid value for \"ordering\", must be one of #{allowable_values}"
279
+ end
280
+ # resource path
281
+ local_var_path = '/paids'
282
+
283
+ # query parameters
284
+ query_params = opts[:query_params] || {}
285
+ query_params[:'size'] = opts[:'size'] if !opts[:'size'].nil?
286
+ query_params[:'is_payer'] = opts[:'is_payer'] if !opts[:'is_payer'].nil?
287
+ query_params[:'is_debtor'] = opts[:'is_debtor'] if !opts[:'is_debtor'].nil?
288
+ query_params[:'orderby'] = opts[:'orderby'] if !opts[:'orderby'].nil?
289
+ query_params[:'ordering'] = opts[:'ordering'] if !opts[:'ordering'].nil?
290
+
291
+ # header parameters
292
+ header_params = opts[:header_params] || {}
293
+ # HTTP header 'Accept' (if needed)
294
+ header_params['Accept'] = @api_client.select_header_accept(['application/json', '*/*']) unless header_params['Accept']
295
+ header_params[:'x-fiscal-code'] = x_fiscal_code
296
+ header_params[:'X-Request-Id'] = opts[:'x_request_id'] if !opts[:'x_request_id'].nil?
297
+ header_params[:'x-continuation-token'] = opts[:'x_continuation_token'] if !opts[:'x_continuation_token'].nil?
298
+
299
+ # form parameters
300
+ form_params = opts[:form_params] || {}
301
+
302
+ # http body (model)
303
+ post_body = opts[:debug_body]
304
+
305
+ # return_type
306
+ return_type = opts[:debug_return_type] || 'NoticeListWrapResponse'
307
+
308
+ # auth_names
309
+ auth_names = opts[:debug_auth_names] || ['ApiKey']
310
+
311
+ new_options = opts.merge(
312
+ :operation => :"PaidNoticeRESTAPIsApi.get_paid_notices",
313
+ :header_params => header_params,
314
+ :query_params => query_params,
315
+ :form_params => form_params,
316
+ :body => post_body,
317
+ :auth_names => auth_names,
318
+ :return_type => return_type
319
+ )
320
+
321
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
322
+ if @api_client.config.debugging
323
+ @api_client.config.logger.debug "API called: PaidNoticeRESTAPIsApi#get_paid_notices\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
324
+ end
325
+ return data, status_code, headers
326
+ end
327
+ end
328
+ end