pds-metronome 0.1.0

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 (134) hide show
  1. checksums.yaml +7 -0
  2. data/Gemfile +9 -0
  3. data/README.md +164 -0
  4. data/Rakefile +10 -0
  5. data/docs/AccessManagementApi.md +300 -0
  6. data/docs/AccessType.md +15 -0
  7. data/docs/AgingOffsetUnit.md +15 -0
  8. data/docs/AgingStrategy.md +15 -0
  9. data/docs/ApiKeyData.md +28 -0
  10. data/docs/ApiKeyDataListResponse.md +20 -0
  11. data/docs/ApiKeyListResponse.md +20 -0
  12. data/docs/CreateApiKeyRequest.md +22 -0
  13. data/docs/CreateOrModifyApiKeyResponse.md +22 -0
  14. data/docs/CreateOrModifyPolicyRequest.md +22 -0
  15. data/docs/CreateOrModifyPolicyResponse.md +20 -0
  16. data/docs/DataExpiryApi.md +79 -0
  17. data/docs/ExpireItemResponse.md +20 -0
  18. data/docs/ExpireSubItemResponse.md +22 -0
  19. data/docs/ExpiryResponse.md +22 -0
  20. data/docs/ExpiryResponsePendingInner.md +79 -0
  21. data/docs/GetManyApiKeys200Response.md +79 -0
  22. data/docs/GetManyPolicies200Response.md +79 -0
  23. data/docs/ItemAccessApi.md +605 -0
  24. data/docs/ItemExpiry.md +20 -0
  25. data/docs/ItemMetadataResponse.md +28 -0
  26. data/docs/ItemOrSubItemAccessLog.md +32 -0
  27. data/docs/ItemOrSubItemPolicyResponse.md +22 -0
  28. data/docs/ModifyApiKeyRequest.md +20 -0
  29. data/docs/Permission.md +15 -0
  30. data/docs/PermissionDeniedResponse.md +30 -0
  31. data/docs/PolicyData.md +26 -0
  32. data/docs/PolicyDataListResponse.md +28 -0
  33. data/docs/PolicyListResponse.md +28 -0
  34. data/docs/PolicyManagementApi.md +379 -0
  35. data/docs/PutApiKeyRequest.md +49 -0
  36. data/docs/SignupRequest.md +18 -0
  37. data/docs/SignupResponse.md +24 -0
  38. data/docs/SubItemMetadataResponse.md +22 -0
  39. data/docs/SubItemsExpiry.md +22 -0
  40. data/docs/TelemetryApi.md +80 -0
  41. data/docs/TelemetryObservation.md +20 -0
  42. data/docs/TelemetryRequest.md +22 -0
  43. data/docs/ValidationErrorResponseInner.md +22 -0
  44. data/docs/ValidationProblem.md +22 -0
  45. data/lib/metronome/api/access_management_api.rb +285 -0
  46. data/lib/metronome/api/data_expiry_api.rb +105 -0
  47. data/lib/metronome/api/item_access_api.rb +549 -0
  48. data/lib/metronome/api/policy_management_api.rb +348 -0
  49. data/lib/metronome/api/telemetry_api.rb +84 -0
  50. data/lib/metronome/api_client.rb +393 -0
  51. data/lib/metronome/api_error.rb +58 -0
  52. data/lib/metronome/configuration.rb +312 -0
  53. data/lib/metronome/models/access_type.rb +41 -0
  54. data/lib/metronome/models/aging_offset_unit.rb +41 -0
  55. data/lib/metronome/models/aging_strategy.rb +40 -0
  56. data/lib/metronome/models/api_key_data.rb +330 -0
  57. data/lib/metronome/models/api_key_data_list_response.rb +241 -0
  58. data/lib/metronome/models/api_key_list_response.rb +241 -0
  59. data/lib/metronome/models/create_api_key_request.rb +239 -0
  60. data/lib/metronome/models/create_or_modify_api_key_response.rb +255 -0
  61. data/lib/metronome/models/create_or_modify_policy_request.rb +293 -0
  62. data/lib/metronome/models/create_or_modify_policy_response.rb +240 -0
  63. data/lib/metronome/models/expire_item_response.rb +240 -0
  64. data/lib/metronome/models/expire_sub_item_response.rb +254 -0
  65. data/lib/metronome/models/expiry_response.rb +299 -0
  66. data/lib/metronome/models/expiry_response_pending_inner.rb +55 -0
  67. data/lib/metronome/models/get_many_api_keys200_response.rb +55 -0
  68. data/lib/metronome/models/get_many_policies200_response.rb +55 -0
  69. data/lib/metronome/models/item_expiry.rb +239 -0
  70. data/lib/metronome/models/item_metadata_response.rb +274 -0
  71. data/lib/metronome/models/item_or_sub_item_access_log.rb +337 -0
  72. data/lib/metronome/models/item_or_sub_item_policy_response.rb +245 -0
  73. data/lib/metronome/models/modify_api_key_request.rb +230 -0
  74. data/lib/metronome/models/permission.rb +45 -0
  75. data/lib/metronome/models/permission_denied_response.rb +338 -0
  76. data/lib/metronome/models/policy_data.rb +364 -0
  77. data/lib/metronome/models/policy_data_list_response.rb +286 -0
  78. data/lib/metronome/models/policy_list_response.rb +286 -0
  79. data/lib/metronome/models/put_api_key_request.rb +105 -0
  80. data/lib/metronome/models/signup_request.rb +225 -0
  81. data/lib/metronome/models/signup_response.rb +266 -0
  82. data/lib/metronome/models/sub_item_metadata_response.rb +245 -0
  83. data/lib/metronome/models/sub_items_expiry.rb +255 -0
  84. data/lib/metronome/models/telemetry_observation.rb +240 -0
  85. data/lib/metronome/models/telemetry_request.rb +259 -0
  86. data/lib/metronome/models/validation_error_response_inner.rb +254 -0
  87. data/lib/metronome/models/validation_problem.rb +254 -0
  88. data/lib/metronome/version.rb +15 -0
  89. data/lib/metronome.rb +80 -0
  90. data/shell.nix +6 -0
  91. data/spec/api/access_management_api_spec.rb +82 -0
  92. data/spec/api/data_expiry_api_spec.rb +46 -0
  93. data/spec/api/item_access_api_spec.rb +132 -0
  94. data/spec/api/policy_management_api_spec.rb +94 -0
  95. data/spec/api/telemetry_api_spec.rb +46 -0
  96. data/spec/api_client_spec.rb +228 -0
  97. data/spec/configuration_spec.rb +42 -0
  98. data/spec/models/access_type_spec.rb +28 -0
  99. data/spec/models/aging_offset_unit_spec.rb +28 -0
  100. data/spec/models/aging_strategy_spec.rb +28 -0
  101. data/spec/models/api_key_data_list_response_spec.rb +40 -0
  102. data/spec/models/api_key_data_spec.rb +68 -0
  103. data/spec/models/api_key_list_response_spec.rb +40 -0
  104. data/spec/models/create_api_key_request_spec.rb +46 -0
  105. data/spec/models/create_or_modify_api_key_response_spec.rb +46 -0
  106. data/spec/models/create_or_modify_policy_request_spec.rb +46 -0
  107. data/spec/models/create_or_modify_policy_response_spec.rb +40 -0
  108. data/spec/models/expire_item_response_spec.rb +40 -0
  109. data/spec/models/expire_sub_item_response_spec.rb +46 -0
  110. data/spec/models/expiry_response_pending_inner_spec.rb +43 -0
  111. data/spec/models/expiry_response_spec.rb +46 -0
  112. data/spec/models/get_many_api_keys200_response_spec.rb +43 -0
  113. data/spec/models/get_many_policies200_response_spec.rb +43 -0
  114. data/spec/models/item_expiry_spec.rb +40 -0
  115. data/spec/models/item_metadata_response_spec.rb +64 -0
  116. data/spec/models/item_or_sub_item_access_log_spec.rb +76 -0
  117. data/spec/models/item_or_sub_item_policy_response_spec.rb +46 -0
  118. data/spec/models/modify_api_key_request_spec.rb +40 -0
  119. data/spec/models/permission_denied_response_spec.rb +82 -0
  120. data/spec/models/permission_spec.rb +28 -0
  121. data/spec/models/policy_data_list_response_spec.rb +64 -0
  122. data/spec/models/policy_data_spec.rb +58 -0
  123. data/spec/models/policy_list_response_spec.rb +64 -0
  124. data/spec/models/put_api_key_request_spec.rb +31 -0
  125. data/spec/models/signup_request_spec.rb +34 -0
  126. data/spec/models/signup_response_spec.rb +52 -0
  127. data/spec/models/sub_item_metadata_response_spec.rb +46 -0
  128. data/spec/models/sub_items_expiry_spec.rb +46 -0
  129. data/spec/models/telemetry_observation_spec.rb +40 -0
  130. data/spec/models/telemetry_request_spec.rb +46 -0
  131. data/spec/models/validation_error_response_inner_spec.rb +46 -0
  132. data/spec/models/validation_problem_spec.rb +46 -0
  133. data/spec/spec_helper.rb +111 -0
  134. metadata +260 -0
@@ -0,0 +1,80 @@
1
+ # Metronome::TelemetryApi
2
+
3
+ All URIs are relative to *https://YOUR-CUSTOMER-ID.api.eu-north-1.privatedataservices.com*
4
+
5
+ | Method | HTTP request | Description |
6
+ | ------ | ------------ | ----------- |
7
+ | [**post_telemetry**](TelemetryApi.md#post_telemetry) | **POST** /v1/metronome/telemetry | |
8
+
9
+
10
+ ## post_telemetry
11
+
12
+ > post_telemetry(opts)
13
+
14
+
15
+
16
+ Read items and sub-items that will or have already been expired on the given date
17
+
18
+ ### Examples
19
+
20
+ ```ruby
21
+ require 'time'
22
+ require 'metronome'
23
+ # setup authorization
24
+ Metronome.configure do |config|
25
+ # Configure API key authorization: ApiKeyAuth
26
+ config.api_key['ApiKeyAuth'] = 'YOUR API KEY'
27
+ # Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
28
+ # config.api_key_prefix['ApiKeyAuth'] = 'Bearer'
29
+ end
30
+
31
+ api_instance = Metronome::TelemetryApi.new
32
+ opts = {
33
+ telemetry_request: Metronome::TelemetryRequest.new({observation_time: Time.now, policies: ["account-login", "sales-order-processing", "marketing-email"], observations: [Metronome::TelemetryObservation.new({item_id: 'customer-123', sub_item_ids: ["email", "address"]})]}) # TelemetryRequest |
34
+ }
35
+
36
+ begin
37
+
38
+ api_instance.post_telemetry(opts)
39
+ rescue Metronome::ApiError => e
40
+ puts "Error when calling TelemetryApi->post_telemetry: #{e}"
41
+ end
42
+ ```
43
+
44
+ #### Using the post_telemetry_with_http_info variant
45
+
46
+ This returns an Array which contains the response data (`nil` in this case), status code and headers.
47
+
48
+ > <Array(nil, Integer, Hash)> post_telemetry_with_http_info(opts)
49
+
50
+ ```ruby
51
+ begin
52
+
53
+ data, status_code, headers = api_instance.post_telemetry_with_http_info(opts)
54
+ p status_code # => 2xx
55
+ p headers # => { ... }
56
+ p data # => nil
57
+ rescue Metronome::ApiError => e
58
+ puts "Error when calling TelemetryApi->post_telemetry_with_http_info: #{e}"
59
+ end
60
+ ```
61
+
62
+ ### Parameters
63
+
64
+ | Name | Type | Description | Notes |
65
+ | ---- | ---- | ----------- | ----- |
66
+ | **telemetry_request** | [**TelemetryRequest**](TelemetryRequest.md) | | [optional] |
67
+
68
+ ### Return type
69
+
70
+ nil (empty response body)
71
+
72
+ ### Authorization
73
+
74
+ [ApiKeyAuth](../README.md#ApiKeyAuth)
75
+
76
+ ### HTTP request headers
77
+
78
+ - **Content-Type**: application/json
79
+ - **Accept**: application/json
80
+
@@ -0,0 +1,20 @@
1
+ # Metronome::TelemetryObservation
2
+
3
+ ## Properties
4
+
5
+ | Name | Type | Description | Notes |
6
+ | ---- | ---- | ----------- | ----- |
7
+ | **item_id** | **String** | | |
8
+ | **sub_item_ids** | **Array&lt;String&gt;** | | |
9
+
10
+ ## Example
11
+
12
+ ```ruby
13
+ require 'metronome'
14
+
15
+ instance = Metronome::TelemetryObservation.new(
16
+ item_id: customer-123,
17
+ sub_item_ids: [&quot;email&quot;,&quot;address&quot;]
18
+ )
19
+ ```
20
+
@@ -0,0 +1,22 @@
1
+ # Metronome::TelemetryRequest
2
+
3
+ ## Properties
4
+
5
+ | Name | Type | Description | Notes |
6
+ | ---- | ---- | ----------- | ----- |
7
+ | **observation_time** | **Time** | The time the observation happened in UTC timezone | |
8
+ | **policies** | **Array&lt;String&gt;** | | |
9
+ | **observations** | [**Array&lt;TelemetryObservation&gt;**](TelemetryObservation.md) | | |
10
+
11
+ ## Example
12
+
13
+ ```ruby
14
+ require 'metronome'
15
+
16
+ instance = Metronome::TelemetryRequest.new(
17
+ observation_time: null,
18
+ policies: [&quot;account-login&quot;,&quot;sales-order-processing&quot;,&quot;marketing-email&quot;],
19
+ observations: null
20
+ )
21
+ ```
22
+
@@ -0,0 +1,22 @@
1
+ # Metronome::ValidationErrorResponseInner
2
+
3
+ ## Properties
4
+
5
+ | Name | Type | Description | Notes |
6
+ | ---- | ---- | ----------- | ----- |
7
+ | **spec** | **String** | | |
8
+ | **request_from_customer** | **Object** | | |
9
+ | **problems** | [**Array&lt;ValidationProblem&gt;**](ValidationProblem.md) | | |
10
+
11
+ ## Example
12
+
13
+ ```ruby
14
+ require 'metronome'
15
+
16
+ instance = Metronome::ValidationErrorResponseInner.new(
17
+ spec: com.pds.tantalus.customers/internal-contact,
18
+ request_from_customer: The outermost object that you sent in your request,
19
+ problems: null
20
+ )
21
+ ```
22
+
@@ -0,0 +1,22 @@
1
+ # Metronome::ValidationProblem
2
+
3
+ ## Properties
4
+
5
+ | Name | Type | Description | Notes |
6
+ | ---- | ---- | ----------- | ----- |
7
+ | **location** | **Array&lt;String&gt;** | | |
8
+ | **val** | **String** | | |
9
+ | **description** | **String** | | |
10
+
11
+ ## Example
12
+
13
+ ```ruby
14
+ require 'metronome'
15
+
16
+ instance = Metronome::ValidationProblem.new(
17
+ location: [&quot;HTTP body&quot;,&quot;policies&quot;,&quot;value&quot;],
18
+ val: The value you sent to the API,
19
+ description: Internal contact must be a non-null string
20
+ )
21
+ ```
22
+
@@ -0,0 +1,285 @@
1
+ =begin
2
+ #Metronome API
3
+
4
+ #No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
5
+
6
+ The version of the OpenAPI document: 1.0.0
7
+ Contact: info@privatedataservices.com
8
+ Generated by: https://openapi-generator.tech
9
+ OpenAPI Generator version: 6.4.0
10
+
11
+ =end
12
+
13
+ require 'cgi'
14
+
15
+ module Metronome
16
+ class AccessManagementApi
17
+ attr_accessor :api_client
18
+
19
+ def initialize(api_client = ApiClient.default)
20
+ @api_client = api_client
21
+ end
22
+ # Read a specific API key
23
+ # @param api_key [String]
24
+ # @param [Hash] opts the optional parameters
25
+ # @return [ApiKeyData]
26
+ def get_api_key(api_key, opts = {})
27
+ data, _status_code, _headers = get_api_key_with_http_info(api_key, opts)
28
+ data
29
+ end
30
+
31
+ # Read a specific API key
32
+ # @param api_key [String]
33
+ # @param [Hash] opts the optional parameters
34
+ # @return [Array<(ApiKeyData, Integer, Hash)>] ApiKeyData data, response status code and response headers
35
+ def get_api_key_with_http_info(api_key, opts = {})
36
+ if @api_client.config.debugging
37
+ @api_client.config.logger.debug 'Calling API: AccessManagementApi.get_api_key ...'
38
+ end
39
+ # verify the required parameter 'api_key' is set
40
+ if @api_client.config.client_side_validation && api_key.nil?
41
+ fail ArgumentError, "Missing the required parameter 'api_key' when calling AccessManagementApi.get_api_key"
42
+ end
43
+ # resource path
44
+ local_var_path = '/v1/metronome/api-keys/{api-key}'.sub('{' + 'api-key' + '}', CGI.escape(api_key.to_s))
45
+
46
+ # query parameters
47
+ query_params = opts[:query_params] || {}
48
+
49
+ # header parameters
50
+ header_params = opts[:header_params] || {}
51
+ # HTTP header 'Accept' (if needed)
52
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
53
+
54
+ # form parameters
55
+ form_params = opts[:form_params] || {}
56
+
57
+ # http body (model)
58
+ post_body = opts[:debug_body]
59
+
60
+ # return_type
61
+ return_type = opts[:debug_return_type] || 'ApiKeyData'
62
+
63
+ # auth_names
64
+ auth_names = opts[:debug_auth_names] || ['ApiKeyAuth']
65
+
66
+ new_options = opts.merge(
67
+ :operation => :"AccessManagementApi.get_api_key",
68
+ :header_params => header_params,
69
+ :query_params => query_params,
70
+ :form_params => form_params,
71
+ :body => post_body,
72
+ :auth_names => auth_names,
73
+ :return_type => return_type
74
+ )
75
+
76
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
77
+ if @api_client.config.debugging
78
+ @api_client.config.logger.debug "API called: AccessManagementApi#get_api_key\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
79
+ end
80
+ return data, status_code, headers
81
+ end
82
+
83
+ # Read many API keys alphanumerically sorted
84
+ # @param [Hash] opts the optional parameters
85
+ # @option opts [Integer] :offset The number of keys to drop from the start
86
+ # @option opts [Integer] :limit The number of keys to include
87
+ # @option opts [Boolean] :include_data Whether to include permissions, status, description etc.
88
+ # @return [GetManyApiKeys200Response]
89
+ def get_many_api_keys(opts = {})
90
+ data, _status_code, _headers = get_many_api_keys_with_http_info(opts)
91
+ data
92
+ end
93
+
94
+ # Read many API keys alphanumerically sorted
95
+ # @param [Hash] opts the optional parameters
96
+ # @option opts [Integer] :offset The number of keys to drop from the start
97
+ # @option opts [Integer] :limit The number of keys to include
98
+ # @option opts [Boolean] :include_data Whether to include permissions, status, description etc.
99
+ # @return [Array<(GetManyApiKeys200Response, Integer, Hash)>] GetManyApiKeys200Response data, response status code and response headers
100
+ def get_many_api_keys_with_http_info(opts = {})
101
+ if @api_client.config.debugging
102
+ @api_client.config.logger.debug 'Calling API: AccessManagementApi.get_many_api_keys ...'
103
+ end
104
+ if @api_client.config.client_side_validation && !opts[:'offset'].nil? && opts[:'offset'] < 1
105
+ fail ArgumentError, 'invalid value for "opts[:"offset"]" when calling AccessManagementApi.get_many_api_keys, must be greater than or equal to 1.'
106
+ end
107
+
108
+ if @api_client.config.client_side_validation && !opts[:'limit'].nil? && opts[:'limit'] < 1
109
+ fail ArgumentError, 'invalid value for "opts[:"limit"]" when calling AccessManagementApi.get_many_api_keys, must be greater than or equal to 1.'
110
+ end
111
+
112
+ # resource path
113
+ local_var_path = '/v1/metronome/api-keys'
114
+
115
+ # query parameters
116
+ query_params = opts[:query_params] || {}
117
+ query_params[:'offset'] = opts[:'offset'] if !opts[:'offset'].nil?
118
+ query_params[:'limit'] = opts[:'limit'] if !opts[:'limit'].nil?
119
+ query_params[:'include-data'] = opts[:'include_data'] if !opts[:'include_data'].nil?
120
+
121
+ # header parameters
122
+ header_params = opts[:header_params] || {}
123
+ # HTTP header 'Accept' (if needed)
124
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
125
+
126
+ # form parameters
127
+ form_params = opts[:form_params] || {}
128
+
129
+ # http body (model)
130
+ post_body = opts[:debug_body]
131
+
132
+ # return_type
133
+ return_type = opts[:debug_return_type] || 'GetManyApiKeys200Response'
134
+
135
+ # auth_names
136
+ auth_names = opts[:debug_auth_names] || ['ApiKeyAuth']
137
+
138
+ new_options = opts.merge(
139
+ :operation => :"AccessManagementApi.get_many_api_keys",
140
+ :header_params => header_params,
141
+ :query_params => query_params,
142
+ :form_params => form_params,
143
+ :body => post_body,
144
+ :auth_names => auth_names,
145
+ :return_type => return_type
146
+ )
147
+
148
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
149
+ if @api_client.config.debugging
150
+ @api_client.config.logger.debug "API called: AccessManagementApi#get_many_api_keys\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
151
+ end
152
+ return data, status_code, headers
153
+ end
154
+
155
+ # Create or modify an API key
156
+ # @param api_key [String] The API key to be modified or &#39;create&#39; for a new key
157
+ # @param [Hash] opts the optional parameters
158
+ # @option opts [PutApiKeyRequest] :put_api_key_request
159
+ # @return [CreateOrModifyApiKeyResponse]
160
+ def put_api_key(api_key, opts = {})
161
+ data, _status_code, _headers = put_api_key_with_http_info(api_key, opts)
162
+ data
163
+ end
164
+
165
+ # Create or modify an API key
166
+ # @param api_key [String] The API key to be modified or &#39;create&#39; for a new key
167
+ # @param [Hash] opts the optional parameters
168
+ # @option opts [PutApiKeyRequest] :put_api_key_request
169
+ # @return [Array<(CreateOrModifyApiKeyResponse, Integer, Hash)>] CreateOrModifyApiKeyResponse data, response status code and response headers
170
+ def put_api_key_with_http_info(api_key, opts = {})
171
+ if @api_client.config.debugging
172
+ @api_client.config.logger.debug 'Calling API: AccessManagementApi.put_api_key ...'
173
+ end
174
+ # verify the required parameter 'api_key' is set
175
+ if @api_client.config.client_side_validation && api_key.nil?
176
+ fail ArgumentError, "Missing the required parameter 'api_key' when calling AccessManagementApi.put_api_key"
177
+ end
178
+ # resource path
179
+ local_var_path = '/v1/metronome/api-keys/{api-key}'.sub('{' + 'api-key' + '}', CGI.escape(api_key.to_s))
180
+
181
+ # query parameters
182
+ query_params = opts[:query_params] || {}
183
+
184
+ # header parameters
185
+ header_params = opts[:header_params] || {}
186
+ # HTTP header 'Accept' (if needed)
187
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
188
+ # HTTP header 'Content-Type'
189
+ content_type = @api_client.select_header_content_type(['application/json'])
190
+ if !content_type.nil?
191
+ header_params['Content-Type'] = content_type
192
+ end
193
+
194
+ # form parameters
195
+ form_params = opts[:form_params] || {}
196
+
197
+ # http body (model)
198
+ post_body = opts[:debug_body] || @api_client.object_to_http_body(opts[:'put_api_key_request'])
199
+
200
+ # return_type
201
+ return_type = opts[:debug_return_type] || 'CreateOrModifyApiKeyResponse'
202
+
203
+ # auth_names
204
+ auth_names = opts[:debug_auth_names] || ['ApiKeyAuth']
205
+
206
+ new_options = opts.merge(
207
+ :operation => :"AccessManagementApi.put_api_key",
208
+ :header_params => header_params,
209
+ :query_params => query_params,
210
+ :form_params => form_params,
211
+ :body => post_body,
212
+ :auth_names => auth_names,
213
+ :return_type => return_type
214
+ )
215
+
216
+ data, status_code, headers = @api_client.call_api(:PUT, local_var_path, new_options)
217
+ if @api_client.config.debugging
218
+ @api_client.config.logger.debug "API called: AccessManagementApi#put_api_key\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
219
+ end
220
+ return data, status_code, headers
221
+ end
222
+
223
+ # Open end point for signing up new customers
224
+ # @param [Hash] opts the optional parameters
225
+ # @option opts [SignupRequest] :signup_request
226
+ # @return [SignupResponse]
227
+ def sign_up(opts = {})
228
+ data, _status_code, _headers = sign_up_with_http_info(opts)
229
+ data
230
+ end
231
+
232
+ # Open end point for signing up new customers
233
+ # @param [Hash] opts the optional parameters
234
+ # @option opts [SignupRequest] :signup_request
235
+ # @return [Array<(SignupResponse, Integer, Hash)>] SignupResponse data, response status code and response headers
236
+ def sign_up_with_http_info(opts = {})
237
+ if @api_client.config.debugging
238
+ @api_client.config.logger.debug 'Calling API: AccessManagementApi.sign_up ...'
239
+ end
240
+ # resource path
241
+ local_var_path = '/v1/metronome/sign-up'
242
+
243
+ # query parameters
244
+ query_params = opts[:query_params] || {}
245
+
246
+ # header parameters
247
+ header_params = opts[:header_params] || {}
248
+ # HTTP header 'Accept' (if needed)
249
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
250
+ # HTTP header 'Content-Type'
251
+ content_type = @api_client.select_header_content_type(['application/json'])
252
+ if !content_type.nil?
253
+ header_params['Content-Type'] = content_type
254
+ end
255
+
256
+ # form parameters
257
+ form_params = opts[:form_params] || {}
258
+
259
+ # http body (model)
260
+ post_body = opts[:debug_body] || @api_client.object_to_http_body(opts[:'signup_request'])
261
+
262
+ # return_type
263
+ return_type = opts[:debug_return_type] || 'SignupResponse'
264
+
265
+ # auth_names
266
+ auth_names = opts[:debug_auth_names] || []
267
+
268
+ new_options = opts.merge(
269
+ :operation => :"AccessManagementApi.sign_up",
270
+ :header_params => header_params,
271
+ :query_params => query_params,
272
+ :form_params => form_params,
273
+ :body => post_body,
274
+ :auth_names => auth_names,
275
+ :return_type => return_type
276
+ )
277
+
278
+ data, status_code, headers = @api_client.call_api(:PUT, local_var_path, new_options)
279
+ if @api_client.config.debugging
280
+ @api_client.config.logger.debug "API called: AccessManagementApi#sign_up\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
281
+ end
282
+ return data, status_code, headers
283
+ end
284
+ end
285
+ end
@@ -0,0 +1,105 @@
1
+ =begin
2
+ #Metronome API
3
+
4
+ #No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
5
+
6
+ The version of the OpenAPI document: 1.0.0
7
+ Contact: info@privatedataservices.com
8
+ Generated by: https://openapi-generator.tech
9
+ OpenAPI Generator version: 6.4.0
10
+
11
+ =end
12
+
13
+ require 'cgi'
14
+
15
+ module Metronome
16
+ class DataExpiryApi
17
+ attr_accessor :api_client
18
+
19
+ def initialize(api_client = ApiClient.default)
20
+ @api_client = api_client
21
+ end
22
+ # Read items and sub-items that will or have already been expired on the given date
23
+ # @param date [Date] The date to query
24
+ # @param [Hash] opts the optional parameters
25
+ # @return [ExpiryResponse]
26
+ def get_expiry_notices(date, opts = {})
27
+ data, _status_code, _headers = get_expiry_notices_with_http_info(date, opts)
28
+ data
29
+ end
30
+
31
+ # Read items and sub-items that will or have already been expired on the given date
32
+ # @param date [Date] The date to query
33
+ # @param [Hash] opts the optional parameters
34
+ # @return [Array<(ExpiryResponse, Integer, Hash)>] ExpiryResponse data, response status code and response headers
35
+ def get_expiry_notices_with_http_info(date, opts = {})
36
+ if @api_client.config.debugging
37
+ @api_client.config.logger.debug 'Calling API: DataExpiryApi.get_expiry_notices ...'
38
+ end
39
+ # verify the required parameter 'date' is set
40
+ if @api_client.config.client_side_validation && date.nil?
41
+ fail ArgumentError, "Missing the required parameter 'date' when calling DataExpiryApi.get_expiry_notices"
42
+ end
43
+
44
+ # PDS patch: if this is already converted to a date object, just use the date.
45
+ date_string = nil
46
+ if date.is_a?(Date)
47
+ date_string = date.strftime("%Y%m%d")
48
+ else
49
+ if @api_client.config.client_side_validation && date.to_s.length > 8
50
+ fail ArgumentError, 'invalid value for "date" when calling DataExpiryApi.get_expiry_notices, the character length must be smaller than or equal to 8.'
51
+ end
52
+
53
+ if @api_client.config.client_side_validation && date.to_s.length < 8
54
+ fail ArgumentError, 'invalid value for "date" when calling DataExpiryApi.get_expiry_notices, the character length must be great than or equal to 8.'
55
+ end
56
+
57
+ pattern = Regexp.new(/^\d{4}(0[1-9]|1[012])(0[1-9]|[12][0-9]|3[01])$/)
58
+ if @api_client.config.client_side_validation && date !~ pattern
59
+ fail ArgumentError, "invalid value for 'date' when calling DataExpiryApi.get_expiry_notices, must conform to the pattern #{pattern}."
60
+ end
61
+
62
+ date_string = date
63
+ end
64
+
65
+ # resource path
66
+ local_var_path = '/v1/metronome/expiry-notices/{date}'.sub('{' + 'date' + '}', CGI.escape(date_string)) # PDS patch
67
+
68
+ # query parameters
69
+ query_params = opts[:query_params] || {}
70
+
71
+ # header parameters
72
+ header_params = opts[:header_params] || {}
73
+ # HTTP header 'Accept' (if needed)
74
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
75
+
76
+ # form parameters
77
+ form_params = opts[:form_params] || {}
78
+
79
+ # http body (model)
80
+ post_body = opts[:debug_body]
81
+
82
+ # return_type
83
+ return_type = opts[:debug_return_type] || 'ExpiryResponse'
84
+
85
+ # auth_names
86
+ auth_names = opts[:debug_auth_names] || ['ApiKeyAuth']
87
+
88
+ new_options = opts.merge(
89
+ :operation => :"DataExpiryApi.get_expiry_notices",
90
+ :header_params => header_params,
91
+ :query_params => query_params,
92
+ :form_params => form_params,
93
+ :body => post_body,
94
+ :auth_names => auth_names,
95
+ :return_type => return_type
96
+ )
97
+
98
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
99
+ if @api_client.config.debugging
100
+ @api_client.config.logger.debug "API called: DataExpiryApi#get_expiry_notices\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
101
+ end
102
+ return data, status_code, headers
103
+ end
104
+ end
105
+ end