worldpay-apimatic-sdk 0.0.1__py3-none-any.whl

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 (82) hide show
  1. reportingauthorizationsummaryapi/__init__.py +13 -0
  2. reportingauthorizationsummaryapi/api_helper.py +19 -0
  3. reportingauthorizationsummaryapi/apis/__init__.py +6 -0
  4. reportingauthorizationsummaryapi/apis/authorizations_api.py +496 -0
  5. reportingauthorizationsummaryapi/apis/base_api.py +72 -0
  6. reportingauthorizationsummaryapi/configuration.py +253 -0
  7. reportingauthorizationsummaryapi/exceptions/__init__.py +13 -0
  8. reportingauthorizationsummaryapi/exceptions/api_exception.py +36 -0
  9. reportingauthorizationsummaryapi/exceptions/authorizations_summary_0_error_exception.py +66 -0
  10. reportingauthorizationsummaryapi/exceptions/authorizations_summary_cardnetwork_0_error_exception.py +67 -0
  11. reportingauthorizationsummaryapi/exceptions/authorizations_summary_chain_0_error_exception.py +67 -0
  12. reportingauthorizationsummaryapi/exceptions/authorizations_summary_division_0_error_exception.py +67 -0
  13. reportingauthorizationsummaryapi/exceptions/authorizations_summary_merchant_0_error_exception.py +67 -0
  14. reportingauthorizationsummaryapi/exceptions/authorizations_summary_store_0_error_exception.py +67 -0
  15. reportingauthorizationsummaryapi/exceptions/authorizations_summary_superchain_0_error_exception.py +67 -0
  16. reportingauthorizationsummaryapi/exceptions/authorizations_summary_transactiondate_0_error_exception.py +67 -0
  17. reportingauthorizationsummaryapi/http/__init__.py +11 -0
  18. reportingauthorizationsummaryapi/http/api_response.py +67 -0
  19. reportingauthorizationsummaryapi/http/auth/__init__.py +5 -0
  20. reportingauthorizationsummaryapi/http/auth/custom_header_authentication.py +101 -0
  21. reportingauthorizationsummaryapi/http/http_call_back.py +20 -0
  22. reportingauthorizationsummaryapi/http/http_client_provider.py +23 -0
  23. reportingauthorizationsummaryapi/http/http_method_enum.py +25 -0
  24. reportingauthorizationsummaryapi/http/http_request.py +55 -0
  25. reportingauthorizationsummaryapi/http/http_response.py +45 -0
  26. reportingauthorizationsummaryapi/http/proxy_settings.py +50 -0
  27. reportingauthorizationsummaryapi/logging/__init__.py +6 -0
  28. reportingauthorizationsummaryapi/logging/configuration/__init__.py +5 -0
  29. reportingauthorizationsummaryapi/logging/configuration/api_logging_configuration.py +398 -0
  30. reportingauthorizationsummaryapi/logging/sdk_logger.py +28 -0
  31. reportingauthorizationsummaryapi/models/__init__.py +47 -0
  32. reportingauthorizationsummaryapi/models/auth_transactions_request.py +163 -0
  33. reportingauthorizationsummaryapi/models/auth_transactions_request_by_chain.py +189 -0
  34. reportingauthorizationsummaryapi/models/auth_transactions_request_by_division.py +189 -0
  35. reportingauthorizationsummaryapi/models/auth_transactions_request_by_store.py +189 -0
  36. reportingauthorizationsummaryapi/models/auth_transactions_request_by_super_chain.py +189 -0
  37. reportingauthorizationsummaryapi/models/auth_transactions_summary_request_by_card_network.py +189 -0
  38. reportingauthorizationsummaryapi/models/auth_transactions_summary_request_by_merchant.py +189 -0
  39. reportingauthorizationsummaryapi/models/auth_transactions_summary_request_by_transaction_date.py +189 -0
  40. reportingauthorizationsummaryapi/models/authorizations_summary_cardnetwork_response.py +376 -0
  41. reportingauthorizationsummaryapi/models/authorizations_summary_transactiondate_response.py +376 -0
  42. reportingauthorizationsummaryapi/models/card_network_type.py +67 -0
  43. reportingauthorizationsummaryapi/models/code_and_description.py +151 -0
  44. reportingauthorizationsummaryapi/models/common_summary_detail.py +270 -0
  45. reportingauthorizationsummaryapi/models/common_summary_responses.py +346 -0
  46. reportingauthorizationsummaryapi/models/date_range.py +105 -0
  47. reportingauthorizationsummaryapi/models/date_range_type.py +110 -0
  48. reportingauthorizationsummaryapi/models/entity.py +156 -0
  49. reportingauthorizationsummaryapi/models/entity_division_response.py +136 -0
  50. reportingauthorizationsummaryapi/models/entity_store_response.py +138 -0
  51. reportingauthorizationsummaryapi/models/error.py +153 -0
  52. reportingauthorizationsummaryapi/models/error_response.py +112 -0
  53. reportingauthorizationsummaryapi/models/level.py +69 -0
  54. reportingauthorizationsummaryapi/models/pagination.py +128 -0
  55. reportingauthorizationsummaryapi/models/pagination_response.py +175 -0
  56. reportingauthorizationsummaryapi/models/pagination_type.py +130 -0
  57. reportingauthorizationsummaryapi/models/summary.py +322 -0
  58. reportingauthorizationsummaryapi/models/summary_1.py +294 -0
  59. reportingauthorizationsummaryapi/models/summary_2.py +326 -0
  60. reportingauthorizationsummaryapi/models/summary_3.py +324 -0
  61. reportingauthorizationsummaryapi/models/summary_4.py +296 -0
  62. reportingauthorizationsummaryapi/models/summary_5.py +297 -0
  63. reportingauthorizationsummaryapi/models/summary_6.py +294 -0
  64. reportingauthorizationsummaryapi/models/summary_card_network.py +378 -0
  65. reportingauthorizationsummaryapi/models/summary_detail_chain.py +376 -0
  66. reportingauthorizationsummaryapi/models/summary_detail_division.py +376 -0
  67. reportingauthorizationsummaryapi/models/summary_detail_entity_chain.py +109 -0
  68. reportingauthorizationsummaryapi/models/summary_detail_entity_entity.py +108 -0
  69. reportingauthorizationsummaryapi/models/summary_detail_entity_super_chain.py +106 -0
  70. reportingauthorizationsummaryapi/models/summary_detail_merchant.py +376 -0
  71. reportingauthorizationsummaryapi/models/summary_detail_store.py +376 -0
  72. reportingauthorizationsummaryapi/models/summary_detail_super_chain.py +376 -0
  73. reportingauthorizationsummaryapi/models/summary_responses.py +318 -0
  74. reportingauthorizationsummaryapi/models/summary_transaction_date.py +378 -0
  75. reportingauthorizationsummaryapi/reportingauthorizationsummaryapi_client.py +79 -0
  76. reportingauthorizationsummaryapi/utilities/__init__.py +6 -0
  77. reportingauthorizationsummaryapi/utilities/file_wrapper.py +45 -0
  78. worldpay_apimatic_sdk-0.0.1.dist-info/METADATA +132 -0
  79. worldpay_apimatic_sdk-0.0.1.dist-info/RECORD +82 -0
  80. worldpay_apimatic_sdk-0.0.1.dist-info/WHEEL +5 -0
  81. worldpay_apimatic_sdk-0.0.1.dist-info/licenses/LICENSE +28 -0
  82. worldpay_apimatic_sdk-0.0.1.dist-info/top_level.txt +1 -0
@@ -0,0 +1,13 @@
1
+ # ruff: noqa: D104 | Missing docstring in public package
2
+ # ruff: noqa: RUF022 | `__all__` is not sorted
3
+ __all__ = [
4
+ "api_helper",
5
+ "apis",
6
+ "configuration",
7
+ "exceptions",
8
+ "http",
9
+ "logging",
10
+ "models",
11
+ "reportingauthorizationsummaryapi_client",
12
+ "utilities",
13
+ ]
@@ -0,0 +1,19 @@
1
+ """
2
+ reportingauthorizationsummaryapi
3
+
4
+ This file was automatically generated by APIMATIC v3.0 (
5
+ https://www.apimatic.io ).
6
+ """
7
+
8
+ from apimatic_core.utilities.api_helper import ApiHelper as CoreApiHelper
9
+
10
+
11
+ class APIHelper(CoreApiHelper):
12
+ """
13
+ A Helper Class for various functions associated with API Calls.
14
+
15
+ This class contains static methods for operations that need to be
16
+ performed during API requests. All of the methods inside this class are
17
+ static methods, there is no need to ever initialise an instance of this
18
+ class.
19
+ """
@@ -0,0 +1,6 @@
1
+ # ruff: noqa: D104 | Missing docstring in public package
2
+ # ruff: noqa: RUF022 | `__all__` is not sorted
3
+ __all__ = [
4
+ "authorizations_api",
5
+ "base_api",
6
+ ]
@@ -0,0 +1,496 @@
1
+ """reportingauthorizationsummaryapi.
2
+
3
+ This file was automatically generated by APIMATIC v3.0 ( https://www.apimatic.io ).
4
+ """
5
+
6
+ # ruff: noqa: D410, E501, E101, D206
7
+ from apimatic_core.authentication.multiple.single_auth import (
8
+ Single,
9
+ )
10
+ from apimatic_core.request_builder import RequestBuilder
11
+ from apimatic_core.response_handler import ResponseHandler
12
+ from apimatic_core.types.parameter import Parameter
13
+
14
+ from reportingauthorizationsummaryapi.api_helper import (
15
+ APIHelper,
16
+ )
17
+ from reportingauthorizationsummaryapi.apis.base_api import (
18
+ BaseApi,
19
+ )
20
+ from reportingauthorizationsummaryapi.configuration import (
21
+ Server,
22
+ )
23
+ from reportingauthorizationsummaryapi.exceptions.authorizations_summary_0_error_exception import ( # noqa: E501
24
+ AuthorizationsSummary0ErrorException,
25
+ )
26
+ from reportingauthorizationsummaryapi.exceptions.authorizations_summary_cardnetwork_0_error_exception import ( # noqa: E501
27
+ AuthorizationsSummaryCardnetwork0ErrorException,
28
+ )
29
+ from reportingauthorizationsummaryapi.exceptions.authorizations_summary_chain_0_error_exception import ( # noqa: E501
30
+ AuthorizationsSummaryChain0ErrorException,
31
+ )
32
+ from reportingauthorizationsummaryapi.exceptions.authorizations_summary_division_0_error_exception import ( # noqa: E501
33
+ AuthorizationsSummaryDivision0ErrorException,
34
+ )
35
+ from reportingauthorizationsummaryapi.exceptions.authorizations_summary_merchant_0_error_exception import ( # noqa: E501
36
+ AuthorizationsSummaryMerchant0ErrorException,
37
+ )
38
+ from reportingauthorizationsummaryapi.exceptions.authorizations_summary_store_0_error_exception import ( # noqa: E501
39
+ AuthorizationsSummaryStore0ErrorException,
40
+ )
41
+ from reportingauthorizationsummaryapi.exceptions.authorizations_summary_superchain_0_error_exception import ( # noqa: E501
42
+ AuthorizationsSummarySuperchain0ErrorException,
43
+ )
44
+ from reportingauthorizationsummaryapi.exceptions.authorizations_summary_transactiondate_0_error_exception import ( # noqa: E501
45
+ AuthorizationsSummaryTransactiondate0ErrorException,
46
+ )
47
+ from reportingauthorizationsummaryapi.http.http_method_enum import (
48
+ HttpMethodEnum,
49
+ )
50
+ from reportingauthorizationsummaryapi.models.authorizations_summary_cardnetwork_response import ( # noqa: E501
51
+ AuthorizationsSummaryCardnetworkResponse,
52
+ )
53
+ from reportingauthorizationsummaryapi.models.authorizations_summary_transactiondate_response import ( # noqa: E501
54
+ AuthorizationsSummaryTransactiondateResponse,
55
+ )
56
+ from reportingauthorizationsummaryapi.models.summary_detail_chain import (
57
+ SummaryDetailChain,
58
+ )
59
+ from reportingauthorizationsummaryapi.models.summary_detail_division import (
60
+ SummaryDetailDivision,
61
+ )
62
+ from reportingauthorizationsummaryapi.models.summary_detail_merchant import (
63
+ SummaryDetailMerchant,
64
+ )
65
+ from reportingauthorizationsummaryapi.models.summary_detail_store import (
66
+ SummaryDetailStore,
67
+ )
68
+ from reportingauthorizationsummaryapi.models.summary_detail_super_chain import (
69
+ SummaryDetailSuperChain,
70
+ )
71
+ from reportingauthorizationsummaryapi.models.summary_responses import (
72
+ SummaryResponses,
73
+ )
74
+
75
+
76
+ class AuthorizationsApi(BaseApi):
77
+ """A Controller to access Endpoints in the reportingauthorizationsummaryapi API."""
78
+
79
+ def __init__(self, config):
80
+ """Initialize AuthorizationsApi object."""
81
+ super(AuthorizationsApi, self).__init__(config)
82
+
83
+ def get_authorizations_summary(self,
84
+ body,
85
+ v_correlation_id=None):
86
+ """Perform a POST request to /authorizations/summary.
87
+
88
+ Resource to get the total summary of authorizations for a given hierarchy and
89
+ date range with card type and card network being optional parameters. Refer
90
+ to the schema object for the allowed hierarchies and specifications.
91
+
92
+ Args:
93
+ body (AuthTransactionsRequest): The request body parameter.
94
+ v_correlation_id (uuid|str, optional): Correlation Id
95
+
96
+ Returns:
97
+ ApiResponse: An object with the response value as well as other useful
98
+ information such as status codes and headers. OK
99
+
100
+ Raises:
101
+ ApiException: When an error occurs while fetching the data from the
102
+ remote API. This exception includes the HTTP Response code, an error
103
+ message, and the HTTP body that was received in the request.
104
+
105
+ """
106
+ return super().new_api_call_builder.request(
107
+ RequestBuilder().server(Server.DEFAULT)
108
+ .path("/authorizations/summary")
109
+ .http_method(HttpMethodEnum.POST)
110
+ .header_param(Parameter()
111
+ .key("Content-Type")
112
+ .value("application/json"))
113
+ .body_param(Parameter()
114
+ .value(body)
115
+ .is_required(True))
116
+ .header_param(Parameter()
117
+ .key("v-correlation-id")
118
+ .value(v_correlation_id))
119
+ .header_param(Parameter()
120
+ .key("accept")
121
+ .value("application/json"))
122
+ .body_serializer(APIHelper.json_serialize)
123
+ .auth(Single("api_key")),
124
+ ).response(
125
+ ResponseHandler()
126
+ .deserializer(APIHelper.json_deserialize)
127
+ .deserialize_into(SummaryResponses.from_dictionary)
128
+ .is_api_response(True)
129
+ .local_error("default",
130
+ "Default errors",
131
+ AuthorizationsSummary0ErrorException),
132
+ ).execute()
133
+
134
+ def get_authorizations_summary_by_card_network(self,
135
+ v_correlation_id=None,
136
+ body=None):
137
+ """Perform a POST request to /authorizations/summary/cardnetwork.
138
+
139
+ Resource to get the summary of authorizations grouped by card networks for a
140
+ given hierarchy and date range with card type and card network being optional
141
+ parameters. Refer to the schema object for the allowed hierarchies and
142
+ specifications.
143
+
144
+ Args:
145
+ v_correlation_id (uuid|str, optional): Correlation Id
146
+ body (AuthTransactionsSummaryRequestByCardNetwork, optional): The request
147
+ body parameter.
148
+
149
+ Returns:
150
+ ApiResponse: An object with the response value as well as other useful
151
+ information such as status codes and headers. OK
152
+
153
+ Raises:
154
+ ApiException: When an error occurs while fetching the data from the
155
+ remote API. This exception includes the HTTP Response code, an error
156
+ message, and the HTTP body that was received in the request.
157
+
158
+ """
159
+ return super().new_api_call_builder.request(
160
+ RequestBuilder().server(Server.DEFAULT)
161
+ .path("/authorizations/summary/cardnetwork")
162
+ .http_method(HttpMethodEnum.POST)
163
+ .header_param(Parameter()
164
+ .key("Content-Type")
165
+ .value("application/json"))
166
+ .header_param(Parameter()
167
+ .key("v-correlation-id")
168
+ .value(v_correlation_id))
169
+ .body_param(Parameter()
170
+ .value(body))
171
+ .header_param(Parameter()
172
+ .key("accept")
173
+ .value("application/json"))
174
+ .body_serializer(APIHelper.json_serialize)
175
+ .auth(Single("api_key")),
176
+ ).response(
177
+ ResponseHandler()
178
+ .deserializer(APIHelper.json_deserialize)
179
+ .deserialize_into(AuthorizationsSummaryCardnetworkResponse.from_dictionary)
180
+ .is_api_response(True)
181
+ .local_error("default",
182
+ "Default errors",
183
+ AuthorizationsSummaryCardnetwork0ErrorException),
184
+ ).execute()
185
+
186
+ def get_authorizations_summaryby_transaction_date(self,
187
+ v_correlation_id=None,
188
+ body=None):
189
+ """Perform a POST request to /authorizations/summary/transactiondate.
190
+
191
+ Resource to get the summary of authorizations grouped by transaction dates
192
+ for a given hierarchy and date range with card type and card network being
193
+ optional parameters. Refer to the schema object for the allowed hierarchies
194
+ and specifications.
195
+
196
+ Args:
197
+ v_correlation_id (uuid|str, optional): Correlation Id
198
+ body (AuthTransactionsSummaryRequestByTransactionDate, optional): The
199
+ request body parameter.
200
+
201
+ Returns:
202
+ ApiResponse: An object with the response value as well as other useful
203
+ information such as status codes and headers. OK
204
+
205
+ Raises:
206
+ ApiException: When an error occurs while fetching the data from the
207
+ remote API. This exception includes the HTTP Response code, an error
208
+ message, and the HTTP body that was received in the request.
209
+
210
+ """
211
+ return super().new_api_call_builder.request(
212
+ RequestBuilder().server(Server.DEFAULT)
213
+ .path("/authorizations/summary/transactiondate")
214
+ .http_method(HttpMethodEnum.POST)
215
+ .header_param(Parameter()
216
+ .key("Content-Type")
217
+ .value("application/json"))
218
+ .header_param(Parameter()
219
+ .key("v-correlation-id")
220
+ .value(v_correlation_id))
221
+ .body_param(Parameter()
222
+ .value(body))
223
+ .header_param(Parameter()
224
+ .key("accept")
225
+ .value("application/json"))
226
+ .body_serializer(APIHelper.json_serialize)
227
+ .auth(Single("api_key")),
228
+ ).response(
229
+ ResponseHandler()
230
+ .deserializer(APIHelper.json_deserialize)
231
+ .deserialize_into(AuthorizationsSummaryTransactiondateResponse.from_dictionary)
232
+ .is_api_response(True)
233
+ .local_error("default",
234
+ "Default errors",
235
+ AuthorizationsSummaryTransactiondate0ErrorException),
236
+ ).execute()
237
+
238
+ def get_authorizations_summaryby_merchant(self,
239
+ v_correlation_id=None,
240
+ body=None):
241
+ """Perform a POST request to /authorizations/summary/merchant.
242
+
243
+ Resource to get the summary of authorizations for given parameters grouped by
244
+ merchants for a given hierarchy and date range with card type and card
245
+ network being optional parameters. Refer to the schema object for the allowed
246
+ hierarchies and specifications.
247
+
248
+ Args:
249
+ v_correlation_id (uuid|str, optional): Correlation Id
250
+ body (AuthTransactionsSummaryRequestByMerchant, optional): The request
251
+ body parameter.
252
+
253
+ Returns:
254
+ ApiResponse: An object with the response value as well as other useful
255
+ information such as status codes and headers. OK
256
+
257
+ Raises:
258
+ ApiException: When an error occurs while fetching the data from the
259
+ remote API. This exception includes the HTTP Response code, an error
260
+ message, and the HTTP body that was received in the request.
261
+
262
+ """
263
+ return super().new_api_call_builder.request(
264
+ RequestBuilder().server(Server.DEFAULT)
265
+ .path("/authorizations/summary/merchant")
266
+ .http_method(HttpMethodEnum.POST)
267
+ .header_param(Parameter()
268
+ .key("Content-Type")
269
+ .value("application/json"))
270
+ .header_param(Parameter()
271
+ .key("v-correlation-id")
272
+ .value(v_correlation_id))
273
+ .body_param(Parameter()
274
+ .value(body))
275
+ .header_param(Parameter()
276
+ .key("accept")
277
+ .value("application/json"))
278
+ .body_serializer(APIHelper.json_serialize)
279
+ .auth(Single("api_key")),
280
+ ).response(
281
+ ResponseHandler()
282
+ .deserializer(APIHelper.json_deserialize)
283
+ .deserialize_into(SummaryDetailMerchant.from_dictionary)
284
+ .is_api_response(True)
285
+ .local_error("default",
286
+ "Default errors",
287
+ AuthorizationsSummaryMerchant0ErrorException),
288
+ ).execute()
289
+
290
+ def get_authorizations_summaryby_division(self,
291
+ v_correlation_id=None,
292
+ body=None):
293
+ """Perform a POST request to /authorizations/summary/division.
294
+
295
+ Resource to get the summary of authorizations grouped by divisions for a
296
+ given hierarchy and date range with card type and card network being optional
297
+ parameters. Refer to the schema object for the allowed hierarchies and
298
+ specifications.
299
+
300
+ Args:
301
+ v_correlation_id (uuid|str, optional): Correlation Id
302
+ body (AuthTransactionsRequestByDivision, optional): The request body
303
+ parameter.
304
+
305
+ Returns:
306
+ ApiResponse: An object with the response value as well as other useful
307
+ information such as status codes and headers. OK
308
+
309
+ Raises:
310
+ ApiException: When an error occurs while fetching the data from the
311
+ remote API. This exception includes the HTTP Response code, an error
312
+ message, and the HTTP body that was received in the request.
313
+
314
+ """
315
+ return super().new_api_call_builder.request(
316
+ RequestBuilder().server(Server.DEFAULT)
317
+ .path("/authorizations/summary/division")
318
+ .http_method(HttpMethodEnum.POST)
319
+ .header_param(Parameter()
320
+ .key("Content-Type")
321
+ .value("application/json"))
322
+ .header_param(Parameter()
323
+ .key("v-correlation-id")
324
+ .value(v_correlation_id))
325
+ .body_param(Parameter()
326
+ .value(body))
327
+ .header_param(Parameter()
328
+ .key("accept")
329
+ .value("application/json"))
330
+ .body_serializer(APIHelper.json_serialize)
331
+ .auth(Single("api_key")),
332
+ ).response(
333
+ ResponseHandler()
334
+ .deserializer(APIHelper.json_deserialize)
335
+ .deserialize_into(SummaryDetailDivision.from_dictionary)
336
+ .is_api_response(True)
337
+ .local_error("default",
338
+ "Default errors",
339
+ AuthorizationsSummaryDivision0ErrorException),
340
+ ).execute()
341
+
342
+ def get_authorizations_summaryby_store(self,
343
+ v_correlation_id=None,
344
+ body=None):
345
+ """Perform a POST request to /authorizations/summary/store.
346
+
347
+ Resource to get the summary of authorizations grouped by stores for a given
348
+ hierarchy and date range with card type and card network being optional
349
+ parameters. Refer to the schema object for the allowed hierarchies and
350
+ specifications.
351
+
352
+ Args:
353
+ v_correlation_id (uuid|str, optional): Correlation Id
354
+ body (AuthTransactionsRequestByStore, optional): The request body
355
+ parameter.
356
+
357
+ Returns:
358
+ ApiResponse: An object with the response value as well as other useful
359
+ information such as status codes and headers. OK
360
+
361
+ Raises:
362
+ ApiException: When an error occurs while fetching the data from the
363
+ remote API. This exception includes the HTTP Response code, an error
364
+ message, and the HTTP body that was received in the request.
365
+
366
+ """
367
+ return super().new_api_call_builder.request(
368
+ RequestBuilder().server(Server.DEFAULT)
369
+ .path("/authorizations/summary/store")
370
+ .http_method(HttpMethodEnum.POST)
371
+ .header_param(Parameter()
372
+ .key("Content-Type")
373
+ .value("application/json"))
374
+ .header_param(Parameter()
375
+ .key("v-correlation-id")
376
+ .value(v_correlation_id))
377
+ .body_param(Parameter()
378
+ .value(body))
379
+ .header_param(Parameter()
380
+ .key("accept")
381
+ .value("application/json"))
382
+ .body_serializer(APIHelper.json_serialize)
383
+ .auth(Single("api_key")),
384
+ ).response(
385
+ ResponseHandler()
386
+ .deserializer(APIHelper.json_deserialize)
387
+ .deserialize_into(SummaryDetailStore.from_dictionary)
388
+ .is_api_response(True)
389
+ .local_error("default",
390
+ "Default errors",
391
+ AuthorizationsSummaryStore0ErrorException),
392
+ ).execute()
393
+
394
+ def get_authorizations_summaryby_chain(self,
395
+ v_correlation_id=None,
396
+ body=None):
397
+ """Perform a POST request to /authorizations/summary/chain.
398
+
399
+ Resource to get the summary of authorizations grouped by chains for a given
400
+ hierarchy and date range with card type and card network being optional
401
+ parameters. Refer to the schema object for the allowed hierarchies and
402
+ specifications.
403
+
404
+ Args:
405
+ v_correlation_id (uuid|str, optional): Correlation Id
406
+ body (AuthTransactionsRequestByChain, optional): The request body
407
+ parameter.
408
+
409
+ Returns:
410
+ ApiResponse: An object with the response value as well as other useful
411
+ information such as status codes and headers. OK
412
+
413
+ Raises:
414
+ ApiException: When an error occurs while fetching the data from the
415
+ remote API. This exception includes the HTTP Response code, an error
416
+ message, and the HTTP body that was received in the request.
417
+
418
+ """
419
+ return super().new_api_call_builder.request(
420
+ RequestBuilder().server(Server.DEFAULT)
421
+ .path("/authorizations/summary/chain")
422
+ .http_method(HttpMethodEnum.POST)
423
+ .header_param(Parameter()
424
+ .key("Content-Type")
425
+ .value("application/json"))
426
+ .header_param(Parameter()
427
+ .key("v-correlation-id")
428
+ .value(v_correlation_id))
429
+ .body_param(Parameter()
430
+ .value(body))
431
+ .header_param(Parameter()
432
+ .key("accept")
433
+ .value("application/json"))
434
+ .body_serializer(APIHelper.json_serialize)
435
+ .auth(Single("api_key")),
436
+ ).response(
437
+ ResponseHandler()
438
+ .deserializer(APIHelper.json_deserialize)
439
+ .deserialize_into(SummaryDetailChain.from_dictionary)
440
+ .is_api_response(True)
441
+ .local_error("default",
442
+ "Default errors",
443
+ AuthorizationsSummaryChain0ErrorException),
444
+ ).execute()
445
+
446
+ def get_authorizations_summaryby_super_chain(self,
447
+ v_correlation_id=None,
448
+ body=None):
449
+ """Perform a POST request to /authorizations/summary/superchain.
450
+
451
+ Resource to get the summary of authorizations grouped by superchains for a
452
+ given hierarchy and date range with card type and card network being optional
453
+ parameters. Refer to the schema object for the allowed hierarchies and
454
+ specifications.
455
+
456
+ Args:
457
+ v_correlation_id (uuid|str, optional): Correlation Id
458
+ body (AuthTransactionsRequestBySuperChain, optional): The request body
459
+ parameter.
460
+
461
+ Returns:
462
+ ApiResponse: An object with the response value as well as other useful
463
+ information such as status codes and headers. OK
464
+
465
+ Raises:
466
+ ApiException: When an error occurs while fetching the data from the
467
+ remote API. This exception includes the HTTP Response code, an error
468
+ message, and the HTTP body that was received in the request.
469
+
470
+ """
471
+ return super().new_api_call_builder.request(
472
+ RequestBuilder().server(Server.DEFAULT)
473
+ .path("/authorizations/summary/superchain")
474
+ .http_method(HttpMethodEnum.POST)
475
+ .header_param(Parameter()
476
+ .key("Content-Type")
477
+ .value("application/json"))
478
+ .header_param(Parameter()
479
+ .key("v-correlation-id")
480
+ .value(v_correlation_id))
481
+ .body_param(Parameter()
482
+ .value(body))
483
+ .header_param(Parameter()
484
+ .key("accept")
485
+ .value("application/json"))
486
+ .body_serializer(APIHelper.json_serialize)
487
+ .auth(Single("api_key")),
488
+ ).response(
489
+ ResponseHandler()
490
+ .deserializer(APIHelper.json_deserialize)
491
+ .deserialize_into(SummaryDetailSuperChain.from_dictionary)
492
+ .is_api_response(True)
493
+ .local_error("default",
494
+ "Default errors",
495
+ AuthorizationsSummarySuperchain0ErrorException),
496
+ ).execute()
@@ -0,0 +1,72 @@
1
+ """reportingauthorizationsummaryapi.
2
+
3
+ This file was automatically generated by APIMATIC v3.0 ( https://www.apimatic.io ).
4
+ """
5
+
6
+ import platform
7
+
8
+ from apimatic_core.api_call import ApiCall
9
+ from apimatic_core.types.error_case import ErrorCase
10
+
11
+ from reportingauthorizationsummaryapi.exceptions.api_exception import (
12
+ ApiException,
13
+ )
14
+
15
+
16
+ class BaseApi(object):
17
+ """All controllers inherit from this base class.
18
+
19
+ Attributes:
20
+ config (Configuration): The HttpClient which a specific controller
21
+ instance will use. By default all the controller objects share
22
+ the same HttpClient. A user can use his own custom HttpClient
23
+ as well.
24
+ http_call_back (HttpCallBack): An object which holds call back
25
+ methods to be called before and after the execution of an HttpRequest.
26
+ new_api_call_builder (APICall): Returns the API Call builder instance.
27
+
28
+ """
29
+
30
+ @staticmethod
31
+ def user_agent():
32
+ """Return UserAgent value."""
33
+ return "Python-SDK/0.0.1 (OS: {os-info}, Engine: {engine}/{engine-version})"
34
+
35
+ @staticmethod
36
+ def user_agent_parameters():
37
+ """Return UserAgentParameters value."""
38
+ return {
39
+ "engine": {"value": platform.python_implementation(), "encode": False},
40
+ "engine-version": {"value": platform.python_version(), "encode": False},
41
+ "os-info": {"value": platform.system(), "encode": False},
42
+ }
43
+
44
+ @staticmethod
45
+ def global_errors():
46
+ """Return GlobalErrors value."""
47
+ return {
48
+ "default": ErrorCase()
49
+ .error_message("HTTP response not OK.")
50
+ .exception_type(ApiException),
51
+ }
52
+
53
+ def __init__(self, config):
54
+ """Initialize BaseApi object."""
55
+ self._config = config.get_http_client_configuration()
56
+ self._http_call_back = self.config.http_callback
57
+ self.api_call = ApiCall(config)
58
+
59
+ @property
60
+ def config(self):
61
+ """Return Configuration object."""
62
+ return self._config
63
+
64
+ @property
65
+ def http_call_back(self):
66
+ """Return HttpCallBack object."""
67
+ return self._http_call_back
68
+
69
+ @property
70
+ def new_api_call_builder(self):
71
+ """Return New ApiCallBuilder object."""
72
+ return self.api_call.new_builder