plainrouter-sdk 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.
- checksums.yaml +7 -0
- data/LICENSE +202 -0
- data/README.md +59 -0
- data/lib/plainrouter/client.rb +44 -0
- data/lib/plainrouter/openapi/api/event_api.rb +213 -0
- data/lib/plainrouter/openapi/api/operations_api.rb +542 -0
- data/lib/plainrouter/openapi/api/sandbox_api.rb +272 -0
- data/lib/plainrouter/openapi/api_client.rb +441 -0
- data/lib/plainrouter/openapi/api_error.rb +58 -0
- data/lib/plainrouter/openapi/api_model_base.rb +88 -0
- data/lib/plainrouter/openapi/configuration.rb +399 -0
- data/lib/plainrouter/openapi/models/create_event200_response.rb +190 -0
- data/lib/plainrouter/openapi/models/create_event_request.rb +103 -0
- data/lib/plainrouter/openapi/models/create_event_request_any_of.rb +344 -0
- data/lib/plainrouter/openapi/models/create_event_request_any_of1.rb +346 -0
- data/lib/plainrouter/openapi/models/create_event_request_any_of_event_time.rb +104 -0
- data/lib/plainrouter/openapi/models/create_event_request_any_of_value_data.rb +186 -0
- data/lib/plainrouter/openapi/models/create_sandbox_key201_response.rb +320 -0
- data/lib/plainrouter/openapi/models/create_sandbox_key201_response_use.rb +216 -0
- data/lib/plainrouter/openapi/models/delete_user_data200_response.rb +268 -0
- data/lib/plainrouter/openapi/models/delete_user_data_request.rb +225 -0
- data/lib/plainrouter/openapi/models/delivery_status.rb +49 -0
- data/lib/plainrouter/openapi/models/destination.rb +354 -0
- data/lib/plainrouter/openapi/models/destination_credential_source.rb +40 -0
- data/lib/plainrouter/openapi/models/destination_status.rb +40 -0
- data/lib/plainrouter/openapi/models/destination_type.rb +39 -0
- data/lib/plainrouter/openapi/models/emq_snapshot.rb +344 -0
- data/lib/plainrouter/openapi/models/error_message.rb +164 -0
- data/lib/plainrouter/openapi/models/event.rb +782 -0
- data/lib/plainrouter/openapi/models/get_emq_report200_response.rb +166 -0
- data/lib/plainrouter/openapi/models/get_emq_report200_response_snapshots_inner.rb +342 -0
- data/lib/plainrouter/openapi/models/get_event200_response.rb +218 -0
- data/lib/plainrouter/openapi/models/get_event200_response_deliveries_inner.rb +440 -0
- data/lib/plainrouter/openapi/models/get_event200_response_event.rb +624 -0
- data/lib/plainrouter/openapi/models/get_event200_response_event_consent.rb +103 -0
- data/lib/plainrouter/openapi/models/get_event200_response_event_deliveries_inner.rb +414 -0
- data/lib/plainrouter/openapi/models/get_event200_response_lineage.rb +178 -0
- data/lib/plainrouter/openapi/models/get_event200_response_lineage_children_inner.rb +596 -0
- data/lib/plainrouter/openapi/models/get_event200_response_lineage_parent.rb +596 -0
- data/lib/plainrouter/openapi/models/get_reconciliation_report200_response.rb +192 -0
- data/lib/plainrouter/openapi/models/get_reconciliation_report200_response_reports_inner.rb +476 -0
- data/lib/plainrouter/openapi/models/get_reconciliation_report200_response_reports_inner_buckets_value.rb +216 -0
- data/lib/plainrouter/openapi/models/get_reconciliation_report200_response_reports_inner_event_counts.rb +190 -0
- data/lib/plainrouter/openapi/models/get_reconciliation_report200_response_reports_inner_event_counts_accepted.rb +103 -0
- data/lib/plainrouter/openapi/models/get_sandbox200_response.rb +372 -0
- data/lib/plainrouter/openapi/models/get_sandbox200_response_self_serve_key.rb +242 -0
- data/lib/plainrouter/openapi/models/get_sandbox200_response_try.rb +242 -0
- data/lib/plainrouter/openapi/models/get_sandbox200_response_try_body.rb +242 -0
- data/lib/plainrouter/openapi/models/get_sandbox200_response_try_body_value_data.rb +216 -0
- data/lib/plainrouter/openapi/models/jurisdiction_policy_class.rb +40 -0
- data/lib/plainrouter/openapi/models/list_events200_response.rb +190 -0
- data/lib/plainrouter/openapi/models/list_events200_response_events.rb +382 -0
- data/lib/plainrouter/openapi/models/list_events200_response_events_links_inner.rb +202 -0
- data/lib/plainrouter/openapi/models/list_events200_response_metrics.rb +228 -0
- data/lib/plainrouter/openapi/models/list_events_by_cursor200_response.rb +190 -0
- data/lib/plainrouter/openapi/models/list_events_by_cursor200_response_events.rb +252 -0
- data/lib/plainrouter/openapi/models/reconciliation_report.rb +464 -0
- data/lib/plainrouter/openapi/models/replay_deliveries202_response.rb +242 -0
- data/lib/plainrouter/openapi/models/replay_deliveries_request.rb +199 -0
- data/lib/plainrouter/openapi/models/send_test_purchase200_response.rb +224 -0
- data/lib/plainrouter/openapi/models/send_test_purchase422_response.rb +103 -0
- data/lib/plainrouter/openapi/models/send_test_purchase_request.rb +224 -0
- data/lib/plainrouter/openapi/models/set_destination_test_mode200_response.rb +190 -0
- data/lib/plainrouter/openapi/models/set_destination_test_mode200_response_destination.rb +338 -0
- data/lib/plainrouter/openapi/models/set_destination_test_mode_request.rb +189 -0
- data/lib/plainrouter/openapi/models/traffic_class.rb +40 -0
- data/lib/plainrouter/openapi/models/validate_sandbox_event200_response.rb +320 -0
- data/lib/plainrouter/openapi/models/validate_sandbox_event_request.rb +194 -0
- data/lib/plainrouter/openapi/models/validate_sandbox_event_request_value_data.rb +166 -0
- data/lib/plainrouter/openapi/models/validation_error.rb +192 -0
- data/lib/plainrouter/openapi/version.rb +15 -0
- data/lib/plainrouter/openapi.rb +102 -0
- data/lib/plainrouter/version.rb +6 -0
- data/lib/plainrouter.rb +10 -0
- metadata +176 -0
|
@@ -0,0 +1,272 @@
|
|
|
1
|
+
=begin
|
|
2
|
+
#PlainRouter Conversion API
|
|
3
|
+
|
|
4
|
+
#PlainRouter public Signals Conversion API.
|
|
5
|
+
|
|
6
|
+
The version of the OpenAPI document: 0.5.0
|
|
7
|
+
|
|
8
|
+
Generated by: https://openapi-generator.tech
|
|
9
|
+
Generator version: 7.25.0
|
|
10
|
+
|
|
11
|
+
=end
|
|
12
|
+
|
|
13
|
+
require 'cgi'
|
|
14
|
+
|
|
15
|
+
module PlainRouter::OpenAPI
|
|
16
|
+
class SandboxApi
|
|
17
|
+
attr_accessor :api_client
|
|
18
|
+
|
|
19
|
+
def initialize(api_client = ApiClient.default)
|
|
20
|
+
@api_client = api_client
|
|
21
|
+
end
|
|
22
|
+
# Create a sandbox API key
|
|
23
|
+
# Issues a short-lived sandbox-only bearer key without an account, human approval, or production access.
|
|
24
|
+
# @param [Hash] opts the optional parameters
|
|
25
|
+
# @return [CreateSandboxKey201Response]
|
|
26
|
+
def create_sandbox_key(opts = {})
|
|
27
|
+
data, _status_code, _headers = create_sandbox_key_with_http_info(opts)
|
|
28
|
+
data
|
|
29
|
+
end
|
|
30
|
+
|
|
31
|
+
# Create a sandbox API key
|
|
32
|
+
# Issues a short-lived sandbox-only bearer key without an account, human approval, or production access.
|
|
33
|
+
# @param [Hash] opts the optional parameters
|
|
34
|
+
# @return [Array<(CreateSandboxKey201Response, Integer, Hash)>] CreateSandboxKey201Response data, response status code and response headers
|
|
35
|
+
def create_sandbox_key_with_http_info(opts = {})
|
|
36
|
+
if @api_client.config.debugging
|
|
37
|
+
@api_client.config.logger.debug 'Calling API: SandboxApi.create_sandbox_key ...'
|
|
38
|
+
end
|
|
39
|
+
# resource path
|
|
40
|
+
local_var_path = '/sandbox/keys'
|
|
41
|
+
|
|
42
|
+
# query parameters
|
|
43
|
+
query_params = opts[:query_params] || {}
|
|
44
|
+
|
|
45
|
+
# header parameters
|
|
46
|
+
header_params = opts[:header_params] || {}
|
|
47
|
+
# HTTP header 'Accept' (if needed)
|
|
48
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
|
49
|
+
|
|
50
|
+
# form parameters
|
|
51
|
+
form_params = opts[:form_params] || {}
|
|
52
|
+
|
|
53
|
+
# http body (model)
|
|
54
|
+
post_body = opts[:debug_body]
|
|
55
|
+
|
|
56
|
+
# return_type
|
|
57
|
+
return_type = opts[:debug_return_type] || 'CreateSandboxKey201Response'
|
|
58
|
+
|
|
59
|
+
# auth_names
|
|
60
|
+
auth_names = opts[:debug_auth_names] || []
|
|
61
|
+
|
|
62
|
+
new_options = opts.merge(
|
|
63
|
+
:operation => :"SandboxApi.create_sandbox_key",
|
|
64
|
+
:header_params => header_params,
|
|
65
|
+
:query_params => query_params,
|
|
66
|
+
:form_params => form_params,
|
|
67
|
+
:body => post_body,
|
|
68
|
+
:auth_names => auth_names,
|
|
69
|
+
:return_type => return_type
|
|
70
|
+
)
|
|
71
|
+
|
|
72
|
+
data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
|
|
73
|
+
if @api_client.config.debugging
|
|
74
|
+
@api_client.config.logger.debug "API called: SandboxApi#create_sandbox_key\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
75
|
+
end
|
|
76
|
+
return data, status_code, headers
|
|
77
|
+
end
|
|
78
|
+
|
|
79
|
+
# Discover the zero-auth sandbox
|
|
80
|
+
# Returns a ready-to-run synthetic event example. The sandbox requires no account or API key and cannot read production data, persist events, or contact an advertising provider.
|
|
81
|
+
# @param [Hash] opts the optional parameters
|
|
82
|
+
# @return [GetSandbox200Response]
|
|
83
|
+
def get_sandbox(opts = {})
|
|
84
|
+
data, _status_code, _headers = get_sandbox_with_http_info(opts)
|
|
85
|
+
data
|
|
86
|
+
end
|
|
87
|
+
|
|
88
|
+
# Discover the zero-auth sandbox
|
|
89
|
+
# Returns a ready-to-run synthetic event example. The sandbox requires no account or API key and cannot read production data, persist events, or contact an advertising provider.
|
|
90
|
+
# @param [Hash] opts the optional parameters
|
|
91
|
+
# @return [Array<(GetSandbox200Response, Integer, Hash)>] GetSandbox200Response data, response status code and response headers
|
|
92
|
+
def get_sandbox_with_http_info(opts = {})
|
|
93
|
+
if @api_client.config.debugging
|
|
94
|
+
@api_client.config.logger.debug 'Calling API: SandboxApi.get_sandbox ...'
|
|
95
|
+
end
|
|
96
|
+
# resource path
|
|
97
|
+
local_var_path = '/sandbox'
|
|
98
|
+
|
|
99
|
+
# query parameters
|
|
100
|
+
query_params = opts[:query_params] || {}
|
|
101
|
+
|
|
102
|
+
# header parameters
|
|
103
|
+
header_params = opts[:header_params] || {}
|
|
104
|
+
# HTTP header 'Accept' (if needed)
|
|
105
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
|
106
|
+
|
|
107
|
+
# form parameters
|
|
108
|
+
form_params = opts[:form_params] || {}
|
|
109
|
+
|
|
110
|
+
# http body (model)
|
|
111
|
+
post_body = opts[:debug_body]
|
|
112
|
+
|
|
113
|
+
# return_type
|
|
114
|
+
return_type = opts[:debug_return_type] || 'GetSandbox200Response'
|
|
115
|
+
|
|
116
|
+
# auth_names
|
|
117
|
+
auth_names = opts[:debug_auth_names] || []
|
|
118
|
+
|
|
119
|
+
new_options = opts.merge(
|
|
120
|
+
:operation => :"SandboxApi.get_sandbox",
|
|
121
|
+
:header_params => header_params,
|
|
122
|
+
:query_params => query_params,
|
|
123
|
+
:form_params => form_params,
|
|
124
|
+
:body => post_body,
|
|
125
|
+
:auth_names => auth_names,
|
|
126
|
+
:return_type => return_type
|
|
127
|
+
)
|
|
128
|
+
|
|
129
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
|
130
|
+
if @api_client.config.debugging
|
|
131
|
+
@api_client.config.logger.debug "API called: SandboxApi#get_sandbox\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
132
|
+
end
|
|
133
|
+
return data, status_code, headers
|
|
134
|
+
end
|
|
135
|
+
|
|
136
|
+
# Validate a synthetic event
|
|
137
|
+
# Validates and immediately discards one identity-free synthetic event. It requires no account or API key and never writes to the ledger or contacts Meta.
|
|
138
|
+
# @param validate_sandbox_event_request [ValidateSandboxEventRequest]
|
|
139
|
+
# @param [Hash] opts the optional parameters
|
|
140
|
+
# @return [ValidateSandboxEvent200Response]
|
|
141
|
+
def validate_sandbox_event(validate_sandbox_event_request, opts = {})
|
|
142
|
+
data, _status_code, _headers = validate_sandbox_event_with_http_info(validate_sandbox_event_request, opts)
|
|
143
|
+
data
|
|
144
|
+
end
|
|
145
|
+
|
|
146
|
+
# Validate a synthetic event
|
|
147
|
+
# Validates and immediately discards one identity-free synthetic event. It requires no account or API key and never writes to the ledger or contacts Meta.
|
|
148
|
+
# @param validate_sandbox_event_request [ValidateSandboxEventRequest]
|
|
149
|
+
# @param [Hash] opts the optional parameters
|
|
150
|
+
# @return [Array<(ValidateSandboxEvent200Response, Integer, Hash)>] ValidateSandboxEvent200Response data, response status code and response headers
|
|
151
|
+
def validate_sandbox_event_with_http_info(validate_sandbox_event_request, opts = {})
|
|
152
|
+
if @api_client.config.debugging
|
|
153
|
+
@api_client.config.logger.debug 'Calling API: SandboxApi.validate_sandbox_event ...'
|
|
154
|
+
end
|
|
155
|
+
# verify the required parameter 'validate_sandbox_event_request' is set
|
|
156
|
+
if @api_client.config.client_side_validation && validate_sandbox_event_request.nil?
|
|
157
|
+
fail ArgumentError, "Missing the required parameter 'validate_sandbox_event_request' when calling SandboxApi.validate_sandbox_event"
|
|
158
|
+
end
|
|
159
|
+
# resource path
|
|
160
|
+
local_var_path = '/sandbox/events'
|
|
161
|
+
|
|
162
|
+
# query parameters
|
|
163
|
+
query_params = opts[:query_params] || {}
|
|
164
|
+
|
|
165
|
+
# header parameters
|
|
166
|
+
header_params = opts[:header_params] || {}
|
|
167
|
+
# HTTP header 'Accept' (if needed)
|
|
168
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
|
169
|
+
# HTTP header 'Content-Type'
|
|
170
|
+
content_type = @api_client.select_header_content_type(['application/json'])
|
|
171
|
+
if !content_type.nil?
|
|
172
|
+
header_params['Content-Type'] = content_type
|
|
173
|
+
end
|
|
174
|
+
|
|
175
|
+
# form parameters
|
|
176
|
+
form_params = opts[:form_params] || {}
|
|
177
|
+
|
|
178
|
+
# http body (model)
|
|
179
|
+
post_body = opts[:debug_body] || @api_client.object_to_http_body(validate_sandbox_event_request)
|
|
180
|
+
|
|
181
|
+
# return_type
|
|
182
|
+
return_type = opts[:debug_return_type] || 'ValidateSandboxEvent200Response'
|
|
183
|
+
|
|
184
|
+
# auth_names
|
|
185
|
+
auth_names = opts[:debug_auth_names] || []
|
|
186
|
+
|
|
187
|
+
new_options = opts.merge(
|
|
188
|
+
:operation => :"SandboxApi.validate_sandbox_event",
|
|
189
|
+
:header_params => header_params,
|
|
190
|
+
:query_params => query_params,
|
|
191
|
+
:form_params => form_params,
|
|
192
|
+
:body => post_body,
|
|
193
|
+
:auth_names => auth_names,
|
|
194
|
+
:return_type => return_type
|
|
195
|
+
)
|
|
196
|
+
|
|
197
|
+
data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
|
|
198
|
+
if @api_client.config.debugging
|
|
199
|
+
@api_client.config.logger.debug "API called: SandboxApi#validate_sandbox_event\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
200
|
+
end
|
|
201
|
+
return data, status_code, headers
|
|
202
|
+
end
|
|
203
|
+
|
|
204
|
+
# Validate a synthetic event with a sandbox key
|
|
205
|
+
# Validates a synthetic event using the short-lived key returned by the self-serve sandbox key endpoint. It never persists data or contacts an advertising provider.
|
|
206
|
+
# @param validate_sandbox_event_request [ValidateSandboxEventRequest]
|
|
207
|
+
# @param [Hash] opts the optional parameters
|
|
208
|
+
# @return [ValidateSandboxEvent200Response]
|
|
209
|
+
def validate_sandbox_event_with_key(validate_sandbox_event_request, opts = {})
|
|
210
|
+
data, _status_code, _headers = validate_sandbox_event_with_key_with_http_info(validate_sandbox_event_request, opts)
|
|
211
|
+
data
|
|
212
|
+
end
|
|
213
|
+
|
|
214
|
+
# Validate a synthetic event with a sandbox key
|
|
215
|
+
# Validates a synthetic event using the short-lived key returned by the self-serve sandbox key endpoint. It never persists data or contacts an advertising provider.
|
|
216
|
+
# @param validate_sandbox_event_request [ValidateSandboxEventRequest]
|
|
217
|
+
# @param [Hash] opts the optional parameters
|
|
218
|
+
# @return [Array<(ValidateSandboxEvent200Response, Integer, Hash)>] ValidateSandboxEvent200Response data, response status code and response headers
|
|
219
|
+
def validate_sandbox_event_with_key_with_http_info(validate_sandbox_event_request, opts = {})
|
|
220
|
+
if @api_client.config.debugging
|
|
221
|
+
@api_client.config.logger.debug 'Calling API: SandboxApi.validate_sandbox_event_with_key ...'
|
|
222
|
+
end
|
|
223
|
+
# verify the required parameter 'validate_sandbox_event_request' is set
|
|
224
|
+
if @api_client.config.client_side_validation && validate_sandbox_event_request.nil?
|
|
225
|
+
fail ArgumentError, "Missing the required parameter 'validate_sandbox_event_request' when calling SandboxApi.validate_sandbox_event_with_key"
|
|
226
|
+
end
|
|
227
|
+
# resource path
|
|
228
|
+
local_var_path = '/sandbox/keyed-events'
|
|
229
|
+
|
|
230
|
+
# query parameters
|
|
231
|
+
query_params = opts[:query_params] || {}
|
|
232
|
+
|
|
233
|
+
# header parameters
|
|
234
|
+
header_params = opts[:header_params] || {}
|
|
235
|
+
# HTTP header 'Accept' (if needed)
|
|
236
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
|
237
|
+
# HTTP header 'Content-Type'
|
|
238
|
+
content_type = @api_client.select_header_content_type(['application/json'])
|
|
239
|
+
if !content_type.nil?
|
|
240
|
+
header_params['Content-Type'] = content_type
|
|
241
|
+
end
|
|
242
|
+
|
|
243
|
+
# form parameters
|
|
244
|
+
form_params = opts[:form_params] || {}
|
|
245
|
+
|
|
246
|
+
# http body (model)
|
|
247
|
+
post_body = opts[:debug_body] || @api_client.object_to_http_body(validate_sandbox_event_request)
|
|
248
|
+
|
|
249
|
+
# return_type
|
|
250
|
+
return_type = opts[:debug_return_type] || 'ValidateSandboxEvent200Response'
|
|
251
|
+
|
|
252
|
+
# auth_names
|
|
253
|
+
auth_names = opts[:debug_auth_names] || ['sandboxCredential']
|
|
254
|
+
|
|
255
|
+
new_options = opts.merge(
|
|
256
|
+
:operation => :"SandboxApi.validate_sandbox_event_with_key",
|
|
257
|
+
:header_params => header_params,
|
|
258
|
+
:query_params => query_params,
|
|
259
|
+
:form_params => form_params,
|
|
260
|
+
:body => post_body,
|
|
261
|
+
:auth_names => auth_names,
|
|
262
|
+
:return_type => return_type
|
|
263
|
+
)
|
|
264
|
+
|
|
265
|
+
data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
|
|
266
|
+
if @api_client.config.debugging
|
|
267
|
+
@api_client.config.logger.debug "API called: SandboxApi#validate_sandbox_event_with_key\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
268
|
+
end
|
|
269
|
+
return data, status_code, headers
|
|
270
|
+
end
|
|
271
|
+
end
|
|
272
|
+
end
|