plainrouter-sdk 0.2.0 → 0.5.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 +9 -2
- data/lib/plainrouter/client.rb +2 -1
- data/lib/plainrouter/openapi/api/action_dry_run_api_api.rb +2 -2
- data/lib/plainrouter/openapi/api/action_proposal_api_api.rb +2 -2
- data/lib/plainrouter/openapi/api/ad_test_api_api.rb +259 -0
- data/lib/plainrouter/openapi/api/cookie_declaration_api.rb +90 -0
- data/lib/plainrouter/openapi/api/creative_api.rb +181 -0
- data/lib/plainrouter/openapi/api/deployment_plan_api.rb +306 -0
- data/lib/plainrouter/openapi/api/meta_inventory_exposure_api.rb +121 -0
- data/lib/plainrouter/openapi/configuration.rb +42 -0
- data/lib/plainrouter/openapi/models/action_current_disposition.rb +13 -1
- data/lib/plainrouter/openapi/models/action_current_disposition_outcome_payload.rb +238 -0
- data/lib/plainrouter/openapi/models/action_current_disposition_outcome_payload_baseline.rb +103 -0
- data/lib/plainrouter/openapi/models/action_current_disposition_outcome_payload_baseline_any_of.rb +245 -0
- data/lib/plainrouter/openapi/models/action_current_disposition_outcome_payload_inverse.rb +206 -0
- data/lib/plainrouter/openapi/models/action_current_disposition_outcome_payload_metrics.rb +103 -0
- data/lib/plainrouter/openapi/models/action_current_disposition_outcome_payload_metrics_any_of.rb +276 -0
- data/lib/plainrouter/openapi/models/action_policy_read_data.rb +3 -105
- data/lib/plainrouter/openapi/models/action_policy_result.rb +374 -0
- data/lib/plainrouter/openapi/models/action_proposal_input.rb +32 -4
- data/lib/plainrouter/openapi/models/action_read_item.rb +62 -4
- data/lib/plainrouter/openapi/models/action_read_item_evidence.rb +105 -0
- data/lib/plainrouter/openapi/models/action_read_item_evidence_any_of.rb +190 -0
- data/lib/plainrouter/openapi/models/action_read_item_evidence_any_of1.rb +242 -0
- data/lib/plainrouter/openapi/models/action_read_item_evidence_any_of2.rb +217 -0
- data/lib/plainrouter/openapi/models/action_read_item_evidence_any_of_outcome.rb +238 -0
- data/lib/plainrouter/openapi/models/action_read_item_proposer.rb +198 -0
- data/lib/plainrouter/openapi/models/actions_api_dry_run401_response.rb +103 -0
- data/lib/plainrouter/openapi/models/actions_tests_api_index404_response.rb +103 -0
- data/lib/plainrouter/openapi/models/actions_tests_api_store_request.rb +467 -0
- data/lib/plainrouter/openapi/models/actions_tests_api_store_request_maximum_spend_minor.rb +104 -0
- data/lib/plainrouter/openapi/models/ad_test.rb +552 -0
- data/lib/plainrouter/openapi/models/ad_test_create_read.rb +164 -0
- data/lib/plainrouter/openapi/models/ad_test_create_read_test.rb +675 -0
- data/lib/plainrouter/openapi/models/ad_test_create_read_test_members_inner.rb +232 -0
- data/lib/plainrouter/openapi/models/ad_test_create_read_test_pause_proposals_inner.rb +286 -0
- data/lib/plainrouter/openapi/models/ad_test_create_read_test_verdict.rb +336 -0
- data/lib/plainrouter/openapi/models/ad_test_create_read_test_verdict_daily_facts_inner.rb +374 -0
- data/lib/plainrouter/openapi/models/ad_test_create_read_test_verdict_halt_details.rb +285 -0
- data/lib/plainrouter/openapi/models/ad_test_create_read_test_verdict_halt_details_baseline.rb +190 -0
- data/lib/plainrouter/openapi/models/ad_test_create_read_test_verdict_halt_details_observed_destinations_inner.rb +216 -0
- data/lib/plainrouter/openapi/models/ad_test_create_read_test_verdict_members_inner.rb +349 -0
- data/lib/plainrouter/openapi/models/ad_test_daily_fact_read.rb +374 -0
- data/lib/plainrouter/openapi/models/ad_test_event_choice.rb +190 -0
- data/lib/plainrouter/openapi/models/ad_test_list_read.rb +218 -0
- data/lib/plainrouter/openapi/models/ad_test_list_read_observed_conversion_events_inner.rb +190 -0
- data/lib/plainrouter/openapi/models/ad_test_list_read_tests.rb +396 -0
- data/lib/plainrouter/openapi/models/ad_test_read.rb +675 -0
- data/lib/plainrouter/openapi/models/ad_test_show_read.rb +164 -0
- data/lib/plainrouter/openapi/models/ad_test_verdict_member_read.rb +349 -0
- data/lib/plainrouter/openapi/models/ad_test_verdict_read.rb +336 -0
- data/lib/plainrouter/openapi/models/agent_credential_error.rb +214 -0
- data/lib/plainrouter/openapi/models/api_route_not_found.rb +216 -0
- data/lib/plainrouter/openapi/models/api_route_not_found_error.rb +240 -0
- data/lib/plainrouter/openapi/models/api_route_not_found_request.rb +190 -0
- data/lib/plainrouter/openapi/models/api_route_not_found_resources.rb +190 -0
- data/lib/plainrouter/openapi/models/cookie_declaration.rb +177 -0
- data/lib/plainrouter/openapi/models/cookie_declaration_categories.rb +268 -0
- data/lib/plainrouter/openapi/models/cookie_declaration_categories_necessary.rb +194 -0
- data/lib/plainrouter/openapi/models/cookie_declaration_item.rb +280 -0
- data/lib/plainrouter/openapi/models/create_event202_response_warnings_inner.rb +2 -2
- data/lib/plainrouter/openapi/models/create_event_request_any_of.rb +1 -1
- data/lib/plainrouter/openapi/models/create_event_request_any_of1.rb +1 -1
- data/lib/plainrouter/openapi/models/creative_intake_read.rb +164 -0
- data/lib/plainrouter/openapi/models/creative_intake_read_creative.rb +451 -0
- data/lib/plainrouter/openapi/models/creative_intake_read_creative_tags.rb +104 -0
- data/lib/plainrouter/openapi/models/creative_intake_rejected.rb +164 -0
- data/lib/plainrouter/openapi/models/creative_intake_rejected_error.rb +190 -0
- data/lib/plainrouter/openapi/models/creative_intake_tags.rb +257 -0
- data/lib/plainrouter/openapi/models/deployment_plan.rb +593 -0
- data/lib/plainrouter/openapi/models/deployment_plan_read.rb +268 -0
- data/lib/plainrouter/openapi/models/deployment_plan_read_copy.rb +266 -0
- data/lib/plainrouter/openapi/models/deployment_plan_read_creatives_inner.rb +320 -0
- data/lib/plainrouter/openapi/models/deployment_plan_read_creatives_inner_copy.rb +267 -0
- data/lib/plainrouter/openapi/models/destination_type.rb +2 -1
- data/lib/plainrouter/openapi/models/execute_deployment_plan_request.rb +200 -0
- data/lib/plainrouter/openapi/models/get_cookie_declaration404_response.rb +103 -0
- data/lib/plainrouter/openapi/models/get_inventory_metrics200_response.rb +324 -0
- data/lib/plainrouter/openapi/models/get_inventory_metrics200_response_account.rb +264 -0
- data/lib/plainrouter/openapi/models/get_inventory_metrics200_response_changes_inner.rb +304 -0
- data/lib/plainrouter/openapi/models/get_inventory_metrics200_response_effective_range.rb +190 -0
- data/lib/plainrouter/openapi/models/get_inventory_metrics200_response_metrics_inner.rb +492 -0
- data/lib/plainrouter/openapi/models/get_inventory_metrics200_response_object_metrics_inner.rb +304 -0
- data/lib/plainrouter/openapi/models/get_inventory_metrics200_response_object_metrics_inner_meta.rb +268 -0
- data/lib/plainrouter/openapi/models/get_inventory_metrics200_response_staleness.rb +200 -0
- data/lib/plainrouter/openapi/models/get_inventory_metrics200_response_sync.rb +186 -0
- data/lib/plainrouter/openapi/models/ingestion_warning_code.rb +2 -1
- data/lib/plainrouter/openapi/models/launch_intent_read.rb +164 -0
- data/lib/plainrouter/openapi/models/launch_intent_read_intent.rb +330 -0
- data/lib/plainrouter/openapi/models/launch_intent_read_intent_actions_inner.rb +238 -0
- data/lib/plainrouter/openapi/models/launch_intent_status.rb +46 -0
- data/lib/plainrouter/openapi/models/launch_plans_copy403_response.rb +103 -0
- data/lib/plainrouter/openapi/models/launch_plans_copy404_response.rb +103 -0
- data/lib/plainrouter/openapi/models/launch_plans_execute422_response.rb +103 -0
- data/lib/plainrouter/openapi/models/launch_plans_index200_response.rb +164 -0
- data/lib/plainrouter/openapi/models/launch_plans_index200_response_plans.rb +244 -0
- data/lib/plainrouter/openapi/models/launch_plans_show200_response.rb +164 -0
- data/lib/plainrouter/openapi/models/plan_copy_forbidden.rb +164 -0
- data/lib/plainrouter/openapi/models/plan_copy_forbidden_error.rb +214 -0
- data/lib/plainrouter/openapi/models/plan_copy_not_found.rb +164 -0
- data/lib/plainrouter/openapi/models/plan_copy_not_found_error.rb +214 -0
- data/lib/plainrouter/openapi/models/plan_copy_read.rb +164 -0
- data/lib/plainrouter/openapi/models/plan_copy_read_plan.rb +347 -0
- data/lib/plainrouter/openapi/models/plan_copy_rejected.rb +164 -0
- data/lib/plainrouter/openapi/models/plan_copy_rejected_error.rb +214 -0
- data/lib/plainrouter/openapi/models/plan_execute_conflict.rb +164 -0
- data/lib/plainrouter/openapi/models/plan_execute_conflict_error.rb +214 -0
- data/lib/plainrouter/openapi/models/plan_execute_rejected.rb +164 -0
- data/lib/plainrouter/openapi/models/plan_execute_rejected_error.rb +214 -0
- data/lib/plainrouter/openapi/models/proposal_replay_conflict.rb +214 -0
- data/lib/plainrouter/openapi/models/proposal_replay_conflict_errors.rb +178 -0
- data/lib/plainrouter/openapi/models/store_creative403_response.rb +103 -0
- data/lib/plainrouter/openapi/models/store_creative413_response.rb +103 -0
- data/lib/plainrouter/openapi/models/store_creative422_response.rb +103 -0
- data/lib/plainrouter/openapi/models/store_creative_from_url_request.rb +208 -0
- data/lib/plainrouter/openapi/models/store_creative_from_url_request_tags.rb +257 -0
- data/lib/plainrouter/openapi/models/store_creative_request.rb +219 -0
- data/lib/plainrouter/openapi/models/store_creative_request_tags.rb +257 -0
- data/lib/plainrouter/openapi/models/workspace_lock_timeout.rb +164 -0
- data/lib/plainrouter/openapi/models/workspace_lock_timeout_error.rb +214 -0
- data/lib/plainrouter/openapi/version.rb +1 -1
- data/lib/plainrouter/openapi.rb +106 -0
- data/lib/plainrouter/version.rb +1 -1
- metadata +108 -2
|
@@ -0,0 +1,306 @@
|
|
|
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 DeploymentPlanApi
|
|
17
|
+
attr_accessor :api_client
|
|
18
|
+
|
|
19
|
+
def initialize(api_client = ApiClient.default)
|
|
20
|
+
@api_client = api_client
|
|
21
|
+
end
|
|
22
|
+
# Copy a failed plan to a new draft
|
|
23
|
+
# Copy failed plan content and stored integer budgets into a fresh draft. History stays unchanged; validate budgets and submit again with a new intent.
|
|
24
|
+
# @param workspace [Integer] The workspace ID
|
|
25
|
+
# @param deployment_plan [String]
|
|
26
|
+
# @param [Hash] opts the optional parameters
|
|
27
|
+
# @return [PlanCopyRead]
|
|
28
|
+
def launch_plans_copy(workspace, deployment_plan, opts = {})
|
|
29
|
+
data, _status_code, _headers = launch_plans_copy_with_http_info(workspace, deployment_plan, opts)
|
|
30
|
+
data
|
|
31
|
+
end
|
|
32
|
+
|
|
33
|
+
# Copy a failed plan to a new draft
|
|
34
|
+
# Copy failed plan content and stored integer budgets into a fresh draft. History stays unchanged; validate budgets and submit again with a new intent.
|
|
35
|
+
# @param workspace [Integer] The workspace ID
|
|
36
|
+
# @param deployment_plan [String]
|
|
37
|
+
# @param [Hash] opts the optional parameters
|
|
38
|
+
# @return [Array<(PlanCopyRead, Integer, Hash)>] PlanCopyRead data, response status code and response headers
|
|
39
|
+
def launch_plans_copy_with_http_info(workspace, deployment_plan, opts = {})
|
|
40
|
+
if @api_client.config.debugging
|
|
41
|
+
@api_client.config.logger.debug 'Calling API: DeploymentPlanApi.launch_plans_copy ...'
|
|
42
|
+
end
|
|
43
|
+
# verify the required parameter 'workspace' is set
|
|
44
|
+
if @api_client.config.client_side_validation && workspace.nil?
|
|
45
|
+
fail ArgumentError, "Missing the required parameter 'workspace' when calling DeploymentPlanApi.launch_plans_copy"
|
|
46
|
+
end
|
|
47
|
+
# verify the required parameter 'deployment_plan' is set
|
|
48
|
+
if @api_client.config.client_side_validation && deployment_plan.nil?
|
|
49
|
+
fail ArgumentError, "Missing the required parameter 'deployment_plan' when calling DeploymentPlanApi.launch_plans_copy"
|
|
50
|
+
end
|
|
51
|
+
# resource path
|
|
52
|
+
local_var_path = '/workspaces/{workspace}/admin/plans/{deployment_plan}/copy'.sub('{workspace}', CGI.escape(workspace.to_s)).sub('{deployment_plan}', CGI.escape(deployment_plan.to_s))
|
|
53
|
+
|
|
54
|
+
# query parameters
|
|
55
|
+
query_params = opts[:query_params] || {}
|
|
56
|
+
|
|
57
|
+
# header parameters
|
|
58
|
+
header_params = opts[:header_params] || {}
|
|
59
|
+
# HTTP header 'Accept' (if needed)
|
|
60
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
|
61
|
+
|
|
62
|
+
# form parameters
|
|
63
|
+
form_params = opts[:form_params] || {}
|
|
64
|
+
|
|
65
|
+
# http body (model)
|
|
66
|
+
post_body = opts[:debug_body]
|
|
67
|
+
|
|
68
|
+
# return_type
|
|
69
|
+
return_type = opts[:debug_return_type] || 'PlanCopyRead'
|
|
70
|
+
|
|
71
|
+
# auth_names
|
|
72
|
+
auth_names = opts[:debug_auth_names] || ['planWriter']
|
|
73
|
+
|
|
74
|
+
new_options = opts.merge(
|
|
75
|
+
:operation => :"DeploymentPlanApi.launch_plans_copy",
|
|
76
|
+
:header_params => header_params,
|
|
77
|
+
:query_params => query_params,
|
|
78
|
+
:form_params => form_params,
|
|
79
|
+
:body => post_body,
|
|
80
|
+
:auth_names => auth_names,
|
|
81
|
+
:return_type => return_type
|
|
82
|
+
)
|
|
83
|
+
|
|
84
|
+
data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
|
|
85
|
+
if @api_client.config.debugging
|
|
86
|
+
@api_client.config.logger.debug "API called: DeploymentPlanApi#launch_plans_copy\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
87
|
+
end
|
|
88
|
+
return data, status_code, headers
|
|
89
|
+
end
|
|
90
|
+
|
|
91
|
+
# Execute a deployment plan
|
|
92
|
+
# Create or replay a governed Launch intent using the reviewed plan's review_version. Changed versions are refused before intent creation or staging.
|
|
93
|
+
# @param workspace [Integer] The workspace ID
|
|
94
|
+
# @param deployment_plan [String]
|
|
95
|
+
# @param execute_deployment_plan_request [ExecuteDeploymentPlanRequest]
|
|
96
|
+
# @param [Hash] opts the optional parameters
|
|
97
|
+
# @return [LaunchIntentRead]
|
|
98
|
+
def launch_plans_execute(workspace, deployment_plan, execute_deployment_plan_request, opts = {})
|
|
99
|
+
data, _status_code, _headers = launch_plans_execute_with_http_info(workspace, deployment_plan, execute_deployment_plan_request, opts)
|
|
100
|
+
data
|
|
101
|
+
end
|
|
102
|
+
|
|
103
|
+
# Execute a deployment plan
|
|
104
|
+
# Create or replay a governed Launch intent using the reviewed plan's review_version. Changed versions are refused before intent creation or staging.
|
|
105
|
+
# @param workspace [Integer] The workspace ID
|
|
106
|
+
# @param deployment_plan [String]
|
|
107
|
+
# @param execute_deployment_plan_request [ExecuteDeploymentPlanRequest]
|
|
108
|
+
# @param [Hash] opts the optional parameters
|
|
109
|
+
# @return [Array<(LaunchIntentRead, Integer, Hash)>] LaunchIntentRead data, response status code and response headers
|
|
110
|
+
def launch_plans_execute_with_http_info(workspace, deployment_plan, execute_deployment_plan_request, opts = {})
|
|
111
|
+
if @api_client.config.debugging
|
|
112
|
+
@api_client.config.logger.debug 'Calling API: DeploymentPlanApi.launch_plans_execute ...'
|
|
113
|
+
end
|
|
114
|
+
# verify the required parameter 'workspace' is set
|
|
115
|
+
if @api_client.config.client_side_validation && workspace.nil?
|
|
116
|
+
fail ArgumentError, "Missing the required parameter 'workspace' when calling DeploymentPlanApi.launch_plans_execute"
|
|
117
|
+
end
|
|
118
|
+
# verify the required parameter 'deployment_plan' is set
|
|
119
|
+
if @api_client.config.client_side_validation && deployment_plan.nil?
|
|
120
|
+
fail ArgumentError, "Missing the required parameter 'deployment_plan' when calling DeploymentPlanApi.launch_plans_execute"
|
|
121
|
+
end
|
|
122
|
+
# verify the required parameter 'execute_deployment_plan_request' is set
|
|
123
|
+
if @api_client.config.client_side_validation && execute_deployment_plan_request.nil?
|
|
124
|
+
fail ArgumentError, "Missing the required parameter 'execute_deployment_plan_request' when calling DeploymentPlanApi.launch_plans_execute"
|
|
125
|
+
end
|
|
126
|
+
# resource path
|
|
127
|
+
local_var_path = '/workspaces/{workspace}/admin/plans/{deployment_plan}/execute'.sub('{workspace}', CGI.escape(workspace.to_s)).sub('{deployment_plan}', CGI.escape(deployment_plan.to_s))
|
|
128
|
+
|
|
129
|
+
# query parameters
|
|
130
|
+
query_params = opts[:query_params] || {}
|
|
131
|
+
|
|
132
|
+
# header parameters
|
|
133
|
+
header_params = opts[:header_params] || {}
|
|
134
|
+
# HTTP header 'Accept' (if needed)
|
|
135
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
|
136
|
+
# HTTP header 'Content-Type'
|
|
137
|
+
content_type = @api_client.select_header_content_type(['application/json'])
|
|
138
|
+
if !content_type.nil?
|
|
139
|
+
header_params['Content-Type'] = content_type
|
|
140
|
+
end
|
|
141
|
+
|
|
142
|
+
# form parameters
|
|
143
|
+
form_params = opts[:form_params] || {}
|
|
144
|
+
|
|
145
|
+
# http body (model)
|
|
146
|
+
post_body = opts[:debug_body] || @api_client.object_to_http_body(execute_deployment_plan_request)
|
|
147
|
+
|
|
148
|
+
# return_type
|
|
149
|
+
return_type = opts[:debug_return_type] || 'LaunchIntentRead'
|
|
150
|
+
|
|
151
|
+
# auth_names
|
|
152
|
+
auth_names = opts[:debug_auth_names] || ['planWriter']
|
|
153
|
+
|
|
154
|
+
new_options = opts.merge(
|
|
155
|
+
:operation => :"DeploymentPlanApi.launch_plans_execute",
|
|
156
|
+
:header_params => header_params,
|
|
157
|
+
:query_params => query_params,
|
|
158
|
+
:form_params => form_params,
|
|
159
|
+
:body => post_body,
|
|
160
|
+
:auth_names => auth_names,
|
|
161
|
+
:return_type => return_type
|
|
162
|
+
)
|
|
163
|
+
|
|
164
|
+
data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
|
|
165
|
+
if @api_client.config.debugging
|
|
166
|
+
@api_client.config.logger.debug "API called: DeploymentPlanApi#launch_plans_execute\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
167
|
+
end
|
|
168
|
+
return data, status_code, headers
|
|
169
|
+
end
|
|
170
|
+
|
|
171
|
+
# List deployment plans
|
|
172
|
+
# Read plans for the approved ad account with their current review_version. Pass the version from the plan you reviewed when executing.
|
|
173
|
+
# @param workspace [Integer] The workspace ID
|
|
174
|
+
# @param [Hash] opts the optional parameters
|
|
175
|
+
# @option opts [Integer] :per_page (default to 25)
|
|
176
|
+
# @return [LaunchPlansIndex200Response]
|
|
177
|
+
def launch_plans_index(workspace, opts = {})
|
|
178
|
+
data, _status_code, _headers = launch_plans_index_with_http_info(workspace, opts)
|
|
179
|
+
data
|
|
180
|
+
end
|
|
181
|
+
|
|
182
|
+
# List deployment plans
|
|
183
|
+
# Read plans for the approved ad account with their current review_version. Pass the version from the plan you reviewed when executing.
|
|
184
|
+
# @param workspace [Integer] The workspace ID
|
|
185
|
+
# @param [Hash] opts the optional parameters
|
|
186
|
+
# @option opts [Integer] :per_page (default to 25)
|
|
187
|
+
# @return [Array<(LaunchPlansIndex200Response, Integer, Hash)>] LaunchPlansIndex200Response data, response status code and response headers
|
|
188
|
+
def launch_plans_index_with_http_info(workspace, opts = {})
|
|
189
|
+
if @api_client.config.debugging
|
|
190
|
+
@api_client.config.logger.debug 'Calling API: DeploymentPlanApi.launch_plans_index ...'
|
|
191
|
+
end
|
|
192
|
+
# verify the required parameter 'workspace' is set
|
|
193
|
+
if @api_client.config.client_side_validation && workspace.nil?
|
|
194
|
+
fail ArgumentError, "Missing the required parameter 'workspace' when calling DeploymentPlanApi.launch_plans_index"
|
|
195
|
+
end
|
|
196
|
+
# resource path
|
|
197
|
+
local_var_path = '/workspaces/{workspace}/admin/plans'.sub('{workspace}', CGI.escape(workspace.to_s))
|
|
198
|
+
|
|
199
|
+
# query parameters
|
|
200
|
+
query_params = opts[:query_params] || {}
|
|
201
|
+
query_params[:'per_page'] = opts[:'per_page'] if !opts[:'per_page'].nil?
|
|
202
|
+
|
|
203
|
+
# header parameters
|
|
204
|
+
header_params = opts[:header_params] || {}
|
|
205
|
+
# HTTP header 'Accept' (if needed)
|
|
206
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
|
207
|
+
|
|
208
|
+
# form parameters
|
|
209
|
+
form_params = opts[:form_params] || {}
|
|
210
|
+
|
|
211
|
+
# http body (model)
|
|
212
|
+
post_body = opts[:debug_body]
|
|
213
|
+
|
|
214
|
+
# return_type
|
|
215
|
+
return_type = opts[:debug_return_type] || 'LaunchPlansIndex200Response'
|
|
216
|
+
|
|
217
|
+
# auth_names
|
|
218
|
+
auth_names = opts[:debug_auth_names] || ['planReader']
|
|
219
|
+
|
|
220
|
+
new_options = opts.merge(
|
|
221
|
+
:operation => :"DeploymentPlanApi.launch_plans_index",
|
|
222
|
+
:header_params => header_params,
|
|
223
|
+
:query_params => query_params,
|
|
224
|
+
:form_params => form_params,
|
|
225
|
+
:body => post_body,
|
|
226
|
+
:auth_names => auth_names,
|
|
227
|
+
:return_type => return_type
|
|
228
|
+
)
|
|
229
|
+
|
|
230
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
|
231
|
+
if @api_client.config.debugging
|
|
232
|
+
@api_client.config.logger.debug "API called: DeploymentPlanApi#launch_plans_index\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
233
|
+
end
|
|
234
|
+
return data, status_code, headers
|
|
235
|
+
end
|
|
236
|
+
|
|
237
|
+
# Read a deployment plan
|
|
238
|
+
# Read plans for the approved ad account with their current review_version. Pass the version from the plan you reviewed when executing.
|
|
239
|
+
# @param workspace [Integer] The workspace ID
|
|
240
|
+
# @param deployment_plan [String]
|
|
241
|
+
# @param [Hash] opts the optional parameters
|
|
242
|
+
# @return [LaunchPlansShow200Response]
|
|
243
|
+
def launch_plans_show(workspace, deployment_plan, opts = {})
|
|
244
|
+
data, _status_code, _headers = launch_plans_show_with_http_info(workspace, deployment_plan, opts)
|
|
245
|
+
data
|
|
246
|
+
end
|
|
247
|
+
|
|
248
|
+
# Read a deployment plan
|
|
249
|
+
# Read plans for the approved ad account with their current review_version. Pass the version from the plan you reviewed when executing.
|
|
250
|
+
# @param workspace [Integer] The workspace ID
|
|
251
|
+
# @param deployment_plan [String]
|
|
252
|
+
# @param [Hash] opts the optional parameters
|
|
253
|
+
# @return [Array<(LaunchPlansShow200Response, Integer, Hash)>] LaunchPlansShow200Response data, response status code and response headers
|
|
254
|
+
def launch_plans_show_with_http_info(workspace, deployment_plan, opts = {})
|
|
255
|
+
if @api_client.config.debugging
|
|
256
|
+
@api_client.config.logger.debug 'Calling API: DeploymentPlanApi.launch_plans_show ...'
|
|
257
|
+
end
|
|
258
|
+
# verify the required parameter 'workspace' is set
|
|
259
|
+
if @api_client.config.client_side_validation && workspace.nil?
|
|
260
|
+
fail ArgumentError, "Missing the required parameter 'workspace' when calling DeploymentPlanApi.launch_plans_show"
|
|
261
|
+
end
|
|
262
|
+
# verify the required parameter 'deployment_plan' is set
|
|
263
|
+
if @api_client.config.client_side_validation && deployment_plan.nil?
|
|
264
|
+
fail ArgumentError, "Missing the required parameter 'deployment_plan' when calling DeploymentPlanApi.launch_plans_show"
|
|
265
|
+
end
|
|
266
|
+
# resource path
|
|
267
|
+
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
|
+
|
|
269
|
+
# query parameters
|
|
270
|
+
query_params = opts[:query_params] || {}
|
|
271
|
+
|
|
272
|
+
# header parameters
|
|
273
|
+
header_params = opts[:header_params] || {}
|
|
274
|
+
# HTTP header 'Accept' (if needed)
|
|
275
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
|
276
|
+
|
|
277
|
+
# form parameters
|
|
278
|
+
form_params = opts[:form_params] || {}
|
|
279
|
+
|
|
280
|
+
# http body (model)
|
|
281
|
+
post_body = opts[:debug_body]
|
|
282
|
+
|
|
283
|
+
# return_type
|
|
284
|
+
return_type = opts[:debug_return_type] || 'LaunchPlansShow200Response'
|
|
285
|
+
|
|
286
|
+
# auth_names
|
|
287
|
+
auth_names = opts[:debug_auth_names] || ['planReader']
|
|
288
|
+
|
|
289
|
+
new_options = opts.merge(
|
|
290
|
+
:operation => :"DeploymentPlanApi.launch_plans_show",
|
|
291
|
+
:header_params => header_params,
|
|
292
|
+
:query_params => query_params,
|
|
293
|
+
:form_params => form_params,
|
|
294
|
+
:body => post_body,
|
|
295
|
+
:auth_names => auth_names,
|
|
296
|
+
:return_type => return_type
|
|
297
|
+
)
|
|
298
|
+
|
|
299
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
|
300
|
+
if @api_client.config.debugging
|
|
301
|
+
@api_client.config.logger.debug "API called: DeploymentPlanApi#launch_plans_show\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
302
|
+
end
|
|
303
|
+
return data, status_code, headers
|
|
304
|
+
end
|
|
305
|
+
end
|
|
306
|
+
end
|
|
@@ -0,0 +1,121 @@
|
|
|
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 MetaInventoryExposureApi
|
|
17
|
+
attr_accessor :api_client
|
|
18
|
+
|
|
19
|
+
def initialize(api_client = ApiClient.default)
|
|
20
|
+
@api_client = api_client
|
|
21
|
+
end
|
|
22
|
+
# Compare Meta metrics with counted arrivals
|
|
23
|
+
# Compare daily Meta metrics with PlainRouter arrivals in the account timezone, within plan retention. Unknown object IDs are never exposed.
|
|
24
|
+
# @param workspace [Integer] The workspace ID
|
|
25
|
+
# @param account_id [String]
|
|
26
|
+
# @param [Hash] opts the optional parameters
|
|
27
|
+
# @option opts [Date] :start_date
|
|
28
|
+
# @option opts [Date] :end_date
|
|
29
|
+
# @option opts [String] :campaign_id
|
|
30
|
+
# @option opts [String] :adset_id
|
|
31
|
+
# @option opts [String] :ad_id
|
|
32
|
+
# @option opts [Boolean] :include_changes
|
|
33
|
+
# @return [GetInventoryMetrics200Response]
|
|
34
|
+
def get_inventory_metrics(workspace, account_id, opts = {})
|
|
35
|
+
data, _status_code, _headers = get_inventory_metrics_with_http_info(workspace, account_id, opts)
|
|
36
|
+
data
|
|
37
|
+
end
|
|
38
|
+
|
|
39
|
+
# Compare Meta metrics with counted arrivals
|
|
40
|
+
# Compare daily Meta metrics with PlainRouter arrivals in the account timezone, within plan retention. Unknown object IDs are never exposed.
|
|
41
|
+
# @param workspace [Integer] The workspace ID
|
|
42
|
+
# @param account_id [String]
|
|
43
|
+
# @param [Hash] opts the optional parameters
|
|
44
|
+
# @option opts [Date] :start_date
|
|
45
|
+
# @option opts [Date] :end_date
|
|
46
|
+
# @option opts [String] :campaign_id
|
|
47
|
+
# @option opts [String] :adset_id
|
|
48
|
+
# @option opts [String] :ad_id
|
|
49
|
+
# @option opts [Boolean] :include_changes
|
|
50
|
+
# @return [Array<(GetInventoryMetrics200Response, Integer, Hash)>] GetInventoryMetrics200Response data, response status code and response headers
|
|
51
|
+
def get_inventory_metrics_with_http_info(workspace, account_id, opts = {})
|
|
52
|
+
if @api_client.config.debugging
|
|
53
|
+
@api_client.config.logger.debug 'Calling API: MetaInventoryExposureApi.get_inventory_metrics ...'
|
|
54
|
+
end
|
|
55
|
+
# verify the required parameter 'workspace' is set
|
|
56
|
+
if @api_client.config.client_side_validation && workspace.nil?
|
|
57
|
+
fail ArgumentError, "Missing the required parameter 'workspace' when calling MetaInventoryExposureApi.get_inventory_metrics"
|
|
58
|
+
end
|
|
59
|
+
# verify the required parameter 'account_id' is set
|
|
60
|
+
if @api_client.config.client_side_validation && account_id.nil?
|
|
61
|
+
fail ArgumentError, "Missing the required parameter 'account_id' when calling MetaInventoryExposureApi.get_inventory_metrics"
|
|
62
|
+
end
|
|
63
|
+
if @api_client.config.client_side_validation && !opts[:'campaign_id'].nil? && opts[:'campaign_id'].to_s.length > 128
|
|
64
|
+
fail ArgumentError, 'invalid value for "opts[:"campaign_id"]" when calling MetaInventoryExposureApi.get_inventory_metrics, the character length must be smaller than or equal to 128.'
|
|
65
|
+
end
|
|
66
|
+
|
|
67
|
+
if @api_client.config.client_side_validation && !opts[:'adset_id'].nil? && opts[:'adset_id'].to_s.length > 128
|
|
68
|
+
fail ArgumentError, 'invalid value for "opts[:"adset_id"]" when calling MetaInventoryExposureApi.get_inventory_metrics, the character length must be smaller than or equal to 128.'
|
|
69
|
+
end
|
|
70
|
+
|
|
71
|
+
if @api_client.config.client_side_validation && !opts[:'ad_id'].nil? && opts[:'ad_id'].to_s.length > 128
|
|
72
|
+
fail ArgumentError, 'invalid value for "opts[:"ad_id"]" when calling MetaInventoryExposureApi.get_inventory_metrics, the character length must be smaller than or equal to 128.'
|
|
73
|
+
end
|
|
74
|
+
|
|
75
|
+
# resource path
|
|
76
|
+
local_var_path = '/workspaces/{workspace}/admin/ad-accounts/{account_id}/inventory/metrics'.sub('{workspace}', CGI.escape(workspace.to_s)).sub('{account_id}', CGI.escape(account_id.to_s))
|
|
77
|
+
|
|
78
|
+
# query parameters
|
|
79
|
+
query_params = opts[:query_params] || {}
|
|
80
|
+
query_params[:'start_date'] = opts[:'start_date'] if !opts[:'start_date'].nil?
|
|
81
|
+
query_params[:'end_date'] = opts[:'end_date'] if !opts[:'end_date'].nil?
|
|
82
|
+
query_params[:'campaign_id'] = opts[:'campaign_id'] if !opts[:'campaign_id'].nil?
|
|
83
|
+
query_params[:'adset_id'] = opts[:'adset_id'] if !opts[:'adset_id'].nil?
|
|
84
|
+
query_params[:'ad_id'] = opts[:'ad_id'] if !opts[:'ad_id'].nil?
|
|
85
|
+
query_params[:'include_changes'] = opts[:'include_changes'] if !opts[:'include_changes'].nil?
|
|
86
|
+
|
|
87
|
+
# header parameters
|
|
88
|
+
header_params = opts[:header_params] || {}
|
|
89
|
+
# HTTP header 'Accept' (if needed)
|
|
90
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
|
91
|
+
|
|
92
|
+
# form parameters
|
|
93
|
+
form_params = opts[:form_params] || {}
|
|
94
|
+
|
|
95
|
+
# http body (model)
|
|
96
|
+
post_body = opts[:debug_body]
|
|
97
|
+
|
|
98
|
+
# return_type
|
|
99
|
+
return_type = opts[:debug_return_type] || 'GetInventoryMetrics200Response'
|
|
100
|
+
|
|
101
|
+
# auth_names
|
|
102
|
+
auth_names = opts[:debug_auth_names] || ['workspaceInventoryKey']
|
|
103
|
+
|
|
104
|
+
new_options = opts.merge(
|
|
105
|
+
:operation => :"MetaInventoryExposureApi.get_inventory_metrics",
|
|
106
|
+
:header_params => header_params,
|
|
107
|
+
:query_params => query_params,
|
|
108
|
+
:form_params => form_params,
|
|
109
|
+
:body => post_body,
|
|
110
|
+
:auth_names => auth_names,
|
|
111
|
+
:return_type => return_type
|
|
112
|
+
)
|
|
113
|
+
|
|
114
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
|
115
|
+
if @api_client.config.debugging
|
|
116
|
+
@api_client.config.logger.debug "API called: MetaInventoryExposureApi#get_inventory_metrics\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
117
|
+
end
|
|
118
|
+
return data, status_code, headers
|
|
119
|
+
end
|
|
120
|
+
end
|
|
121
|
+
end
|
|
@@ -269,6 +269,48 @@ module PlainRouter::OpenAPI
|
|
|
269
269
|
key: 'Authorization',
|
|
270
270
|
value: "Bearer #{access_token_with_refresh}"
|
|
271
271
|
},
|
|
272
|
+
'planWriter' =>
|
|
273
|
+
{
|
|
274
|
+
type: 'bearer',
|
|
275
|
+
in: 'header',
|
|
276
|
+
key: 'Authorization',
|
|
277
|
+
value: "Bearer #{access_token_with_refresh}"
|
|
278
|
+
},
|
|
279
|
+
'workspaceInventoryKey' =>
|
|
280
|
+
{
|
|
281
|
+
type: 'bearer',
|
|
282
|
+
in: 'header',
|
|
283
|
+
key: 'Authorization',
|
|
284
|
+
value: "Bearer #{access_token_with_refresh}"
|
|
285
|
+
},
|
|
286
|
+
'planReader' =>
|
|
287
|
+
{
|
|
288
|
+
type: 'bearer',
|
|
289
|
+
in: 'header',
|
|
290
|
+
key: 'Authorization',
|
|
291
|
+
value: "Bearer #{access_token_with_refresh}"
|
|
292
|
+
},
|
|
293
|
+
'creativeWriter' =>
|
|
294
|
+
{
|
|
295
|
+
type: 'bearer',
|
|
296
|
+
in: 'header',
|
|
297
|
+
key: 'Authorization',
|
|
298
|
+
value: "Bearer #{access_token_with_refresh}"
|
|
299
|
+
},
|
|
300
|
+
'testReader' =>
|
|
301
|
+
{
|
|
302
|
+
type: 'bearer',
|
|
303
|
+
in: 'header',
|
|
304
|
+
key: 'Authorization',
|
|
305
|
+
value: "Bearer #{access_token_with_refresh}"
|
|
306
|
+
},
|
|
307
|
+
'testWriter' =>
|
|
308
|
+
{
|
|
309
|
+
type: 'bearer',
|
|
310
|
+
in: 'header',
|
|
311
|
+
key: 'Authorization',
|
|
312
|
+
value: "Bearer #{access_token_with_refresh}"
|
|
313
|
+
},
|
|
272
314
|
}
|
|
273
315
|
end
|
|
274
316
|
|
|
@@ -17,6 +17,8 @@ module PlainRouter::OpenAPI
|
|
|
17
17
|
class ActionCurrentDisposition < ApiModelBase
|
|
18
18
|
attr_accessor :receipt_status
|
|
19
19
|
|
|
20
|
+
attr_accessor :outcome_payload
|
|
21
|
+
|
|
20
22
|
attr_accessor :outcome_status
|
|
21
23
|
|
|
22
24
|
attr_accessor :outcome_reason_code
|
|
@@ -55,6 +57,7 @@ module PlainRouter::OpenAPI
|
|
|
55
57
|
def self.attribute_map
|
|
56
58
|
{
|
|
57
59
|
:'receipt_status' => :'receipt_status',
|
|
60
|
+
:'outcome_payload' => :'outcome_payload',
|
|
58
61
|
:'outcome_status' => :'outcome_status',
|
|
59
62
|
:'outcome_reason_code' => :'outcome_reason_code',
|
|
60
63
|
:'outcome_checked_at' => :'outcome_checked_at',
|
|
@@ -78,6 +81,7 @@ module PlainRouter::OpenAPI
|
|
|
78
81
|
def self.openapi_types
|
|
79
82
|
{
|
|
80
83
|
:'receipt_status' => :'String',
|
|
84
|
+
:'outcome_payload' => :'ActionCurrentDispositionOutcomePayload',
|
|
81
85
|
:'outcome_status' => :'String',
|
|
82
86
|
:'outcome_reason_code' => :'String',
|
|
83
87
|
:'outcome_checked_at' => :'Time',
|
|
@@ -91,6 +95,7 @@ module PlainRouter::OpenAPI
|
|
|
91
95
|
def self.openapi_nullable
|
|
92
96
|
Set.new([
|
|
93
97
|
:'receipt_status',
|
|
98
|
+
:'outcome_payload',
|
|
94
99
|
:'outcome_status',
|
|
95
100
|
:'outcome_reason_code',
|
|
96
101
|
:'outcome_checked_at',
|
|
@@ -121,6 +126,12 @@ module PlainRouter::OpenAPI
|
|
|
121
126
|
self.receipt_status = nil
|
|
122
127
|
end
|
|
123
128
|
|
|
129
|
+
if attributes.key?(:'outcome_payload')
|
|
130
|
+
self.outcome_payload = attributes[:'outcome_payload']
|
|
131
|
+
else
|
|
132
|
+
self.outcome_payload = nil
|
|
133
|
+
end
|
|
134
|
+
|
|
124
135
|
if attributes.key?(:'outcome_status')
|
|
125
136
|
self.outcome_status = attributes[:'outcome_status']
|
|
126
137
|
else
|
|
@@ -230,6 +241,7 @@ module PlainRouter::OpenAPI
|
|
|
230
241
|
return true if self.equal?(o)
|
|
231
242
|
self.class == o.class &&
|
|
232
243
|
receipt_status == o.receipt_status &&
|
|
244
|
+
outcome_payload == o.outcome_payload &&
|
|
233
245
|
outcome_status == o.outcome_status &&
|
|
234
246
|
outcome_reason_code == o.outcome_reason_code &&
|
|
235
247
|
outcome_checked_at == o.outcome_checked_at &&
|
|
@@ -247,7 +259,7 @@ module PlainRouter::OpenAPI
|
|
|
247
259
|
# Calculates hash code according to all attributes.
|
|
248
260
|
# @return [Integer] Hash code
|
|
249
261
|
def hash
|
|
250
|
-
[receipt_status, outcome_status, outcome_reason_code, outcome_checked_at, compensation_reason_code, recovery_disposition, late_restored].hash
|
|
262
|
+
[receipt_status, outcome_payload, outcome_status, outcome_reason_code, outcome_checked_at, compensation_reason_code, recovery_disposition, late_restored].hash
|
|
251
263
|
end
|
|
252
264
|
|
|
253
265
|
# Builds the object from hash
|