plainrouter-sdk 0.5.0 → 0.6.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 +4 -4
- data/README.md +7 -0
- data/lib/plainrouter/client.rb +337 -3
- data/lib/plainrouter/closed_input_objects.json +3896 -0
- data/lib/plainrouter/closed_input_validator.rb +246 -0
- data/lib/plainrouter/integer_input_fields.json +579 -0
- data/lib/plainrouter/openapi/api/action_read_api_api.rb +71 -31
- data/lib/plainrouter/openapi/api/action_rule_api_api.rb +350 -0
- data/lib/plainrouter/openapi/api/ad_test_api_api.rb +13 -9
- data/lib/plainrouter/openapi/api/agent_context_api.rb +93 -0
- data/lib/plainrouter/openapi/api/creative_api.rb +241 -0
- data/lib/plainrouter/openapi/api/deployment_plan_api.rb +257 -2
- data/lib/plainrouter/openapi/api/draft_batch_file_import_api.rb +142 -0
- data/lib/plainrouter/openapi/api/launch_policy_api.rb +242 -0
- data/lib/plainrouter/openapi/api/meta_inventory_exposure_api.rb +133 -0
- data/lib/plainrouter/openapi/api_client.rb +3 -0
- data/lib/plainrouter/openapi/api_model_base.rb +2 -0
- data/lib/plainrouter/openapi/configuration.rb +34 -0
- data/lib/plainrouter/openapi/models/action_batch_read_data.rb +42 -4
- data/lib/plainrouter/openapi/models/action_dry_run_read_dry_run.rb +42 -4
- data/lib/plainrouter/openapi/models/action_list_read_meta.rb +33 -4
- data/lib/plainrouter/openapi/models/action_proposal_input.rb +72 -1
- data/lib/plainrouter/openapi/models/action_proposal_input_actions_inner.rb +1 -0
- data/lib/plainrouter/openapi/models/action_proposal_input_actions_inner_any_of.rb +2 -0
- data/lib/plainrouter/openapi/models/action_proposal_input_actions_inner_any_of1.rb +2 -0
- data/lib/plainrouter/openapi/models/action_proposal_input_actions_inner_any_of10.rb +2 -0
- data/lib/plainrouter/openapi/models/action_proposal_input_actions_inner_any_of10_params.rb +2 -0
- data/lib/plainrouter/openapi/models/action_proposal_input_actions_inner_any_of11.rb +3 -1
- data/lib/plainrouter/openapi/models/action_proposal_input_actions_inner_any_of12.rb +2 -0
- data/lib/plainrouter/openapi/models/action_proposal_input_actions_inner_any_of12_params.rb +2 -0
- data/lib/plainrouter/openapi/models/action_proposal_input_actions_inner_any_of13.rb +2 -0
- data/lib/plainrouter/openapi/models/action_proposal_input_actions_inner_any_of13_params.rb +2 -0
- data/lib/plainrouter/openapi/models/action_proposal_input_actions_inner_any_of2.rb +2 -0
- data/lib/plainrouter/openapi/models/action_proposal_input_actions_inner_any_of3.rb +2 -0
- data/lib/plainrouter/openapi/models/action_proposal_input_actions_inner_any_of4.rb +2 -0
- data/lib/plainrouter/openapi/models/action_proposal_input_actions_inner_any_of4_target_entity.rb +2 -0
- data/lib/plainrouter/openapi/models/action_proposal_input_actions_inner_any_of5.rb +2 -0
- data/lib/plainrouter/openapi/models/action_proposal_input_actions_inner_any_of6.rb +2 -0
- data/lib/plainrouter/openapi/models/action_proposal_input_actions_inner_any_of7.rb +2 -0
- data/lib/plainrouter/openapi/models/action_proposal_input_actions_inner_any_of8.rb +2 -0
- data/lib/plainrouter/openapi/models/action_proposal_input_actions_inner_any_of9.rb +2 -0
- data/lib/plainrouter/openapi/models/action_proposal_input_actions_inner_any_of_params.rb +2 -0
- data/lib/plainrouter/openapi/models/action_proposal_input_actions_inner_any_of_target_entity.rb +2 -0
- data/lib/plainrouter/openapi/models/action_proposal_input_evidence_inner.rb +4 -2
- data/lib/plainrouter/openapi/models/action_proposal_read_proposal.rb +42 -4
- data/lib/plainrouter/openapi/models/action_read_item.rb +11 -1
- data/lib/plainrouter/openapi/models/action_read_item_counted_evidence.rb +319 -0
- data/lib/plainrouter/openapi/models/action_read_item_counted_evidence_counted.rb +174 -0
- data/lib/plainrouter/openapi/models/action_read_item_counted_evidence_coverage.rb +162 -0
- data/lib/plainrouter/openapi/models/action_read_item_counted_evidence_meta_reported.rb +198 -0
- data/lib/plainrouter/openapi/models/{action_proposal_input_actions_inner_any_of11_params.rb → action_read_item_counted_evidence_target.rb} +41 -24
- data/lib/plainrouter/openapi/models/action_read_item_counted_evidence_window.rb +225 -0
- data/lib/plainrouter/openapi/models/action_receipt_unavailable.rb +164 -0
- data/lib/plainrouter/openapi/models/action_receipt_unavailable_error.rb +214 -0
- data/lib/plainrouter/openapi/models/action_rule_detail_read.rb +164 -0
- data/lib/plainrouter/openapi/models/action_rule_detail_read_rule.rb +402 -0
- data/lib/plainrouter/openapi/models/action_rule_detail_read_rule_current_revision.rb +388 -0
- data/lib/plainrouter/openapi/models/action_rule_detail_read_rule_runs_inner.rb +396 -0
- data/lib/plainrouter/openapi/models/action_rule_detail_read_rule_runs_inner_decisions_inner.rb +382 -0
- data/lib/plainrouter/openapi/models/action_rule_detail_read_rule_window.rb +242 -0
- data/lib/plainrouter/openapi/models/action_rule_write_read.rb +164 -0
- data/lib/plainrouter/openapi/models/action_rule_write_read_rule.rb +373 -0
- data/lib/plainrouter/openapi/models/actions_api_decision_receipt404_response.rb +103 -0
- data/lib/plainrouter/openapi/models/actions_rules_index200_response.rb +164 -0
- data/lib/plainrouter/openapi/models/actions_rules_index200_response_rules.rb +196 -0
- data/lib/plainrouter/openapi/models/actions_rules_index200_response_rules_data_inner.rb +344 -0
- data/lib/plainrouter/openapi/models/actions_rules_index200_response_rules_data_inner_account.rb +157 -0
- data/lib/plainrouter/openapi/models/actions_rules_index200_response_rules_data_inner_counts.rb +156 -0
- data/lib/plainrouter/openapi/models/actions_rules_index403_response.rb +103 -0
- data/lib/plainrouter/openapi/models/actions_rules_index403_response_any_of.rb +214 -0
- data/lib/plainrouter/openapi/models/actions_rules_store_request.rb +317 -0
- data/lib/plainrouter/openapi/models/actions_rules_store_request_definition.rb +105 -0
- data/lib/plainrouter/openapi/models/actions_rules_store_request_definition_any_of.rb +317 -0
- data/lib/plainrouter/openapi/models/actions_rules_store_request_definition_any_of1.rb +361 -0
- data/lib/plainrouter/openapi/models/actions_rules_store_request_definition_any_of2.rb +361 -0
- data/lib/plainrouter/openapi/models/actions_rules_store_request_definition_any_of_cost_ratio.rb +104 -0
- data/lib/plainrouter/openapi/models/actions_rules_store_request_window.rb +103 -0
- data/lib/plainrouter/openapi/models/actions_rules_update_request.rb +267 -0
- data/lib/plainrouter/openapi/models/actions_rules_update_request_definition.rb +105 -0
- data/lib/plainrouter/openapi/models/actions_rules_update_request_definition_any_of.rb +317 -0
- data/lib/plainrouter/openapi/models/actions_rules_update_request_definition_any_of1.rb +361 -0
- data/lib/plainrouter/openapi/models/actions_rules_update_request_definition_any_of2.rb +361 -0
- data/lib/plainrouter/openapi/models/ad_test_list_read_tests.rb +1 -1
- data/lib/plainrouter/openapi/models/agent_context200_response.rb +214 -0
- data/lib/plainrouter/openapi/models/agent_context200_response_agent.rb +268 -0
- data/lib/plainrouter/openapi/models/agent_context200_response_platform_ad_account.rb +292 -0
- data/lib/plainrouter/openapi/models/agent_context200_response_platform_ad_account_workspace.rb +190 -0
- data/lib/plainrouter/openapi/models/agent_context401_response.rb +103 -0
- data/lib/plainrouter/openapi/models/agent_context_auth_error.rb +190 -0
- data/lib/plainrouter/openapi/models/creative_intake_read.rb +1 -1
- data/lib/plainrouter/openapi/models/creative_mcp_grant_operation.rb +44 -0
- data/lib/plainrouter/openapi/models/creative_mcp_preview.rb +283 -0
- data/lib/plainrouter/openapi/models/creative_mcp_refusal.rb +45 -0
- data/lib/plainrouter/openapi/models/creative_mcp_tool.rb +44 -0
- data/lib/plainrouter/openapi/models/delivery_status.rb +2 -1
- data/lib/plainrouter/openapi/models/deployment_plan_read.rb +42 -4
- data/lib/plainrouter/openapi/models/destination.rb +73 -9
- data/lib/plainrouter/openapi/models/destination_config.rb +103 -0
- data/lib/plainrouter/openapi/models/destination_status.rb +2 -1
- data/lib/plainrouter/openapi/models/draft_batch_mode.rb +41 -0
- data/lib/plainrouter/openapi/models/get_account_inventory200_response.rb +341 -0
- data/lib/plainrouter/openapi/models/get_account_inventory200_response_summary.rb +158 -0
- data/lib/plainrouter/openapi/models/get_account_inventory404_response.rb +188 -0
- data/lib/plainrouter/openapi/models/get_event200_response_deliveries_inner.rb +25 -1
- data/lib/plainrouter/openapi/models/get_event200_response_event_deliveries_inner.rb +25 -1
- data/lib/plainrouter/openapi/models/get_inventory_metrics200_response.rb +26 -5
- data/lib/plainrouter/openapi/models/get_inventory_metrics200_response_pagination_value.rb +202 -0
- data/lib/plainrouter/openapi/models/launch_creatives_index200_response.rb +164 -0
- data/lib/plainrouter/openapi/models/launch_creatives_index200_response_creatives.rb +196 -0
- data/lib/plainrouter/openapi/models/{creative_intake_read_creative.rb → launch_creatives_index200_response_creatives_data_inner.rb} +4 -4
- data/lib/plainrouter/openapi/models/{creative_intake_read_creative_tags.rb → launch_creatives_index200_response_creatives_data_inner_tags.rb} +1 -1
- data/lib/plainrouter/openapi/models/launch_creatives_status200_response.rb +166 -0
- data/lib/plainrouter/openapi/models/launch_plans_copy422_response.rb +103 -0
- data/lib/plainrouter/openapi/models/launch_plans_index200_response_plans.rb +107 -4
- data/lib/plainrouter/openapi/models/launch_plans_index200_response_plans_next_page_arguments.rb +104 -0
- data/lib/plainrouter/openapi/models/launch_plans_index200_response_plans_next_page_arguments_any_of.rb +190 -0
- data/lib/plainrouter/openapi/models/launch_plans_index200_response_plans_next_page_arguments_any_of1.rb +190 -0
- data/lib/plainrouter/openapi/models/launch_plans_store201_response.rb +166 -0
- data/lib/plainrouter/openapi/models/launch_plans_validate422_response.rb +103 -0
- data/lib/plainrouter/openapi/models/launch_policies_index200_response.rb +164 -0
- data/lib/plainrouter/openapi/models/launch_policies_index200_response_policies.rb +453 -0
- data/lib/plainrouter/openapi/models/{list_events200_response_events_links_inner.rb → launch_policies_index200_response_policies_links_inner.rb} +3 -3
- data/lib/plainrouter/openapi/models/launch_policies_store201_response.rb +166 -0
- data/lib/plainrouter/openapi/models/launch_policy.rb +346 -0
- data/lib/plainrouter/openapi/models/launcher_file_import403_response.rb +216 -0
- data/lib/plainrouter/openapi/models/launcher_file_import422_response.rb +103 -0
- data/lib/plainrouter/openapi/models/launcher_file_import422_response_any_of.rb +242 -0
- data/lib/plainrouter/openapi/models/launcher_file_import422_response_any_of_syntactic_row_failures_inner.rb +190 -0
- data/lib/plainrouter/openapi/models/list_events200_response_events.rb +1 -1
- data/lib/plainrouter/openapi/models/plan_execute_rejected_error.rb +2 -2
- data/lib/plainrouter/openapi/models/plan_validate_rejected.rb +164 -0
- data/lib/plainrouter/openapi/models/plan_validate_rejected_error.rb +191 -0
- data/lib/plainrouter/openapi/models/proposal_unavailable.rb +164 -0
- data/lib/plainrouter/openapi/models/proposal_unavailable_error.rb +214 -0
- data/lib/plainrouter/openapi/models/set_destination_test_mode200_response_destination.rb +67 -1
- data/lib/plainrouter/openapi/models/{deployment_plan.rb → store_deployment_plan_request.rb} +185 -208
- data/lib/plainrouter/openapi/models/store_deployment_plan_request_ad_set_spec.rb +220 -0
- data/lib/plainrouter/openapi/models/store_deployment_plan_request_copy.rb +266 -0
- data/lib/plainrouter/openapi/models/store_deployment_plan_request_creative_overrides_inner.rb +217 -0
- data/lib/plainrouter/openapi/models/store_launch_policy_request.rb +260 -0
- data/lib/plainrouter/openapi/models/update_creative_status_request.rb +188 -0
- data/lib/plainrouter/openapi/models/update_deployment_plan_request.rb +511 -0
- data/lib/plainrouter/openapi/version.rb +1 -1
- data/lib/plainrouter/openapi.rb +87 -5
- data/lib/plainrouter/proposal_errors.rb +31 -0
- data/lib/plainrouter/version.rb +1 -1
- data/lib/plainrouter.rb +1 -0
- metadata +93 -7
|
@@ -172,7 +172,9 @@ module PlainRouter::OpenAPI
|
|
|
172
172
|
# Read plans for the approved ad account with their current review_version. Pass the version from the plan you reviewed when executing.
|
|
173
173
|
# @param workspace [Integer] The workspace ID
|
|
174
174
|
# @param [Hash] opts the optional parameters
|
|
175
|
-
# @option opts [Integer] :
|
|
175
|
+
# @option opts [Integer] :cursor Continue using next_cursor with the same filters; rule lists use an immutable rule ID, other lists an offset or object ID.
|
|
176
|
+
# @option opts [Integer] :per_page Maximum complete rows; the byte budget may return fewer. Defaults to 25. (default to 25)
|
|
177
|
+
# @option opts [Integer] :page Integer page from 1 through 10000000000000000; integer strings are accepted. Zero, negatives, fractions, non-numeric strings and booleans return 422 with a page field validation error. (default to 1)
|
|
176
178
|
# @return [LaunchPlansIndex200Response]
|
|
177
179
|
def launch_plans_index(workspace, opts = {})
|
|
178
180
|
data, _status_code, _headers = launch_plans_index_with_http_info(workspace, opts)
|
|
@@ -183,7 +185,9 @@ module PlainRouter::OpenAPI
|
|
|
183
185
|
# Read plans for the approved ad account with their current review_version. Pass the version from the plan you reviewed when executing.
|
|
184
186
|
# @param workspace [Integer] The workspace ID
|
|
185
187
|
# @param [Hash] opts the optional parameters
|
|
186
|
-
# @option opts [Integer] :
|
|
188
|
+
# @option opts [Integer] :cursor Continue using next_cursor with the same filters; rule lists use an immutable rule ID, other lists an offset or object ID.
|
|
189
|
+
# @option opts [Integer] :per_page Maximum complete rows; the byte budget may return fewer. Defaults to 25. (default to 25)
|
|
190
|
+
# @option opts [Integer] :page Integer page from 1 through 10000000000000000; integer strings are accepted. Zero, negatives, fractions, non-numeric strings and booleans return 422 with a page field validation error. (default to 1)
|
|
187
191
|
# @return [Array<(LaunchPlansIndex200Response, Integer, Hash)>] LaunchPlansIndex200Response data, response status code and response headers
|
|
188
192
|
def launch_plans_index_with_http_info(workspace, opts = {})
|
|
189
193
|
if @api_client.config.debugging
|
|
@@ -193,12 +197,26 @@ module PlainRouter::OpenAPI
|
|
|
193
197
|
if @api_client.config.client_side_validation && workspace.nil?
|
|
194
198
|
fail ArgumentError, "Missing the required parameter 'workspace' when calling DeploymentPlanApi.launch_plans_index"
|
|
195
199
|
end
|
|
200
|
+
if @api_client.config.client_side_validation && !opts[:'cursor'].nil? && !opts[:'cursor'].is_a?(String) && opts[:'cursor'] < 0
|
|
201
|
+
fail ArgumentError, 'invalid value for "opts[:"cursor"]" when calling DeploymentPlanApi.launch_plans_index, must be greater than or equal to 0.'
|
|
202
|
+
end
|
|
203
|
+
|
|
204
|
+
if @api_client.config.client_side_validation && !opts[:'page'].nil? && !opts[:'page'].is_a?(String) && opts[:'page'] > 10000000000000000
|
|
205
|
+
fail ArgumentError, 'invalid value for "opts[:"page"]" when calling DeploymentPlanApi.launch_plans_index, must be smaller than or equal to 10000000000000000.'
|
|
206
|
+
end
|
|
207
|
+
|
|
208
|
+
if @api_client.config.client_side_validation && !opts[:'page'].nil? && !opts[:'page'].is_a?(String) && opts[:'page'] < 1
|
|
209
|
+
fail ArgumentError, 'invalid value for "opts[:"page"]" when calling DeploymentPlanApi.launch_plans_index, must be greater than or equal to 1.'
|
|
210
|
+
end
|
|
211
|
+
|
|
196
212
|
# resource path
|
|
197
213
|
local_var_path = '/workspaces/{workspace}/admin/plans'.sub('{workspace}', CGI.escape(workspace.to_s))
|
|
198
214
|
|
|
199
215
|
# query parameters
|
|
200
216
|
query_params = opts[:query_params] || {}
|
|
217
|
+
query_params[:'cursor'] = opts[:'cursor'] if !opts[:'cursor'].nil?
|
|
201
218
|
query_params[:'per_page'] = opts[:'per_page'] if !opts[:'per_page'].nil?
|
|
219
|
+
query_params[:'page'] = opts[:'page'] if !opts[:'page'].nil?
|
|
202
220
|
|
|
203
221
|
# header parameters
|
|
204
222
|
header_params = opts[:header_params] || {}
|
|
@@ -239,6 +257,8 @@ module PlainRouter::OpenAPI
|
|
|
239
257
|
# @param workspace [Integer] The workspace ID
|
|
240
258
|
# @param deployment_plan [String]
|
|
241
259
|
# @param [Hash] opts the optional parameters
|
|
260
|
+
# @option opts [Integer] :cursor Continue using next_cursor with the same filters; rule lists use an immutable rule ID, other lists an offset or object ID.
|
|
261
|
+
# @option opts [Integer] :limit Maximum complete rows; the byte budget may return fewer. Defaults to 5. (default to 5)
|
|
242
262
|
# @return [LaunchPlansShow200Response]
|
|
243
263
|
def launch_plans_show(workspace, deployment_plan, opts = {})
|
|
244
264
|
data, _status_code, _headers = launch_plans_show_with_http_info(workspace, deployment_plan, opts)
|
|
@@ -250,6 +270,8 @@ module PlainRouter::OpenAPI
|
|
|
250
270
|
# @param workspace [Integer] The workspace ID
|
|
251
271
|
# @param deployment_plan [String]
|
|
252
272
|
# @param [Hash] opts the optional parameters
|
|
273
|
+
# @option opts [Integer] :cursor Continue using next_cursor with the same filters; rule lists use an immutable rule ID, other lists an offset or object ID.
|
|
274
|
+
# @option opts [Integer] :limit Maximum complete rows; the byte budget may return fewer. Defaults to 5. (default to 5)
|
|
253
275
|
# @return [Array<(LaunchPlansShow200Response, Integer, Hash)>] LaunchPlansShow200Response data, response status code and response headers
|
|
254
276
|
def launch_plans_show_with_http_info(workspace, deployment_plan, opts = {})
|
|
255
277
|
if @api_client.config.debugging
|
|
@@ -263,11 +285,25 @@ module PlainRouter::OpenAPI
|
|
|
263
285
|
if @api_client.config.client_side_validation && deployment_plan.nil?
|
|
264
286
|
fail ArgumentError, "Missing the required parameter 'deployment_plan' when calling DeploymentPlanApi.launch_plans_show"
|
|
265
287
|
end
|
|
288
|
+
if @api_client.config.client_side_validation && !opts[:'cursor'].nil? && !opts[:'cursor'].is_a?(String) && opts[:'cursor'] < 0
|
|
289
|
+
fail ArgumentError, 'invalid value for "opts[:"cursor"]" when calling DeploymentPlanApi.launch_plans_show, must be greater than or equal to 0.'
|
|
290
|
+
end
|
|
291
|
+
|
|
292
|
+
if @api_client.config.client_side_validation && !opts[:'limit'].nil? && !opts[:'limit'].is_a?(String) && opts[:'limit'] > 100
|
|
293
|
+
fail ArgumentError, 'invalid value for "opts[:"limit"]" when calling DeploymentPlanApi.launch_plans_show, must be smaller than or equal to 100.'
|
|
294
|
+
end
|
|
295
|
+
|
|
296
|
+
if @api_client.config.client_side_validation && !opts[:'limit'].nil? && !opts[:'limit'].is_a?(String) && opts[:'limit'] < 1
|
|
297
|
+
fail ArgumentError, 'invalid value for "opts[:"limit"]" when calling DeploymentPlanApi.launch_plans_show, must be greater than or equal to 1.'
|
|
298
|
+
end
|
|
299
|
+
|
|
266
300
|
# resource path
|
|
267
301
|
local_var_path = '/workspaces/{workspace}/admin/plans/{deployment_plan}'.sub('{workspace}', CGI.escape(workspace.to_s)).sub('{deployment_plan}', CGI.escape(deployment_plan.to_s))
|
|
268
302
|
|
|
269
303
|
# query parameters
|
|
270
304
|
query_params = opts[:query_params] || {}
|
|
305
|
+
query_params[:'cursor'] = opts[:'cursor'] if !opts[:'cursor'].nil?
|
|
306
|
+
query_params[:'limit'] = opts[:'limit'] if !opts[:'limit'].nil?
|
|
271
307
|
|
|
272
308
|
# header parameters
|
|
273
309
|
header_params = opts[:header_params] || {}
|
|
@@ -302,5 +338,224 @@ module PlainRouter::OpenAPI
|
|
|
302
338
|
end
|
|
303
339
|
return data, status_code, headers
|
|
304
340
|
end
|
|
341
|
+
|
|
342
|
+
# Create a deployment plan
|
|
343
|
+
# Create or edit a draft deployment plan for the authorized advertising account. Review and validate the plan before submitting any provider writes.
|
|
344
|
+
# @param workspace [Integer] The workspace ID
|
|
345
|
+
# @param store_deployment_plan_request [StoreDeploymentPlanRequest]
|
|
346
|
+
# @param [Hash] opts the optional parameters
|
|
347
|
+
# @return [LaunchPlansStore201Response]
|
|
348
|
+
def launch_plans_store(workspace, store_deployment_plan_request, opts = {})
|
|
349
|
+
data, _status_code, _headers = launch_plans_store_with_http_info(workspace, store_deployment_plan_request, opts)
|
|
350
|
+
data
|
|
351
|
+
end
|
|
352
|
+
|
|
353
|
+
# Create a deployment plan
|
|
354
|
+
# Create or edit a draft deployment plan for the authorized advertising account. Review and validate the plan before submitting any provider writes.
|
|
355
|
+
# @param workspace [Integer] The workspace ID
|
|
356
|
+
# @param store_deployment_plan_request [StoreDeploymentPlanRequest]
|
|
357
|
+
# @param [Hash] opts the optional parameters
|
|
358
|
+
# @return [Array<(LaunchPlansStore201Response, Integer, Hash)>] LaunchPlansStore201Response data, response status code and response headers
|
|
359
|
+
def launch_plans_store_with_http_info(workspace, store_deployment_plan_request, opts = {})
|
|
360
|
+
if @api_client.config.debugging
|
|
361
|
+
@api_client.config.logger.debug 'Calling API: DeploymentPlanApi.launch_plans_store ...'
|
|
362
|
+
end
|
|
363
|
+
# verify the required parameter 'workspace' is set
|
|
364
|
+
if @api_client.config.client_side_validation && workspace.nil?
|
|
365
|
+
fail ArgumentError, "Missing the required parameter 'workspace' when calling DeploymentPlanApi.launch_plans_store"
|
|
366
|
+
end
|
|
367
|
+
# verify the required parameter 'store_deployment_plan_request' is set
|
|
368
|
+
if @api_client.config.client_side_validation && store_deployment_plan_request.nil?
|
|
369
|
+
fail ArgumentError, "Missing the required parameter 'store_deployment_plan_request' when calling DeploymentPlanApi.launch_plans_store"
|
|
370
|
+
end
|
|
371
|
+
# resource path
|
|
372
|
+
local_var_path = '/workspaces/{workspace}/admin/plans'.sub('{workspace}', CGI.escape(workspace.to_s))
|
|
373
|
+
|
|
374
|
+
# query parameters
|
|
375
|
+
query_params = opts[:query_params] || {}
|
|
376
|
+
|
|
377
|
+
# header parameters
|
|
378
|
+
header_params = opts[:header_params] || {}
|
|
379
|
+
# HTTP header 'Accept' (if needed)
|
|
380
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
|
381
|
+
# HTTP header 'Content-Type'
|
|
382
|
+
content_type = @api_client.select_header_content_type(['application/json'])
|
|
383
|
+
if !content_type.nil?
|
|
384
|
+
header_params['Content-Type'] = content_type
|
|
385
|
+
end
|
|
386
|
+
|
|
387
|
+
# form parameters
|
|
388
|
+
form_params = opts[:form_params] || {}
|
|
389
|
+
|
|
390
|
+
# http body (model)
|
|
391
|
+
post_body = opts[:debug_body] || @api_client.object_to_http_body(store_deployment_plan_request)
|
|
392
|
+
|
|
393
|
+
# return_type
|
|
394
|
+
return_type = opts[:debug_return_type] || 'LaunchPlansStore201Response'
|
|
395
|
+
|
|
396
|
+
# auth_names
|
|
397
|
+
auth_names = opts[:debug_auth_names] || ['workspaceSecret']
|
|
398
|
+
|
|
399
|
+
new_options = opts.merge(
|
|
400
|
+
:operation => :"DeploymentPlanApi.launch_plans_store",
|
|
401
|
+
:header_params => header_params,
|
|
402
|
+
:query_params => query_params,
|
|
403
|
+
:form_params => form_params,
|
|
404
|
+
:body => post_body,
|
|
405
|
+
:auth_names => auth_names,
|
|
406
|
+
:return_type => return_type
|
|
407
|
+
)
|
|
408
|
+
|
|
409
|
+
data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
|
|
410
|
+
if @api_client.config.debugging
|
|
411
|
+
@api_client.config.logger.debug "API called: DeploymentPlanApi#launch_plans_store\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
412
|
+
end
|
|
413
|
+
return data, status_code, headers
|
|
414
|
+
end
|
|
415
|
+
|
|
416
|
+
# Update a deployment plan
|
|
417
|
+
# Create or edit a draft deployment plan for the authorized advertising account. Review and validate the plan before submitting any provider writes.
|
|
418
|
+
# @param workspace [Integer] The workspace ID
|
|
419
|
+
# @param deployment_plan [String]
|
|
420
|
+
# @param [Hash] opts the optional parameters
|
|
421
|
+
# @option opts [UpdateDeploymentPlanRequest] :update_deployment_plan_request
|
|
422
|
+
# @return [LaunchPlansStore201Response]
|
|
423
|
+
def launch_plans_update(workspace, deployment_plan, opts = {})
|
|
424
|
+
data, _status_code, _headers = launch_plans_update_with_http_info(workspace, deployment_plan, opts)
|
|
425
|
+
data
|
|
426
|
+
end
|
|
427
|
+
|
|
428
|
+
# Update a deployment plan
|
|
429
|
+
# Create or edit a draft deployment plan for the authorized advertising account. Review and validate the plan before submitting any provider writes.
|
|
430
|
+
# @param workspace [Integer] The workspace ID
|
|
431
|
+
# @param deployment_plan [String]
|
|
432
|
+
# @param [Hash] opts the optional parameters
|
|
433
|
+
# @option opts [UpdateDeploymentPlanRequest] :update_deployment_plan_request
|
|
434
|
+
# @return [Array<(LaunchPlansStore201Response, Integer, Hash)>] LaunchPlansStore201Response data, response status code and response headers
|
|
435
|
+
def launch_plans_update_with_http_info(workspace, deployment_plan, opts = {})
|
|
436
|
+
if @api_client.config.debugging
|
|
437
|
+
@api_client.config.logger.debug 'Calling API: DeploymentPlanApi.launch_plans_update ...'
|
|
438
|
+
end
|
|
439
|
+
# verify the required parameter 'workspace' is set
|
|
440
|
+
if @api_client.config.client_side_validation && workspace.nil?
|
|
441
|
+
fail ArgumentError, "Missing the required parameter 'workspace' when calling DeploymentPlanApi.launch_plans_update"
|
|
442
|
+
end
|
|
443
|
+
# verify the required parameter 'deployment_plan' is set
|
|
444
|
+
if @api_client.config.client_side_validation && deployment_plan.nil?
|
|
445
|
+
fail ArgumentError, "Missing the required parameter 'deployment_plan' when calling DeploymentPlanApi.launch_plans_update"
|
|
446
|
+
end
|
|
447
|
+
# resource path
|
|
448
|
+
local_var_path = '/workspaces/{workspace}/admin/plans/{deployment_plan}'.sub('{workspace}', CGI.escape(workspace.to_s)).sub('{deployment_plan}', CGI.escape(deployment_plan.to_s))
|
|
449
|
+
|
|
450
|
+
# query parameters
|
|
451
|
+
query_params = opts[:query_params] || {}
|
|
452
|
+
|
|
453
|
+
# header parameters
|
|
454
|
+
header_params = opts[:header_params] || {}
|
|
455
|
+
# HTTP header 'Accept' (if needed)
|
|
456
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
|
457
|
+
# HTTP header 'Content-Type'
|
|
458
|
+
content_type = @api_client.select_header_content_type(['application/json'])
|
|
459
|
+
if !content_type.nil?
|
|
460
|
+
header_params['Content-Type'] = content_type
|
|
461
|
+
end
|
|
462
|
+
|
|
463
|
+
# form parameters
|
|
464
|
+
form_params = opts[:form_params] || {}
|
|
465
|
+
|
|
466
|
+
# http body (model)
|
|
467
|
+
post_body = opts[:debug_body] || @api_client.object_to_http_body(opts[:'update_deployment_plan_request'])
|
|
468
|
+
|
|
469
|
+
# return_type
|
|
470
|
+
return_type = opts[:debug_return_type] || 'LaunchPlansStore201Response'
|
|
471
|
+
|
|
472
|
+
# auth_names
|
|
473
|
+
auth_names = opts[:debug_auth_names] || ['workspaceSecret']
|
|
474
|
+
|
|
475
|
+
new_options = opts.merge(
|
|
476
|
+
:operation => :"DeploymentPlanApi.launch_plans_update",
|
|
477
|
+
:header_params => header_params,
|
|
478
|
+
:query_params => query_params,
|
|
479
|
+
:form_params => form_params,
|
|
480
|
+
:body => post_body,
|
|
481
|
+
:auth_names => auth_names,
|
|
482
|
+
:return_type => return_type
|
|
483
|
+
)
|
|
484
|
+
|
|
485
|
+
data, status_code, headers = @api_client.call_api(:PATCH, local_var_path, new_options)
|
|
486
|
+
if @api_client.config.debugging
|
|
487
|
+
@api_client.config.logger.debug "API called: DeploymentPlanApi#launch_plans_update\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
488
|
+
end
|
|
489
|
+
return data, status_code, headers
|
|
490
|
+
end
|
|
491
|
+
|
|
492
|
+
# Validate a deployment plan
|
|
493
|
+
# Validate a plan without provider writes. Reuse a ready Meta video in the same ad account; plans needing a new video upload are refused.
|
|
494
|
+
# @param workspace [Integer] The workspace ID
|
|
495
|
+
# @param deployment_plan [String]
|
|
496
|
+
# @param [Hash] opts the optional parameters
|
|
497
|
+
# @return [LaunchPlansShow200Response]
|
|
498
|
+
def launch_plans_validate(workspace, deployment_plan, opts = {})
|
|
499
|
+
data, _status_code, _headers = launch_plans_validate_with_http_info(workspace, deployment_plan, opts)
|
|
500
|
+
data
|
|
501
|
+
end
|
|
502
|
+
|
|
503
|
+
# Validate a deployment plan
|
|
504
|
+
# Validate a plan without provider writes. Reuse a ready Meta video in the same ad account; plans needing a new video upload are refused.
|
|
505
|
+
# @param workspace [Integer] The workspace ID
|
|
506
|
+
# @param deployment_plan [String]
|
|
507
|
+
# @param [Hash] opts the optional parameters
|
|
508
|
+
# @return [Array<(LaunchPlansShow200Response, Integer, Hash)>] LaunchPlansShow200Response data, response status code and response headers
|
|
509
|
+
def launch_plans_validate_with_http_info(workspace, deployment_plan, opts = {})
|
|
510
|
+
if @api_client.config.debugging
|
|
511
|
+
@api_client.config.logger.debug 'Calling API: DeploymentPlanApi.launch_plans_validate ...'
|
|
512
|
+
end
|
|
513
|
+
# verify the required parameter 'workspace' is set
|
|
514
|
+
if @api_client.config.client_side_validation && workspace.nil?
|
|
515
|
+
fail ArgumentError, "Missing the required parameter 'workspace' when calling DeploymentPlanApi.launch_plans_validate"
|
|
516
|
+
end
|
|
517
|
+
# verify the required parameter 'deployment_plan' is set
|
|
518
|
+
if @api_client.config.client_side_validation && deployment_plan.nil?
|
|
519
|
+
fail ArgumentError, "Missing the required parameter 'deployment_plan' when calling DeploymentPlanApi.launch_plans_validate"
|
|
520
|
+
end
|
|
521
|
+
# resource path
|
|
522
|
+
local_var_path = '/workspaces/{workspace}/admin/plans/{deployment_plan}/validate'.sub('{workspace}', CGI.escape(workspace.to_s)).sub('{deployment_plan}', CGI.escape(deployment_plan.to_s))
|
|
523
|
+
|
|
524
|
+
# query parameters
|
|
525
|
+
query_params = opts[:query_params] || {}
|
|
526
|
+
|
|
527
|
+
# header parameters
|
|
528
|
+
header_params = opts[:header_params] || {}
|
|
529
|
+
# HTTP header 'Accept' (if needed)
|
|
530
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
|
531
|
+
|
|
532
|
+
# form parameters
|
|
533
|
+
form_params = opts[:form_params] || {}
|
|
534
|
+
|
|
535
|
+
# http body (model)
|
|
536
|
+
post_body = opts[:debug_body]
|
|
537
|
+
|
|
538
|
+
# return_type
|
|
539
|
+
return_type = opts[:debug_return_type] || 'LaunchPlansShow200Response'
|
|
540
|
+
|
|
541
|
+
# auth_names
|
|
542
|
+
auth_names = opts[:debug_auth_names] || ['planWriter']
|
|
543
|
+
|
|
544
|
+
new_options = opts.merge(
|
|
545
|
+
:operation => :"DeploymentPlanApi.launch_plans_validate",
|
|
546
|
+
:header_params => header_params,
|
|
547
|
+
:query_params => query_params,
|
|
548
|
+
:form_params => form_params,
|
|
549
|
+
:body => post_body,
|
|
550
|
+
:auth_names => auth_names,
|
|
551
|
+
:return_type => return_type
|
|
552
|
+
)
|
|
553
|
+
|
|
554
|
+
data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
|
|
555
|
+
if @api_client.config.debugging
|
|
556
|
+
@api_client.config.logger.debug "API called: DeploymentPlanApi#launch_plans_validate\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
557
|
+
end
|
|
558
|
+
return data, status_code, headers
|
|
559
|
+
end
|
|
305
560
|
end
|
|
306
561
|
end
|
|
@@ -0,0 +1,142 @@
|
|
|
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 DraftBatchFileImportApi
|
|
17
|
+
attr_accessor :api_client
|
|
18
|
+
|
|
19
|
+
def initialize(api_client = ApiClient.default)
|
|
20
|
+
@api_client = api_client
|
|
21
|
+
end
|
|
22
|
+
# Import a Launcher draft batch
|
|
23
|
+
# Import a CSV or spreadsheet into a governed Launcher draft batch for the workspace and account authorized by the execution key.
|
|
24
|
+
# @param file [File]
|
|
25
|
+
# @param source_adset_id [String]
|
|
26
|
+
# @param source_ad_id [String]
|
|
27
|
+
# @param mode [DraftBatchMode]
|
|
28
|
+
# @param [Hash] opts the optional parameters
|
|
29
|
+
# @option opts [Boolean] :folder_to_adset
|
|
30
|
+
# @option opts [Boolean] :grouping_enabled
|
|
31
|
+
# @option opts [Integer] :account_id
|
|
32
|
+
# @option opts [Integer] :workspace_id
|
|
33
|
+
# @return [Hash<String, Object>]
|
|
34
|
+
def launcher_file_import(file, source_adset_id, source_ad_id, mode, opts = {})
|
|
35
|
+
data, _status_code, _headers = launcher_file_import_with_http_info(file, source_adset_id, source_ad_id, mode, opts)
|
|
36
|
+
data
|
|
37
|
+
end
|
|
38
|
+
|
|
39
|
+
# Import a Launcher draft batch
|
|
40
|
+
# Import a CSV or spreadsheet into a governed Launcher draft batch for the workspace and account authorized by the execution key.
|
|
41
|
+
# @param file [File]
|
|
42
|
+
# @param source_adset_id [String]
|
|
43
|
+
# @param source_ad_id [String]
|
|
44
|
+
# @param mode [DraftBatchMode]
|
|
45
|
+
# @param [Hash] opts the optional parameters
|
|
46
|
+
# @option opts [Boolean] :folder_to_adset
|
|
47
|
+
# @option opts [Boolean] :grouping_enabled
|
|
48
|
+
# @option opts [Integer] :account_id
|
|
49
|
+
# @option opts [Integer] :workspace_id
|
|
50
|
+
# @return [Array<(Hash<String, Object>, Integer, Hash)>] Hash<String, Object> data, response status code and response headers
|
|
51
|
+
def launcher_file_import_with_http_info(file, source_adset_id, source_ad_id, mode, opts = {})
|
|
52
|
+
if @api_client.config.debugging
|
|
53
|
+
@api_client.config.logger.debug 'Calling API: DraftBatchFileImportApi.launcher_file_import ...'
|
|
54
|
+
end
|
|
55
|
+
# verify the required parameter 'file' is set
|
|
56
|
+
if @api_client.config.client_side_validation && file.nil?
|
|
57
|
+
fail ArgumentError, "Missing the required parameter 'file' when calling DraftBatchFileImportApi.launcher_file_import"
|
|
58
|
+
end
|
|
59
|
+
# verify the required parameter 'source_adset_id' is set
|
|
60
|
+
if @api_client.config.client_side_validation && source_adset_id.nil?
|
|
61
|
+
fail ArgumentError, "Missing the required parameter 'source_adset_id' when calling DraftBatchFileImportApi.launcher_file_import"
|
|
62
|
+
end
|
|
63
|
+
pattern = Regexp.new(/^[0-9]+$/)
|
|
64
|
+
if @api_client.config.client_side_validation && source_adset_id !~ pattern
|
|
65
|
+
fail ArgumentError, "invalid value for 'source_adset_id' when calling DraftBatchFileImportApi.launcher_file_import, must conform to the pattern #{pattern}."
|
|
66
|
+
end
|
|
67
|
+
|
|
68
|
+
# verify the required parameter 'source_ad_id' is set
|
|
69
|
+
if @api_client.config.client_side_validation && source_ad_id.nil?
|
|
70
|
+
fail ArgumentError, "Missing the required parameter 'source_ad_id' when calling DraftBatchFileImportApi.launcher_file_import"
|
|
71
|
+
end
|
|
72
|
+
pattern = Regexp.new(/^[0-9]+$/)
|
|
73
|
+
if @api_client.config.client_side_validation && source_ad_id !~ pattern
|
|
74
|
+
fail ArgumentError, "invalid value for 'source_ad_id' when calling DraftBatchFileImportApi.launcher_file_import, must conform to the pattern #{pattern}."
|
|
75
|
+
end
|
|
76
|
+
|
|
77
|
+
# verify the required parameter 'mode' is set
|
|
78
|
+
if @api_client.config.client_side_validation && mode.nil?
|
|
79
|
+
fail ArgumentError, "Missing the required parameter 'mode' when calling DraftBatchFileImportApi.launcher_file_import"
|
|
80
|
+
end
|
|
81
|
+
if @api_client.config.client_side_validation && !opts[:'account_id'].nil? && !opts[:'account_id'].is_a?(String) && opts[:'account_id'] < 1
|
|
82
|
+
fail ArgumentError, 'invalid value for "opts[:"account_id"]" when calling DraftBatchFileImportApi.launcher_file_import, must be greater than or equal to 1.'
|
|
83
|
+
end
|
|
84
|
+
|
|
85
|
+
if @api_client.config.client_side_validation && !opts[:'workspace_id'].nil? && !opts[:'workspace_id'].is_a?(String) && opts[:'workspace_id'] < 1
|
|
86
|
+
fail ArgumentError, 'invalid value for "opts[:"workspace_id"]" when calling DraftBatchFileImportApi.launcher_file_import, must be greater than or equal to 1.'
|
|
87
|
+
end
|
|
88
|
+
|
|
89
|
+
# resource path
|
|
90
|
+
local_var_path = '/mcp/launcher/import'
|
|
91
|
+
|
|
92
|
+
# query parameters
|
|
93
|
+
query_params = opts[:query_params] || {}
|
|
94
|
+
|
|
95
|
+
# header parameters
|
|
96
|
+
header_params = opts[:header_params] || {}
|
|
97
|
+
# HTTP header 'Accept' (if needed)
|
|
98
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
|
99
|
+
# HTTP header 'Content-Type'
|
|
100
|
+
content_type = @api_client.select_header_content_type(['multipart/form-data'])
|
|
101
|
+
if !content_type.nil?
|
|
102
|
+
header_params['Content-Type'] = content_type
|
|
103
|
+
end
|
|
104
|
+
|
|
105
|
+
# form parameters
|
|
106
|
+
form_params = opts[:form_params] || {}
|
|
107
|
+
form_params['file'] = file
|
|
108
|
+
form_params['source_adset_id'] = source_adset_id
|
|
109
|
+
form_params['source_ad_id'] = source_ad_id
|
|
110
|
+
form_params['mode'] = mode
|
|
111
|
+
form_params['folder_to_adset'] = opts[:'folder_to_adset'] if !opts[:'folder_to_adset'].nil?
|
|
112
|
+
form_params['grouping_enabled'] = opts[:'grouping_enabled'] if !opts[:'grouping_enabled'].nil?
|
|
113
|
+
form_params['account_id'] = opts[:'account_id'] if !opts[:'account_id'].nil?
|
|
114
|
+
form_params['workspace_id'] = opts[:'workspace_id'] if !opts[:'workspace_id'].nil?
|
|
115
|
+
|
|
116
|
+
# http body (model)
|
|
117
|
+
post_body = opts[:debug_body]
|
|
118
|
+
|
|
119
|
+
# return_type
|
|
120
|
+
return_type = opts[:debug_return_type] || 'Hash<String, Object>'
|
|
121
|
+
|
|
122
|
+
# auth_names
|
|
123
|
+
auth_names = opts[:debug_auth_names] || ['workspaceSecret']
|
|
124
|
+
|
|
125
|
+
new_options = opts.merge(
|
|
126
|
+
:operation => :"DraftBatchFileImportApi.launcher_file_import",
|
|
127
|
+
:header_params => header_params,
|
|
128
|
+
:query_params => query_params,
|
|
129
|
+
:form_params => form_params,
|
|
130
|
+
:body => post_body,
|
|
131
|
+
:auth_names => auth_names,
|
|
132
|
+
:return_type => return_type
|
|
133
|
+
)
|
|
134
|
+
|
|
135
|
+
data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
|
|
136
|
+
if @api_client.config.debugging
|
|
137
|
+
@api_client.config.logger.debug "API called: DraftBatchFileImportApi#launcher_file_import\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
138
|
+
end
|
|
139
|
+
return data, status_code, headers
|
|
140
|
+
end
|
|
141
|
+
end
|
|
142
|
+
end
|