worldpay-apimatic-sdk 0.0.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 (75) hide show
  1. checksums.yaml +7 -0
  2. data/LICENSE +28 -0
  3. data/README.md +147 -0
  4. data/bin/console +15 -0
  5. data/lib/reporting_authorization_summary_api/api_helper.rb +10 -0
  6. data/lib/reporting_authorization_summary_api/apis/authorizations_api.rb +258 -0
  7. data/lib/reporting_authorization_summary_api/apis/base_api.rb +67 -0
  8. data/lib/reporting_authorization_summary_api/client.rb +75 -0
  9. data/lib/reporting_authorization_summary_api/configuration.rb +165 -0
  10. data/lib/reporting_authorization_summary_api/exceptions/api_exception.rb +21 -0
  11. data/lib/reporting_authorization_summary_api/exceptions/authorizations_summary0_error_exception.rb +55 -0
  12. data/lib/reporting_authorization_summary_api/exceptions/authorizations_summary_cardnetwork0_error_exception.rb +55 -0
  13. data/lib/reporting_authorization_summary_api/exceptions/authorizations_summary_chain0_error_exception.rb +55 -0
  14. data/lib/reporting_authorization_summary_api/exceptions/authorizations_summary_division0_error_exception.rb +55 -0
  15. data/lib/reporting_authorization_summary_api/exceptions/authorizations_summary_merchant0_error_exception.rb +55 -0
  16. data/lib/reporting_authorization_summary_api/exceptions/authorizations_summary_store0_error_exception.rb +55 -0
  17. data/lib/reporting_authorization_summary_api/exceptions/authorizations_summary_superchain0_error_exception.rb +55 -0
  18. data/lib/reporting_authorization_summary_api/exceptions/authorizations_summary_transactiondate0_error_exception.rb +55 -0
  19. data/lib/reporting_authorization_summary_api/http/api_response.rb +19 -0
  20. data/lib/reporting_authorization_summary_api/http/auth/custom_header_authentication.rb +52 -0
  21. data/lib/reporting_authorization_summary_api/http/http_call_back.rb +10 -0
  22. data/lib/reporting_authorization_summary_api/http/http_method_enum.rb +10 -0
  23. data/lib/reporting_authorization_summary_api/http/http_request.rb +10 -0
  24. data/lib/reporting_authorization_summary_api/http/http_response.rb +10 -0
  25. data/lib/reporting_authorization_summary_api/http/proxy_settings.rb +22 -0
  26. data/lib/reporting_authorization_summary_api/logging/configuration/api_logging_configuration.rb +186 -0
  27. data/lib/reporting_authorization_summary_api/logging/sdk_logger.rb +17 -0
  28. data/lib/reporting_authorization_summary_api/models/auth_transactions_request.rb +107 -0
  29. data/lib/reporting_authorization_summary_api/models/auth_transactions_request_by_chain.rb +116 -0
  30. data/lib/reporting_authorization_summary_api/models/auth_transactions_request_by_division.rb +116 -0
  31. data/lib/reporting_authorization_summary_api/models/auth_transactions_request_by_store.rb +116 -0
  32. data/lib/reporting_authorization_summary_api/models/auth_transactions_request_by_super_chain.rb +116 -0
  33. data/lib/reporting_authorization_summary_api/models/auth_transactions_summary_request_by_card_network.rb +116 -0
  34. data/lib/reporting_authorization_summary_api/models/auth_transactions_summary_request_by_merchant.rb +116 -0
  35. data/lib/reporting_authorization_summary_api/models/auth_transactions_summary_request_by_transaction_date.rb +116 -0
  36. data/lib/reporting_authorization_summary_api/models/authorizations_summary_cardnetwork_response.rb +233 -0
  37. data/lib/reporting_authorization_summary_api/models/authorizations_summary_transactiondate_response.rb +233 -0
  38. data/lib/reporting_authorization_summary_api/models/base_model.rb +110 -0
  39. data/lib/reporting_authorization_summary_api/models/card_network_type.rb +68 -0
  40. data/lib/reporting_authorization_summary_api/models/code_and_description.rb +98 -0
  41. data/lib/reporting_authorization_summary_api/models/common_summary_detail.rb +161 -0
  42. data/lib/reporting_authorization_summary_api/models/common_summary_responses.rb +213 -0
  43. data/lib/reporting_authorization_summary_api/models/date_range.rb +82 -0
  44. data/lib/reporting_authorization_summary_api/models/date_range_type.rb +85 -0
  45. data/lib/reporting_authorization_summary_api/models/entity.rb +99 -0
  46. data/lib/reporting_authorization_summary_api/models/entity_division_response.rb +94 -0
  47. data/lib/reporting_authorization_summary_api/models/entity_store_response.rb +95 -0
  48. data/lib/reporting_authorization_summary_api/models/error.rb +96 -0
  49. data/lib/reporting_authorization_summary_api/models/error_response.rb +84 -0
  50. data/lib/reporting_authorization_summary_api/models/level.rb +67 -0
  51. data/lib/reporting_authorization_summary_api/models/pagination.rb +87 -0
  52. data/lib/reporting_authorization_summary_api/models/pagination_response.rb +108 -0
  53. data/lib/reporting_authorization_summary_api/models/pagination_type.rb +87 -0
  54. data/lib/reporting_authorization_summary_api/models/summary.rb +183 -0
  55. data/lib/reporting_authorization_summary_api/models/summary1.rb +173 -0
  56. data/lib/reporting_authorization_summary_api/models/summary2.rb +190 -0
  57. data/lib/reporting_authorization_summary_api/models/summary3.rb +189 -0
  58. data/lib/reporting_authorization_summary_api/models/summary4.rb +174 -0
  59. data/lib/reporting_authorization_summary_api/models/summary5.rb +174 -0
  60. data/lib/reporting_authorization_summary_api/models/summary6.rb +173 -0
  61. data/lib/reporting_authorization_summary_api/models/summary_card_network.rb +233 -0
  62. data/lib/reporting_authorization_summary_api/models/summary_detail_chain.rb +233 -0
  63. data/lib/reporting_authorization_summary_api/models/summary_detail_division.rb +233 -0
  64. data/lib/reporting_authorization_summary_api/models/summary_detail_entity_chain.rb +79 -0
  65. data/lib/reporting_authorization_summary_api/models/summary_detail_entity_entity.rb +79 -0
  66. data/lib/reporting_authorization_summary_api/models/summary_detail_entity_super_chain.rb +78 -0
  67. data/lib/reporting_authorization_summary_api/models/summary_detail_merchant.rb +233 -0
  68. data/lib/reporting_authorization_summary_api/models/summary_detail_store.rb +233 -0
  69. data/lib/reporting_authorization_summary_api/models/summary_detail_super_chain.rb +233 -0
  70. data/lib/reporting_authorization_summary_api/models/summary_responses.rb +202 -0
  71. data/lib/reporting_authorization_summary_api/models/summary_transaction_date.rb +233 -0
  72. data/lib/reporting_authorization_summary_api/utilities/date_time_helper.rb +11 -0
  73. data/lib/reporting_authorization_summary_api/utilities/file_wrapper.rb +28 -0
  74. data/lib/reporting_authorization_summary_api.rb +132 -0
  75. metadata +158 -0
checksums.yaml ADDED
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA256:
3
+ metadata.gz: a2e92af2515910c8efab4b8077ddbd9865203a5dc8327194dd09663318bc3dfa
4
+ data.tar.gz: f42b06fd1d64ed92b739189c5547ecca5eb7d97910eeec8b2c3fdf1b912dcec6
5
+ SHA512:
6
+ metadata.gz: 037a0ad09247bbce11299ba3f53aad624ab364cc10036072a20456017319d75c0b2b574eff43fd763f11908bfbe262080a6f1af1c3052a13e6c73b80ef35f659
7
+ data.tar.gz: 98699d584553fa9f0cd8d4aef524d8180391c13b55235ce26b0febd24195e566dfbb887a099795d1978cc9f6150095377c6cd117f75c34bc0d45fdd851693394
data/LICENSE ADDED
@@ -0,0 +1,28 @@
1
+ License:
2
+ ========
3
+ The MIT License (MIT)
4
+ http://opensource.org/licenses/MIT
5
+
6
+ Copyright (c) 2014 - 2026 APIMATIC Limited
7
+
8
+ Permission is hereby granted, free of charge, to any person obtaining a copy
9
+ of this software and associated documentation files (the "Software"), to deal
10
+ in the Software without restriction, including without limitation the rights
11
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
12
+ copies of the Software, and to permit persons to whom the Software is
13
+ furnished to do so, subject to the following conditions:
14
+
15
+ The above copyright notice and this permission notice shall be included in
16
+ all copies or substantial portions of the Software.
17
+
18
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
19
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
20
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
21
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
22
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
23
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
24
+ THE SOFTWARE.
25
+
26
+ Trade Mark:
27
+ ==========
28
+ APIMATIC is a trade mark for APIMATIC Limited
data/README.md ADDED
@@ -0,0 +1,147 @@
1
+
2
+ # Getting Started with Reporting: Authorization Summary API
3
+
4
+ ## Introduction
5
+
6
+ Retrieves authorized summaries and supports group by operations.
7
+
8
+ ## Install the Package
9
+
10
+ Install the gem from the command line:
11
+
12
+ ```bash
13
+ gem install worldpay-apimatic-sdk -v 0.0.1
14
+ ```
15
+
16
+ Or add the gem to your Gemfile and run `bundle`:
17
+
18
+ ```ruby
19
+ gem 'worldpay-apimatic-sdk', '0.0.1'
20
+ ```
21
+
22
+ For additional gem details, see the [RubyGems page for the worldpay-apimatic-sdk gem](https://rubygems.org/gems/worldpay-apimatic-sdk/versions/0.0.1).
23
+
24
+ ## IRB Console Usage
25
+
26
+ You can explore the SDK interactively using IRB in two ways
27
+
28
+ ### 1. Use IRB with Installed Gem
29
+
30
+ Open your system terminal (Command Prompt, Git Bash or macOS Terminal) and type the following command to start the irb console.
31
+
32
+ ```bash
33
+ irb
34
+ ```
35
+
36
+ Now you can load the SDK in the IRB
37
+
38
+ ```ruby
39
+ require 'reporting_authorization_summary_api'
40
+ include ReportingAuthorizationSummaryApi
41
+ ```
42
+
43
+ ### 2. Use IRB within SDK
44
+
45
+ Open your system terminal (Command Prompt, Git Bash or macOS Terminal) and navigate to the root folder of SDK.
46
+
47
+ ```
48
+ cd path/to/reporting_authorization_summary_api
49
+ ```
50
+
51
+ Now you can start the preconfigured irb console by running the following command
52
+
53
+ ```bash
54
+ ruby bin/console
55
+ ```
56
+
57
+ **_Note:_** This automatically loads the SDK from lib/
58
+
59
+ ## Initialize the API Client
60
+
61
+ **_Note:_** Documentation for the client can be found [here.](https://www.github.com/sdks-io/worldpay-apimatic-ruby-sdk/tree/0.0.1/doc/client.md)
62
+
63
+ The following parameters are configurable for the API Client:
64
+
65
+ | Parameter | Type | Description |
66
+ | --- | --- | --- |
67
+ | connection | `Faraday::Connection` | The Faraday connection object passed by the SDK user for making requests |
68
+ | adapter | `Faraday::Adapter` | The Faraday adapter object passed by the SDK user for performing http requests |
69
+ | timeout | `Float` | The value to use for connection timeout. <br> **Default: 30** |
70
+ | max_retries | `Integer` | The number of times to retry an endpoint call if it fails. <br> **Default: 0** |
71
+ | retry_interval | `Float` | Pause in seconds between retries. <br> **Default: 1** |
72
+ | backoff_factor | `Float` | The amount to multiply each successive retry's interval amount by in order to provide backoff. <br> **Default: 2** |
73
+ | retry_statuses | `Array` | A list of HTTP statuses to retry. <br> **Default: [408, 413, 429, 500, 502, 503, 504, 521, 522, 524]** |
74
+ | retry_methods | `Array` | A list of HTTP methods to retry. <br> **Default: %i[get put]** |
75
+ | http_callback | `HttpCallBack` | The Http CallBack allows defining callables for pre and post API calls. |
76
+ | proxy_settings | [`ProxySettings`](https://www.github.com/sdks-io/worldpay-apimatic-ruby-sdk/tree/0.0.1/doc/proxy-settings.md) | Optional proxy configuration to route HTTP requests through a proxy server. |
77
+ | logging_configuration | [`LoggingConfiguration`](https://www.github.com/sdks-io/worldpay-apimatic-ruby-sdk/tree/0.0.1/doc/logging-configuration.md) | The SDK logging configuration for API calls |
78
+ | custom_header_authentication_credentials | [`CustomHeaderAuthenticationCredentials`](https://www.github.com/sdks-io/worldpay-apimatic-ruby-sdk/tree/0.0.1/doc/auth/custom-header-signature.md) | The credential object for Custom Header Signature |
79
+
80
+ The API client can be initialized as follows:
81
+
82
+ ### Code-Based Client Initialization
83
+
84
+ ```ruby
85
+ require 'reporting_authorization_summary_api'
86
+ include ReportingAuthorizationSummaryApi
87
+
88
+ client = Client.new(
89
+ custom_header_authentication_credentials: CustomHeaderAuthenticationCredentials.new(
90
+ authorization: 'Authorization'
91
+ ),
92
+ logging_configuration: LoggingConfiguration.new(
93
+ log_level: Logger::INFO,
94
+ request_logging_config: RequestLoggingConfiguration.new(
95
+ log_body: true
96
+ ),
97
+ response_logging_config: ResponseLoggingConfiguration.new(
98
+ log_headers: true
99
+ )
100
+ )
101
+ )
102
+ ```
103
+
104
+ ### Environment-Based Client Initialization
105
+
106
+ ```ruby
107
+ require 'reporting_authorization_summary_api'
108
+ include ReportingAuthorizationSummaryApi
109
+
110
+ # Create client from environment
111
+ client = Client.from_env
112
+ ```
113
+
114
+ See the [`Environment-Based Client Initialization`](https://www.github.com/sdks-io/worldpay-apimatic-ruby-sdk/tree/0.0.1/doc/environment-based-client-initialization.md) section for details.
115
+
116
+ ## Authorization
117
+
118
+ This API uses the following authentication schemes.
119
+
120
+ * [`api_key (Custom Header Signature)`](https://www.github.com/sdks-io/worldpay-apimatic-ruby-sdk/tree/0.0.1/doc/auth/custom-header-signature.md)
121
+
122
+ ## List of APIs
123
+
124
+ * [Authorizations](https://www.github.com/sdks-io/worldpay-apimatic-ruby-sdk/tree/0.0.1/doc/controllers/authorizations.md)
125
+
126
+ ## SDK Infrastructure
127
+
128
+ ### Configuration
129
+
130
+ * [ProxySettings](https://www.github.com/sdks-io/worldpay-apimatic-ruby-sdk/tree/0.0.1/doc/proxy-settings.md)
131
+ * [Environment-Based Client Initialization](https://www.github.com/sdks-io/worldpay-apimatic-ruby-sdk/tree/0.0.1/doc/environment-based-client-initialization.md)
132
+ * [AbstractLogger](https://www.github.com/sdks-io/worldpay-apimatic-ruby-sdk/tree/0.0.1/doc/abstract-logger.md)
133
+ * [LoggingConfiguration](https://www.github.com/sdks-io/worldpay-apimatic-ruby-sdk/tree/0.0.1/doc/logging-configuration.md)
134
+ * [RequestLoggingConfiguration](https://www.github.com/sdks-io/worldpay-apimatic-ruby-sdk/tree/0.0.1/doc/request-logging-configuration.md)
135
+ * [ResponseLoggingConfiguration](https://www.github.com/sdks-io/worldpay-apimatic-ruby-sdk/tree/0.0.1/doc/response-logging-configuration.md)
136
+
137
+ ### HTTP
138
+
139
+ * [HttpResponse](https://www.github.com/sdks-io/worldpay-apimatic-ruby-sdk/tree/0.0.1/doc/http-response.md)
140
+ * [HttpRequest](https://www.github.com/sdks-io/worldpay-apimatic-ruby-sdk/tree/0.0.1/doc/http-request.md)
141
+
142
+ ### Utilities
143
+
144
+ * [ApiResponse](https://www.github.com/sdks-io/worldpay-apimatic-ruby-sdk/tree/0.0.1/doc/api-response.md)
145
+ * [ApiHelper](https://www.github.com/sdks-io/worldpay-apimatic-ruby-sdk/tree/0.0.1/doc/api-helper.md)
146
+ * [DateTimeHelper](https://www.github.com/sdks-io/worldpay-apimatic-ruby-sdk/tree/0.0.1/doc/date-time-helper.md)
147
+
data/bin/console ADDED
@@ -0,0 +1,15 @@
1
+ #!/usr/bin/env ruby
2
+
3
+ # Load the lib folder into Ruby's load path
4
+ $LOAD_PATH.unshift(File.expand_path('../lib', __dir__))
5
+
6
+ # Require the gem
7
+ require 'reporting_authorization_summary_api'
8
+
9
+ puts 'ReportingAuthorizationSummaryApi SDK loaded!'
10
+ puts 'You can now create a client with: client = ReportingAuthorizationSummaryApi::Client.new'
11
+ puts 'Or use from_env: client = ReportingAuthorizationSummaryApi::Client.from_env'
12
+
13
+ # Start an interactive IRB session
14
+ require 'irb'
15
+ IRB.start
@@ -0,0 +1,10 @@
1
+ # reporting_authorization_summary_api
2
+ #
3
+ # This file was automatically
4
+ # generated by APIMATIC v3.0 ( https://www.apimatic.io ).
5
+
6
+ module ReportingAuthorizationSummaryApi
7
+ # API utility class
8
+ class APIHelper < CoreLibrary::ApiHelper
9
+ end
10
+ end
@@ -0,0 +1,258 @@
1
+ # reporting_authorization_summary_api
2
+ #
3
+ # This file was automatically
4
+ # generated by APIMATIC v3.0 ( https://www.apimatic.io ).
5
+
6
+ module ReportingAuthorizationSummaryApi
7
+ # AuthorizationsApi
8
+ class AuthorizationsApi < BaseApi
9
+ # Resource to get the total summary of authorizations for a given hierarchy
10
+ # and date range with card type and card network being optional parameters.
11
+ # Refer to the schema object for the allowed hierarchies and
12
+ # specifications.
13
+ # @param [AuthTransactionsRequest] body Required parameter: TODO: type
14
+ # description here
15
+ # @param [UUID | String] v_correlation_id Optional parameter: Correlation
16
+ # Id
17
+ # @return [ApiResponse] Complete http response with raw body and status code.
18
+ def get_authorizations_summary(body,
19
+ v_correlation_id: nil)
20
+ @api_call
21
+ .request(new_request_builder(HttpMethodEnum::POST,
22
+ '/authorizations/summary',
23
+ Server::DEFAULT)
24
+ .header_param(new_parameter('application/json', key: 'Content-Type'))
25
+ .body_param(new_parameter(body)
26
+ .is_required(true))
27
+ .header_param(new_parameter(v_correlation_id, key: 'v-correlation-id'))
28
+ .header_param(new_parameter('application/json', key: 'accept'))
29
+ .body_serializer(proc do |param| param.to_json unless param.nil? end)
30
+ .auth(Single.new('api_key')))
31
+ .response(new_response_handler
32
+ .deserializer(APIHelper.method(:custom_type_deserializer))
33
+ .deserialize_into(SummaryResponses.method(:from_hash))
34
+ .is_api_response(true)
35
+ .local_error('default',
36
+ 'Default errors',
37
+ AuthorizationsSummary0ErrorException))
38
+ .execute
39
+ end
40
+
41
+ # Resource to get the summary of authorizations grouped by card networks for
42
+ # a given hierarchy and date range with card type and card network being
43
+ # optional parameters. Refer to the schema object for the allowed
44
+ # hierarchies and specifications.
45
+ # @param [UUID | String] v_correlation_id Optional parameter: Correlation
46
+ # Id
47
+ # @param [AuthTransactionsSummaryRequestByCardNetwork] body Optional
48
+ # parameter: TODO: type description here
49
+ # @return [ApiResponse] Complete http response with raw body and status code.
50
+ def get_authorizations_summary_by_card_network(v_correlation_id: nil,
51
+ body: nil)
52
+ @api_call
53
+ .request(new_request_builder(HttpMethodEnum::POST,
54
+ '/authorizations/summary/cardnetwork',
55
+ Server::DEFAULT)
56
+ .header_param(new_parameter('application/json', key: 'Content-Type'))
57
+ .header_param(new_parameter(v_correlation_id, key: 'v-correlation-id'))
58
+ .body_param(new_parameter(body))
59
+ .header_param(new_parameter('application/json', key: 'accept'))
60
+ .body_serializer(proc do |param| param.to_json unless param.nil? end)
61
+ .auth(Single.new('api_key')))
62
+ .response(new_response_handler
63
+ .deserializer(APIHelper.method(:custom_type_deserializer))
64
+ .deserialize_into(AuthorizationsSummaryCardnetworkResponse.method(:from_hash))
65
+ .is_api_response(true)
66
+ .local_error('default',
67
+ 'Default errors',
68
+ AuthorizationsSummaryCardnetwork0ErrorException))
69
+ .execute
70
+ end
71
+
72
+ # Resource to get the summary of authorizations grouped by transaction dates
73
+ # for a given hierarchy and date range with card type and card network being
74
+ # optional parameters. Refer to the schema object for the allowed
75
+ # hierarchies and specifications.
76
+ # @param [UUID | String] v_correlation_id Optional parameter: Correlation
77
+ # Id
78
+ # @param [AuthTransactionsSummaryRequestByTransactionDate] body Optional
79
+ # parameter: TODO: type description here
80
+ # @return [ApiResponse] Complete http response with raw body and status code.
81
+ def get_authorizations_summaryby_transaction_date(v_correlation_id: nil,
82
+ body: nil)
83
+ @api_call
84
+ .request(new_request_builder(HttpMethodEnum::POST,
85
+ '/authorizations/summary/transactiondate',
86
+ Server::DEFAULT)
87
+ .header_param(new_parameter('application/json', key: 'Content-Type'))
88
+ .header_param(new_parameter(v_correlation_id, key: 'v-correlation-id'))
89
+ .body_param(new_parameter(body))
90
+ .header_param(new_parameter('application/json', key: 'accept'))
91
+ .body_serializer(proc do |param| param.to_json unless param.nil? end)
92
+ .auth(Single.new('api_key')))
93
+ .response(new_response_handler
94
+ .deserializer(APIHelper.method(:custom_type_deserializer))
95
+ .deserialize_into(AuthorizationsSummaryTransactiondateResponse.method(:from_hash))
96
+ .is_api_response(true)
97
+ .local_error('default',
98
+ 'Default errors',
99
+ AuthorizationsSummaryTransactiondate0ErrorException))
100
+ .execute
101
+ end
102
+
103
+ # Resource to get the summary of authorizations for given parameters grouped
104
+ # by merchants for a given hierarchy and date range with card type and card
105
+ # network being optional parameters. Refer to the schema object for the
106
+ # allowed hierarchies and specifications.
107
+ # @param [UUID | String] v_correlation_id Optional parameter: Correlation
108
+ # Id
109
+ # @param [AuthTransactionsSummaryRequestByMerchant] body Optional parameter:
110
+ # TODO: type description here
111
+ # @return [ApiResponse] Complete http response with raw body and status code.
112
+ def get_authorizations_summaryby_merchant(v_correlation_id: nil,
113
+ body: nil)
114
+ @api_call
115
+ .request(new_request_builder(HttpMethodEnum::POST,
116
+ '/authorizations/summary/merchant',
117
+ Server::DEFAULT)
118
+ .header_param(new_parameter('application/json', key: 'Content-Type'))
119
+ .header_param(new_parameter(v_correlation_id, key: 'v-correlation-id'))
120
+ .body_param(new_parameter(body))
121
+ .header_param(new_parameter('application/json', key: 'accept'))
122
+ .body_serializer(proc do |param| param.to_json unless param.nil? end)
123
+ .auth(Single.new('api_key')))
124
+ .response(new_response_handler
125
+ .deserializer(APIHelper.method(:custom_type_deserializer))
126
+ .deserialize_into(SummaryDetailMerchant.method(:from_hash))
127
+ .is_api_response(true)
128
+ .local_error('default',
129
+ 'Default errors',
130
+ AuthorizationsSummaryMerchant0ErrorException))
131
+ .execute
132
+ end
133
+
134
+ # Resource to get the summary of authorizations grouped by divisions for a
135
+ # given hierarchy and date range with card type and card network being
136
+ # optional parameters. Refer to the schema object for the allowed
137
+ # hierarchies and specifications.
138
+ # @param [UUID | String] v_correlation_id Optional parameter: Correlation
139
+ # Id
140
+ # @param [AuthTransactionsRequestByDivision] body Optional parameter: TODO:
141
+ # type description here
142
+ # @return [ApiResponse] Complete http response with raw body and status code.
143
+ def get_authorizations_summaryby_division(v_correlation_id: nil,
144
+ body: nil)
145
+ @api_call
146
+ .request(new_request_builder(HttpMethodEnum::POST,
147
+ '/authorizations/summary/division',
148
+ Server::DEFAULT)
149
+ .header_param(new_parameter('application/json', key: 'Content-Type'))
150
+ .header_param(new_parameter(v_correlation_id, key: 'v-correlation-id'))
151
+ .body_param(new_parameter(body))
152
+ .header_param(new_parameter('application/json', key: 'accept'))
153
+ .body_serializer(proc do |param| param.to_json unless param.nil? end)
154
+ .auth(Single.new('api_key')))
155
+ .response(new_response_handler
156
+ .deserializer(APIHelper.method(:custom_type_deserializer))
157
+ .deserialize_into(SummaryDetailDivision.method(:from_hash))
158
+ .is_api_response(true)
159
+ .local_error('default',
160
+ 'Default errors',
161
+ AuthorizationsSummaryDivision0ErrorException))
162
+ .execute
163
+ end
164
+
165
+ # Resource to get the summary of authorizations grouped by stores for a
166
+ # given hierarchy and date range with card type and card network being
167
+ # optional parameters. Refer to the schema object for the allowed
168
+ # hierarchies and specifications.
169
+ # @param [UUID | String] v_correlation_id Optional parameter: Correlation
170
+ # Id
171
+ # @param [AuthTransactionsRequestByStore] body Optional parameter: TODO:
172
+ # type description here
173
+ # @return [ApiResponse] Complete http response with raw body and status code.
174
+ def get_authorizations_summaryby_store(v_correlation_id: nil,
175
+ body: nil)
176
+ @api_call
177
+ .request(new_request_builder(HttpMethodEnum::POST,
178
+ '/authorizations/summary/store',
179
+ Server::DEFAULT)
180
+ .header_param(new_parameter('application/json', key: 'Content-Type'))
181
+ .header_param(new_parameter(v_correlation_id, key: 'v-correlation-id'))
182
+ .body_param(new_parameter(body))
183
+ .header_param(new_parameter('application/json', key: 'accept'))
184
+ .body_serializer(proc do |param| param.to_json unless param.nil? end)
185
+ .auth(Single.new('api_key')))
186
+ .response(new_response_handler
187
+ .deserializer(APIHelper.method(:custom_type_deserializer))
188
+ .deserialize_into(SummaryDetailStore.method(:from_hash))
189
+ .is_api_response(true)
190
+ .local_error('default',
191
+ 'Default errors',
192
+ AuthorizationsSummaryStore0ErrorException))
193
+ .execute
194
+ end
195
+
196
+ # Resource to get the summary of authorizations grouped by chains for a
197
+ # given hierarchy and date range with card type and card network being
198
+ # optional parameters. Refer to the schema object for the allowed
199
+ # hierarchies and specifications.
200
+ # @param [UUID | String] v_correlation_id Optional parameter: Correlation
201
+ # Id
202
+ # @param [AuthTransactionsRequestByChain] body Optional parameter: TODO:
203
+ # type description here
204
+ # @return [ApiResponse] Complete http response with raw body and status code.
205
+ def get_authorizations_summaryby_chain(v_correlation_id: nil,
206
+ body: nil)
207
+ @api_call
208
+ .request(new_request_builder(HttpMethodEnum::POST,
209
+ '/authorizations/summary/chain',
210
+ Server::DEFAULT)
211
+ .header_param(new_parameter('application/json', key: 'Content-Type'))
212
+ .header_param(new_parameter(v_correlation_id, key: 'v-correlation-id'))
213
+ .body_param(new_parameter(body))
214
+ .header_param(new_parameter('application/json', key: 'accept'))
215
+ .body_serializer(proc do |param| param.to_json unless param.nil? end)
216
+ .auth(Single.new('api_key')))
217
+ .response(new_response_handler
218
+ .deserializer(APIHelper.method(:custom_type_deserializer))
219
+ .deserialize_into(SummaryDetailChain.method(:from_hash))
220
+ .is_api_response(true)
221
+ .local_error('default',
222
+ 'Default errors',
223
+ AuthorizationsSummaryChain0ErrorException))
224
+ .execute
225
+ end
226
+
227
+ # Resource to get the summary of authorizations grouped by superchains for a
228
+ # given hierarchy and date range with card type and card network being
229
+ # optional parameters. Refer to the schema object for the allowed
230
+ # hierarchies and specifications.
231
+ # @param [UUID | String] v_correlation_id Optional parameter: Correlation
232
+ # Id
233
+ # @param [AuthTransactionsRequestBySuperChain] body Optional parameter:
234
+ # TODO: type description here
235
+ # @return [ApiResponse] Complete http response with raw body and status code.
236
+ def get_authorizations_summaryby_super_chain(v_correlation_id: nil,
237
+ body: nil)
238
+ @api_call
239
+ .request(new_request_builder(HttpMethodEnum::POST,
240
+ '/authorizations/summary/superchain',
241
+ Server::DEFAULT)
242
+ .header_param(new_parameter('application/json', key: 'Content-Type'))
243
+ .header_param(new_parameter(v_correlation_id, key: 'v-correlation-id'))
244
+ .body_param(new_parameter(body))
245
+ .header_param(new_parameter('application/json', key: 'accept'))
246
+ .body_serializer(proc do |param| param.to_json unless param.nil? end)
247
+ .auth(Single.new('api_key')))
248
+ .response(new_response_handler
249
+ .deserializer(APIHelper.method(:custom_type_deserializer))
250
+ .deserialize_into(SummaryDetailSuperChain.method(:from_hash))
251
+ .is_api_response(true)
252
+ .local_error('default',
253
+ 'Default errors',
254
+ AuthorizationsSummarySuperchain0ErrorException))
255
+ .execute
256
+ end
257
+ end
258
+ end
@@ -0,0 +1,67 @@
1
+ # reporting_authorization_summary_api
2
+ #
3
+ # This file was automatically
4
+ # generated by APIMATIC v3.0 ( https://www.apimatic.io ).
5
+
6
+ module ReportingAuthorizationSummaryApi
7
+ # BaseApi.
8
+ class BaseApi
9
+ include CoreLibrary
10
+ attr_accessor :config, :http_call_back
11
+
12
+ def self.user_agent
13
+ 'Ruby-SDK/0.0.1 (OS: {os-info}, Engine: {engine}/{engine-version})'
14
+ end
15
+
16
+ def self.user_agent_parameters
17
+ {
18
+ '{engine}' => { 'value' => RUBY_ENGINE, 'encode' => false },
19
+ '{engine-version}' => { 'value' => RUBY_ENGINE_VERSION, 'encode' => false },
20
+ '{os-info}' => { 'value' => RUBY_PLATFORM, 'encode' => false }
21
+ }
22
+ end
23
+
24
+ GLOBAL_ERRORS = {
25
+ 'default' => ErrorCase.new
26
+ .error_message('HTTP response not OK.')
27
+ .exception_type(APIException)
28
+ }.freeze
29
+
30
+ # Initialization constructor.
31
+ # @param [GlobalConfiguration] global_configuration The instance of GlobalConfiguration.
32
+ def initialize(global_configuration)
33
+ @global_configuration = global_configuration
34
+ @config = @global_configuration.client_configuration
35
+ @http_call_back = @config.http_callback
36
+ @api_call = ApiCall.new(@global_configuration)
37
+ end
38
+
39
+ # Creates a new instance of the request builder.
40
+ # @param [String] http_method The HTTP method to use in the request.
41
+ # @param [String] path The endpoint path to use in the request.
42
+ # @param [String] server The server to extract the base uri for the request.
43
+ # @return [RequestBuilder] The instance of RequestBuilder.
44
+ def new_request_builder(http_method, path, server)
45
+ RequestBuilder.new
46
+ .http_method(http_method)
47
+ .path(path)
48
+ .server(server)
49
+ end
50
+
51
+ # Creates a new instance of the response handler.
52
+ # @return [ResponseHandler] The instance of ResponseHandler.
53
+ def new_response_handler
54
+ ResponseHandler.new
55
+ end
56
+
57
+ # Creates a new instance of the parameter.
58
+ # @param [String|optional] key The key of the parameter.
59
+ # @param [Object] value The value of the parameter.
60
+ # @return [Parameter] The instance of Parameter.
61
+ def new_parameter(value, key: nil)
62
+ Parameter.new
63
+ .key(key)
64
+ .value(value)
65
+ end
66
+ end
67
+ end
@@ -0,0 +1,75 @@
1
+ # reporting_authorization_summary_api
2
+ #
3
+ # This file was automatically
4
+ # generated by APIMATIC v3.0 ( https://www.apimatic.io ).
5
+
6
+ module ReportingAuthorizationSummaryApi
7
+ # reporting_authorization_summary_api client class.
8
+ class Client
9
+ include CoreLibrary
10
+ attr_reader :config, :auth_managers
11
+
12
+ def user_agent_detail
13
+ config.user_agent_detail
14
+ end
15
+
16
+ # Access to authorizations controller.
17
+ # @return [AuthorizationsApi] Returns the controller instance.
18
+ def authorizations
19
+ @authorizations ||= AuthorizationsApi.new @global_configuration
20
+ end
21
+
22
+ def initialize(
23
+ connection: nil, adapter: :net_http_persistent, timeout: 30,
24
+ max_retries: 0, retry_interval: 1, backoff_factor: 2,
25
+ retry_statuses: [408, 413, 429, 500, 502, 503, 504, 521, 522, 524],
26
+ retry_methods: %i[get put], http_callback: nil, proxy_settings: nil,
27
+ logging_configuration: nil, environment: Environment::PRODUCTION,
28
+ custom_header_authentication_credentials: nil, config: nil
29
+ )
30
+ @config = if config.nil?
31
+ Configuration.new(
32
+ connection: connection, adapter: adapter, timeout: timeout,
33
+ max_retries: max_retries, retry_interval: retry_interval,
34
+ backoff_factor: backoff_factor,
35
+ retry_statuses: retry_statuses,
36
+ retry_methods: retry_methods, http_callback: http_callback,
37
+ proxy_settings: proxy_settings,
38
+ logging_configuration: logging_configuration,
39
+ environment: environment,
40
+ custom_header_authentication_credentials: custom_header_authentication_credentials
41
+ )
42
+ else
43
+ config
44
+ end
45
+ user_agent_params = BaseApi.user_agent_parameters
46
+
47
+ @global_configuration = GlobalConfiguration.new(client_configuration: @config)
48
+ .base_uri_executor(@config.method(:get_base_uri))
49
+ .global_errors(BaseApi::GLOBAL_ERRORS)
50
+ .user_agent(BaseApi.user_agent,
51
+ agent_parameters: user_agent_params)
52
+
53
+ initialize_auth_managers(@global_configuration)
54
+ @global_configuration = @global_configuration.auth_managers(@auth_managers)
55
+ end
56
+
57
+ # Initializes the auth managers hash used for authenticating API calls.
58
+ # @param [GlobalConfiguration] global_config The global configuration of the SDK)
59
+ def initialize_auth_managers(global_config)
60
+ @auth_managers = {}
61
+ http_client_config = global_config.client_configuration
62
+ %w[api_key].each { |auth| @auth_managers[auth] = nil }
63
+ @auth_managers['api_key'] = CustomHeaderAuthentication.new(
64
+ http_client_config.custom_header_authentication_credentials
65
+ )
66
+ end
67
+
68
+ # Creates a client directly from environment variables.
69
+ def self.from_env(**overrides)
70
+ default_config = Configuration.build_default_config_from_env
71
+ new_config = default_config.clone_with(**overrides)
72
+ new(config: new_config)
73
+ end
74
+ end
75
+ end