plainrouter-sdk 0.2.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 +16 -2
- data/lib/plainrouter/client.rb +338 -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_dry_run_api_api.rb +2 -2
- data/lib/plainrouter/openapi/api/action_proposal_api_api.rb +2 -2
- 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 +263 -0
- data/lib/plainrouter/openapi/api/agent_context_api.rb +93 -0
- data/lib/plainrouter/openapi/api/cookie_declaration_api.rb +90 -0
- data/lib/plainrouter/openapi/api/creative_api.rb +422 -0
- data/lib/plainrouter/openapi/api/deployment_plan_api.rb +561 -0
- 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 +254 -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 +76 -0
- data/lib/plainrouter/openapi/models/action_batch_read_data.rb +42 -4
- 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_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_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 +103 -4
- 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 +72 -4
- 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_read_item_counted_evidence_target.rb +190 -0
- data/lib/plainrouter/openapi/models/action_read_item_counted_evidence_window.rb +225 -0
- 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/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_api_dry_run401_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/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_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/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_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/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 +306 -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.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/destination_type.rb +2 -1
- data/lib/plainrouter/openapi/models/draft_batch_mode.rb +41 -0
- data/lib/plainrouter/openapi/models/execute_deployment_plan_request.rb +200 -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_cookie_declaration404_response.rb +103 -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 +345 -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/{action_proposal_input_actions_inner_any_of11_params.rb → get_inventory_metrics200_response_effective_range.rb} +41 -24
- 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_pagination_value.rb +202 -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_creatives_index200_response.rb +164 -0
- data/lib/plainrouter/openapi/models/launch_creatives_index200_response_creatives.rb +196 -0
- data/lib/plainrouter/openapi/models/launch_creatives_index200_response_creatives_data_inner.rb +451 -0
- data/lib/plainrouter/openapi/models/launch_creatives_index200_response_creatives_data_inner_tags.rb +104 -0
- data/lib/plainrouter/openapi/models/launch_creatives_status200_response.rb +166 -0
- 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_copy422_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 +347 -0
- 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_show200_response.rb +164 -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_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/plan_validate_rejected.rb +164 -0
- data/lib/plainrouter/openapi/models/plan_validate_rejected_error.rb +191 -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/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/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/store_deployment_plan_request.rb +570 -0
- 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/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 +190 -2
- data/lib/plainrouter/proposal_errors.rb +31 -0
- data/lib/plainrouter/version.rb +1 -1
- data/lib/plainrouter.rb +1 -0
- metadata +196 -4
|
@@ -0,0 +1,267 @@
|
|
|
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 'date'
|
|
14
|
+
require 'time'
|
|
15
|
+
|
|
16
|
+
module PlainRouter::OpenAPI
|
|
17
|
+
# Optional complete per-ad copy override; null uses the plan copy.
|
|
18
|
+
class DeploymentPlanReadCreativesInnerCopy < ApiModelBase
|
|
19
|
+
attr_accessor :primary_text
|
|
20
|
+
|
|
21
|
+
attr_accessor :headline
|
|
22
|
+
|
|
23
|
+
attr_accessor :description
|
|
24
|
+
|
|
25
|
+
attr_accessor :cta
|
|
26
|
+
|
|
27
|
+
class EnumAttributeValidator
|
|
28
|
+
attr_reader :datatype
|
|
29
|
+
attr_reader :allowable_values
|
|
30
|
+
|
|
31
|
+
def initialize(datatype, allowable_values)
|
|
32
|
+
@allowable_values = allowable_values.map do |value|
|
|
33
|
+
case datatype.to_s
|
|
34
|
+
when /Integer/i
|
|
35
|
+
value.to_i
|
|
36
|
+
when /Float/i
|
|
37
|
+
value.to_f
|
|
38
|
+
else
|
|
39
|
+
value
|
|
40
|
+
end
|
|
41
|
+
end
|
|
42
|
+
end
|
|
43
|
+
|
|
44
|
+
def valid?(value)
|
|
45
|
+
!value || allowable_values.include?(value)
|
|
46
|
+
end
|
|
47
|
+
end
|
|
48
|
+
|
|
49
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
|
50
|
+
def self.attribute_map
|
|
51
|
+
{
|
|
52
|
+
:'primary_text' => :'primary_text',
|
|
53
|
+
:'headline' => :'headline',
|
|
54
|
+
:'description' => :'description',
|
|
55
|
+
:'cta' => :'cta'
|
|
56
|
+
}
|
|
57
|
+
end
|
|
58
|
+
|
|
59
|
+
# Returns attribute mapping this model knows about
|
|
60
|
+
def self.acceptable_attribute_map
|
|
61
|
+
attribute_map
|
|
62
|
+
end
|
|
63
|
+
|
|
64
|
+
# Returns all the JSON keys this model knows about
|
|
65
|
+
def self.acceptable_attributes
|
|
66
|
+
acceptable_attribute_map.values
|
|
67
|
+
end
|
|
68
|
+
|
|
69
|
+
# Attribute type mapping.
|
|
70
|
+
def self.openapi_types
|
|
71
|
+
{
|
|
72
|
+
:'primary_text' => :'String',
|
|
73
|
+
:'headline' => :'String',
|
|
74
|
+
:'description' => :'String',
|
|
75
|
+
:'cta' => :'String'
|
|
76
|
+
}
|
|
77
|
+
end
|
|
78
|
+
|
|
79
|
+
# List of attributes with nullable: true
|
|
80
|
+
def self.openapi_nullable
|
|
81
|
+
Set.new([
|
|
82
|
+
])
|
|
83
|
+
end
|
|
84
|
+
|
|
85
|
+
# Initializes the object
|
|
86
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
|
87
|
+
def initialize(attributes = {})
|
|
88
|
+
if (!attributes.is_a?(Hash))
|
|
89
|
+
fail ArgumentError, "The input argument (attributes) must be a hash in `PlainRouter::OpenAPI::DeploymentPlanReadCreativesInnerCopy` initialize method"
|
|
90
|
+
end
|
|
91
|
+
|
|
92
|
+
# check to see if the attribute exists and convert string to symbol for hash key
|
|
93
|
+
acceptable_attribute_map = self.class.acceptable_attribute_map
|
|
94
|
+
attributes = attributes.each_with_object({}) { |(k, v), h|
|
|
95
|
+
if (!acceptable_attribute_map.key?(k.to_sym))
|
|
96
|
+
fail ArgumentError, "`#{k}` is not a valid attribute in `PlainRouter::OpenAPI::DeploymentPlanReadCreativesInnerCopy`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
|
|
97
|
+
end
|
|
98
|
+
h[k.to_sym] = v
|
|
99
|
+
}
|
|
100
|
+
|
|
101
|
+
if attributes.key?(:'primary_text')
|
|
102
|
+
self.primary_text = attributes[:'primary_text']
|
|
103
|
+
else
|
|
104
|
+
self.primary_text = nil
|
|
105
|
+
end
|
|
106
|
+
|
|
107
|
+
if attributes.key?(:'headline')
|
|
108
|
+
self.headline = attributes[:'headline']
|
|
109
|
+
else
|
|
110
|
+
self.headline = nil
|
|
111
|
+
end
|
|
112
|
+
|
|
113
|
+
if attributes.key?(:'description')
|
|
114
|
+
self.description = attributes[:'description']
|
|
115
|
+
else
|
|
116
|
+
self.description = nil
|
|
117
|
+
end
|
|
118
|
+
|
|
119
|
+
if attributes.key?(:'cta')
|
|
120
|
+
self.cta = attributes[:'cta']
|
|
121
|
+
else
|
|
122
|
+
self.cta = nil
|
|
123
|
+
end
|
|
124
|
+
end
|
|
125
|
+
|
|
126
|
+
# Show invalid properties with the reasons. Usually used together with valid?
|
|
127
|
+
# @return Array for valid properties with the reasons
|
|
128
|
+
def list_invalid_properties
|
|
129
|
+
warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
|
|
130
|
+
invalid_properties = Array.new
|
|
131
|
+
if @primary_text.nil?
|
|
132
|
+
invalid_properties.push('invalid value for "primary_text", primary_text cannot be nil.')
|
|
133
|
+
end
|
|
134
|
+
|
|
135
|
+
if @headline.nil?
|
|
136
|
+
invalid_properties.push('invalid value for "headline", headline cannot be nil.')
|
|
137
|
+
end
|
|
138
|
+
|
|
139
|
+
if @description.nil?
|
|
140
|
+
invalid_properties.push('invalid value for "description", description cannot be nil.')
|
|
141
|
+
end
|
|
142
|
+
|
|
143
|
+
if @cta.nil?
|
|
144
|
+
invalid_properties.push('invalid value for "cta", cta cannot be nil.')
|
|
145
|
+
end
|
|
146
|
+
|
|
147
|
+
invalid_properties
|
|
148
|
+
end
|
|
149
|
+
|
|
150
|
+
# Check to see if the all the properties in the model are valid
|
|
151
|
+
# @return true if the model is valid
|
|
152
|
+
def valid?
|
|
153
|
+
warn '[DEPRECATED] the `valid?` method is obsolete'
|
|
154
|
+
return false if @primary_text.nil?
|
|
155
|
+
return false if @headline.nil?
|
|
156
|
+
return false if @description.nil?
|
|
157
|
+
return false if @cta.nil?
|
|
158
|
+
cta_validator = EnumAttributeValidator.new('String', ["learn_more", "shop_now", "sign_up"])
|
|
159
|
+
return false unless cta_validator.valid?(@cta)
|
|
160
|
+
true
|
|
161
|
+
end
|
|
162
|
+
|
|
163
|
+
# Custom attribute writer method with validation
|
|
164
|
+
# @param [Object] primary_text Value to be assigned
|
|
165
|
+
def primary_text=(primary_text)
|
|
166
|
+
if primary_text.nil?
|
|
167
|
+
fail ArgumentError, 'primary_text cannot be nil'
|
|
168
|
+
end
|
|
169
|
+
|
|
170
|
+
@primary_text = primary_text
|
|
171
|
+
end
|
|
172
|
+
|
|
173
|
+
# Custom attribute writer method with validation
|
|
174
|
+
# @param [Object] headline Value to be assigned
|
|
175
|
+
def headline=(headline)
|
|
176
|
+
if headline.nil?
|
|
177
|
+
fail ArgumentError, 'headline cannot be nil'
|
|
178
|
+
end
|
|
179
|
+
|
|
180
|
+
@headline = headline
|
|
181
|
+
end
|
|
182
|
+
|
|
183
|
+
# Custom attribute writer method with validation
|
|
184
|
+
# @param [Object] description Value to be assigned
|
|
185
|
+
def description=(description)
|
|
186
|
+
if description.nil?
|
|
187
|
+
fail ArgumentError, 'description cannot be nil'
|
|
188
|
+
end
|
|
189
|
+
|
|
190
|
+
@description = description
|
|
191
|
+
end
|
|
192
|
+
|
|
193
|
+
# Custom attribute writer method checking allowed values (enum).
|
|
194
|
+
# @param [Object] cta Object to be assigned
|
|
195
|
+
def cta=(cta)
|
|
196
|
+
validator = EnumAttributeValidator.new('String', ["learn_more", "shop_now", "sign_up"])
|
|
197
|
+
unless validator.valid?(cta)
|
|
198
|
+
fail ArgumentError, "invalid value for \"cta\", must be one of #{validator.allowable_values}."
|
|
199
|
+
end
|
|
200
|
+
@cta = cta
|
|
201
|
+
end
|
|
202
|
+
|
|
203
|
+
# Checks equality by comparing each attribute.
|
|
204
|
+
# @param [Object] Object to be compared
|
|
205
|
+
def ==(o)
|
|
206
|
+
return true if self.equal?(o)
|
|
207
|
+
self.class == o.class &&
|
|
208
|
+
primary_text == o.primary_text &&
|
|
209
|
+
headline == o.headline &&
|
|
210
|
+
description == o.description &&
|
|
211
|
+
cta == o.cta
|
|
212
|
+
end
|
|
213
|
+
|
|
214
|
+
# @see the `==` method
|
|
215
|
+
# @param [Object] Object to be compared
|
|
216
|
+
def eql?(o)
|
|
217
|
+
self == o
|
|
218
|
+
end
|
|
219
|
+
|
|
220
|
+
# Calculates hash code according to all attributes.
|
|
221
|
+
# @return [Integer] Hash code
|
|
222
|
+
def hash
|
|
223
|
+
[primary_text, headline, description, cta].hash
|
|
224
|
+
end
|
|
225
|
+
|
|
226
|
+
# Builds the object from hash
|
|
227
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
|
228
|
+
# @return [Object] Returns the model itself
|
|
229
|
+
def self.build_from_hash(attributes)
|
|
230
|
+
return nil unless attributes.is_a?(Hash)
|
|
231
|
+
attributes = attributes.transform_keys(&:to_sym)
|
|
232
|
+
transformed_hash = {}
|
|
233
|
+
openapi_types.each_pair do |key, type|
|
|
234
|
+
if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
|
|
235
|
+
transformed_hash["#{key}"] = nil
|
|
236
|
+
elsif type =~ /\AArray<(.*)>/i
|
|
237
|
+
# check to ensure the input is an array given that the attribute
|
|
238
|
+
# is documented as an array but the input is not
|
|
239
|
+
if attributes[attribute_map[key]].is_a?(Array)
|
|
240
|
+
transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
|
|
241
|
+
end
|
|
242
|
+
elsif !attributes[attribute_map[key]].nil?
|
|
243
|
+
transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
|
|
244
|
+
end
|
|
245
|
+
end
|
|
246
|
+
new(transformed_hash)
|
|
247
|
+
end
|
|
248
|
+
|
|
249
|
+
# Returns the object in the form of hash
|
|
250
|
+
# @return [Hash] Returns the object in the form of hash
|
|
251
|
+
def to_hash
|
|
252
|
+
hash = {}
|
|
253
|
+
self.class.attribute_map.each_pair do |attr, param|
|
|
254
|
+
value = self.send(attr)
|
|
255
|
+
if value.nil?
|
|
256
|
+
is_nullable = self.class.openapi_nullable.include?(attr)
|
|
257
|
+
next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
|
|
258
|
+
end
|
|
259
|
+
|
|
260
|
+
hash[param] = _to_hash(value)
|
|
261
|
+
end
|
|
262
|
+
hash
|
|
263
|
+
end
|
|
264
|
+
|
|
265
|
+
end
|
|
266
|
+
|
|
267
|
+
end
|
|
@@ -36,6 +36,12 @@ module PlainRouter::OpenAPI
|
|
|
36
36
|
|
|
37
37
|
attr_accessor :updated_at
|
|
38
38
|
|
|
39
|
+
attr_accessor :attention_reason
|
|
40
|
+
|
|
41
|
+
attr_accessor :held_count
|
|
42
|
+
|
|
43
|
+
attr_accessor :notices
|
|
44
|
+
|
|
39
45
|
class EnumAttributeValidator
|
|
40
46
|
attr_reader :datatype
|
|
41
47
|
attr_reader :allowable_values
|
|
@@ -70,7 +76,10 @@ module PlainRouter::OpenAPI
|
|
|
70
76
|
:'config' => :'config',
|
|
71
77
|
:'status' => :'status',
|
|
72
78
|
:'created_at' => :'created_at',
|
|
73
|
-
:'updated_at' => :'updated_at'
|
|
79
|
+
:'updated_at' => :'updated_at',
|
|
80
|
+
:'attention_reason' => :'attention_reason',
|
|
81
|
+
:'held_count' => :'held_count',
|
|
82
|
+
:'notices' => :'notices'
|
|
74
83
|
}
|
|
75
84
|
end
|
|
76
85
|
|
|
@@ -93,10 +102,13 @@ module PlainRouter::OpenAPI
|
|
|
93
102
|
:'platform_ad_account_id' => :'Integer',
|
|
94
103
|
:'type' => :'DestinationType',
|
|
95
104
|
:'credential_source' => :'DestinationCredentialSource',
|
|
96
|
-
:'config' => :'
|
|
105
|
+
:'config' => :'DestinationConfig',
|
|
97
106
|
:'status' => :'DestinationStatus',
|
|
98
107
|
:'created_at' => :'Time',
|
|
99
|
-
:'updated_at' => :'Time'
|
|
108
|
+
:'updated_at' => :'Time',
|
|
109
|
+
:'attention_reason' => :'GetEvent200ResponseEventConsent',
|
|
110
|
+
:'held_count' => :'Integer',
|
|
111
|
+
:'notices' => :'Array<Hash<String, Object>>'
|
|
100
112
|
}
|
|
101
113
|
end
|
|
102
114
|
|
|
@@ -105,7 +117,8 @@ module PlainRouter::OpenAPI
|
|
|
105
117
|
Set.new([
|
|
106
118
|
:'platform_ad_account_id',
|
|
107
119
|
:'created_at',
|
|
108
|
-
:'updated_at'
|
|
120
|
+
:'updated_at',
|
|
121
|
+
:'attention_reason',
|
|
109
122
|
])
|
|
110
123
|
end
|
|
111
124
|
|
|
@@ -162,9 +175,7 @@ module PlainRouter::OpenAPI
|
|
|
162
175
|
end
|
|
163
176
|
|
|
164
177
|
if attributes.key?(:'config')
|
|
165
|
-
|
|
166
|
-
self.config = value
|
|
167
|
-
end
|
|
178
|
+
self.config = attributes[:'config']
|
|
168
179
|
else
|
|
169
180
|
self.config = nil
|
|
170
181
|
end
|
|
@@ -186,6 +197,26 @@ module PlainRouter::OpenAPI
|
|
|
186
197
|
else
|
|
187
198
|
self.updated_at = nil
|
|
188
199
|
end
|
|
200
|
+
|
|
201
|
+
if attributes.key?(:'attention_reason')
|
|
202
|
+
self.attention_reason = attributes[:'attention_reason']
|
|
203
|
+
else
|
|
204
|
+
self.attention_reason = nil
|
|
205
|
+
end
|
|
206
|
+
|
|
207
|
+
if attributes.key?(:'held_count')
|
|
208
|
+
self.held_count = attributes[:'held_count']
|
|
209
|
+
else
|
|
210
|
+
self.held_count = nil
|
|
211
|
+
end
|
|
212
|
+
|
|
213
|
+
if attributes.key?(:'notices')
|
|
214
|
+
if (value = attributes[:'notices']).is_a?(Array)
|
|
215
|
+
self.notices = value
|
|
216
|
+
end
|
|
217
|
+
else
|
|
218
|
+
self.notices = nil
|
|
219
|
+
end
|
|
189
220
|
end
|
|
190
221
|
|
|
191
222
|
# Show invalid properties with the reasons. Usually used together with valid?
|
|
@@ -221,6 +252,14 @@ module PlainRouter::OpenAPI
|
|
|
221
252
|
invalid_properties.push('invalid value for "status", status cannot be nil.')
|
|
222
253
|
end
|
|
223
254
|
|
|
255
|
+
if @held_count.nil?
|
|
256
|
+
invalid_properties.push('invalid value for "held_count", held_count cannot be nil.')
|
|
257
|
+
end
|
|
258
|
+
|
|
259
|
+
if @notices.nil?
|
|
260
|
+
invalid_properties.push('invalid value for "notices", notices cannot be nil.')
|
|
261
|
+
end
|
|
262
|
+
|
|
224
263
|
invalid_properties
|
|
225
264
|
end
|
|
226
265
|
|
|
@@ -235,6 +274,8 @@ module PlainRouter::OpenAPI
|
|
|
235
274
|
return false if @credential_source.nil?
|
|
236
275
|
return false if @config.nil?
|
|
237
276
|
return false if @status.nil?
|
|
277
|
+
return false if @held_count.nil?
|
|
278
|
+
return false if @notices.nil?
|
|
238
279
|
true
|
|
239
280
|
end
|
|
240
281
|
|
|
@@ -308,6 +349,26 @@ module PlainRouter::OpenAPI
|
|
|
308
349
|
@status = status
|
|
309
350
|
end
|
|
310
351
|
|
|
352
|
+
# Custom attribute writer method with validation
|
|
353
|
+
# @param [Object] held_count Value to be assigned
|
|
354
|
+
def held_count=(held_count)
|
|
355
|
+
if held_count.nil?
|
|
356
|
+
fail ArgumentError, 'held_count cannot be nil'
|
|
357
|
+
end
|
|
358
|
+
|
|
359
|
+
@held_count = held_count
|
|
360
|
+
end
|
|
361
|
+
|
|
362
|
+
# Custom attribute writer method with validation
|
|
363
|
+
# @param [Object] notices Value to be assigned
|
|
364
|
+
def notices=(notices)
|
|
365
|
+
if notices.nil?
|
|
366
|
+
fail ArgumentError, 'notices cannot be nil'
|
|
367
|
+
end
|
|
368
|
+
|
|
369
|
+
@notices = notices
|
|
370
|
+
end
|
|
371
|
+
|
|
311
372
|
# Checks equality by comparing each attribute.
|
|
312
373
|
# @param [Object] Object to be compared
|
|
313
374
|
def ==(o)
|
|
@@ -322,7 +383,10 @@ module PlainRouter::OpenAPI
|
|
|
322
383
|
config == o.config &&
|
|
323
384
|
status == o.status &&
|
|
324
385
|
created_at == o.created_at &&
|
|
325
|
-
updated_at == o.updated_at
|
|
386
|
+
updated_at == o.updated_at &&
|
|
387
|
+
attention_reason == o.attention_reason &&
|
|
388
|
+
held_count == o.held_count &&
|
|
389
|
+
notices == o.notices
|
|
326
390
|
end
|
|
327
391
|
|
|
328
392
|
# @see the `==` method
|
|
@@ -334,7 +398,7 @@ module PlainRouter::OpenAPI
|
|
|
334
398
|
# Calculates hash code according to all attributes.
|
|
335
399
|
# @return [Integer] Hash code
|
|
336
400
|
def hash
|
|
337
|
-
[id, workspace_id, signal_tracker_id, platform_ad_account_id, type, credential_source, config, status, created_at, updated_at].hash
|
|
401
|
+
[id, workspace_id, signal_tracker_id, platform_ad_account_id, type, credential_source, config, status, created_at, updated_at, attention_reason, held_count, notices].hash
|
|
338
402
|
end
|
|
339
403
|
|
|
340
404
|
# Builds the object from hash
|
|
@@ -0,0 +1,103 @@
|
|
|
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 'date'
|
|
14
|
+
require 'time'
|
|
15
|
+
|
|
16
|
+
module PlainRouter::OpenAPI
|
|
17
|
+
module DestinationConfig
|
|
18
|
+
class << self
|
|
19
|
+
# List of class defined in anyOf (OpenAPI v3)
|
|
20
|
+
def openapi_any_of
|
|
21
|
+
[
|
|
22
|
+
:'Array<Object>',
|
|
23
|
+
:'Hash<String, Object>'
|
|
24
|
+
]
|
|
25
|
+
end
|
|
26
|
+
|
|
27
|
+
# Builds the object
|
|
28
|
+
# @param [Mixed] Data to be matched against the list of anyOf items
|
|
29
|
+
# @return [Object] Returns the model or the data itself
|
|
30
|
+
def build(data)
|
|
31
|
+
# Go through the list of anyOf items and attempt to identify the appropriate one.
|
|
32
|
+
# Note:
|
|
33
|
+
# - No advanced validation of types in some cases (e.g. "x: { type: string }" will happily match { x: 123 })
|
|
34
|
+
# due to the way the deserialization is made in the base_object template (it just casts without verifying).
|
|
35
|
+
# - TODO: scalar values are de facto behaving as if they were nullable.
|
|
36
|
+
# - TODO: logging when debugging is set.
|
|
37
|
+
openapi_any_of.each do |klass|
|
|
38
|
+
begin
|
|
39
|
+
next if klass == :AnyType # "nullable: true"
|
|
40
|
+
return find_and_cast_into_type(klass, data)
|
|
41
|
+
rescue # rescue all errors so we keep iterating even if the current item lookup raises
|
|
42
|
+
end
|
|
43
|
+
end
|
|
44
|
+
|
|
45
|
+
openapi_any_of.include?(:AnyType) ? data : nil
|
|
46
|
+
end
|
|
47
|
+
|
|
48
|
+
private
|
|
49
|
+
|
|
50
|
+
SchemaMismatchError = Class.new(StandardError)
|
|
51
|
+
|
|
52
|
+
# Note: 'File' is missing here because in the regular case we get the data _after_ a call to JSON.parse.
|
|
53
|
+
def find_and_cast_into_type(klass, data)
|
|
54
|
+
return if data.nil?
|
|
55
|
+
|
|
56
|
+
case klass.to_s
|
|
57
|
+
when 'Boolean'
|
|
58
|
+
return data if data.instance_of?(TrueClass) || data.instance_of?(FalseClass)
|
|
59
|
+
when 'Float'
|
|
60
|
+
return data if data.instance_of?(Float)
|
|
61
|
+
when 'Integer'
|
|
62
|
+
return data if data.instance_of?(Integer)
|
|
63
|
+
when 'Time'
|
|
64
|
+
return Time.parse(data)
|
|
65
|
+
when 'Date'
|
|
66
|
+
return Date.iso8601(data)
|
|
67
|
+
when 'String'
|
|
68
|
+
return data if data.instance_of?(String)
|
|
69
|
+
when 'Object' # "type: object"
|
|
70
|
+
return data if data.instance_of?(Hash)
|
|
71
|
+
when /\AArray<(?<sub_type>.+)>\z/ # "type: array"
|
|
72
|
+
if data.instance_of?(Array)
|
|
73
|
+
sub_type = Regexp.last_match[:sub_type]
|
|
74
|
+
return data.map { |item| find_and_cast_into_type(sub_type, item) }
|
|
75
|
+
end
|
|
76
|
+
when /\AHash<String, (?<sub_type>.+)>\z/ # "type: object" with "additionalProperties: { ... }"
|
|
77
|
+
if data.instance_of?(Hash) && data.keys.all? { |k| k.instance_of?(Symbol) || k.instance_of?(String) }
|
|
78
|
+
sub_type = Regexp.last_match[:sub_type]
|
|
79
|
+
return data.each_with_object({}) { |(k, v), hsh| hsh[k] = find_and_cast_into_type(sub_type, v) }
|
|
80
|
+
end
|
|
81
|
+
else # model
|
|
82
|
+
const = PlainRouter::OpenAPI.const_get(klass)
|
|
83
|
+
if const
|
|
84
|
+
if const.respond_to?(:openapi_any_of) # nested anyOf model
|
|
85
|
+
model = const.build(data)
|
|
86
|
+
return model if model
|
|
87
|
+
else
|
|
88
|
+
# raise if data contains keys that are not known to the model
|
|
89
|
+
raise if const.respond_to?(:acceptable_attributes) && !(data.keys - const.acceptable_attributes).empty?
|
|
90
|
+
model = const.build_from_hash(data)
|
|
91
|
+
return model if model
|
|
92
|
+
end
|
|
93
|
+
end
|
|
94
|
+
end
|
|
95
|
+
|
|
96
|
+
raise # if no match by now, raise
|
|
97
|
+
rescue
|
|
98
|
+
raise SchemaMismatchError, "#{data} doesn't match the #{klass} type"
|
|
99
|
+
end
|
|
100
|
+
end
|
|
101
|
+
end
|
|
102
|
+
|
|
103
|
+
end
|
|
@@ -16,10 +16,11 @@ require 'time'
|
|
|
16
16
|
module PlainRouter::OpenAPI
|
|
17
17
|
class DestinationStatus
|
|
18
18
|
ACTIVE = "active".freeze
|
|
19
|
+
NEEDS_ATTENTION = "needs_attention".freeze
|
|
19
20
|
INACTIVE = "inactive".freeze
|
|
20
21
|
|
|
21
22
|
def self.all_vars
|
|
22
|
-
@all_vars ||= [ACTIVE, INACTIVE].freeze
|
|
23
|
+
@all_vars ||= [ACTIVE, NEEDS_ATTENTION, INACTIVE].freeze
|
|
23
24
|
end
|
|
24
25
|
|
|
25
26
|
# Builds the enum from string
|
|
@@ -16,9 +16,10 @@ require 'time'
|
|
|
16
16
|
module PlainRouter::OpenAPI
|
|
17
17
|
class DestinationType
|
|
18
18
|
META = "meta".freeze
|
|
19
|
+
GOOGLE_ADS = "google_ads".freeze
|
|
19
20
|
|
|
20
21
|
def self.all_vars
|
|
21
|
-
@all_vars ||= [META].freeze
|
|
22
|
+
@all_vars ||= [META, GOOGLE_ADS].freeze
|
|
22
23
|
end
|
|
23
24
|
|
|
24
25
|
# Builds the enum from string
|
|
@@ -0,0 +1,41 @@
|
|
|
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 'date'
|
|
14
|
+
require 'time'
|
|
15
|
+
|
|
16
|
+
module PlainRouter::OpenAPI
|
|
17
|
+
class DraftBatchMode
|
|
18
|
+
DUPLICATE_ADSET = "duplicate_adset".freeze
|
|
19
|
+
DUPLICATE_ADSET_PER_MEDIA = "duplicate_adset_per_media".freeze
|
|
20
|
+
ADD_TO_ADSET = "add_to_adset".freeze
|
|
21
|
+
|
|
22
|
+
def self.all_vars
|
|
23
|
+
@all_vars ||= [DUPLICATE_ADSET, DUPLICATE_ADSET_PER_MEDIA, ADD_TO_ADSET].freeze
|
|
24
|
+
end
|
|
25
|
+
|
|
26
|
+
# Builds the enum from string
|
|
27
|
+
# @param [String] The enum value in the form of the string
|
|
28
|
+
# @return [String] The enum value
|
|
29
|
+
def self.build_from_hash(value)
|
|
30
|
+
new.build_from_hash(value)
|
|
31
|
+
end
|
|
32
|
+
|
|
33
|
+
# Builds the enum from string
|
|
34
|
+
# @param [String] The enum value in the form of the string
|
|
35
|
+
# @return [String] The enum value
|
|
36
|
+
def build_from_hash(value)
|
|
37
|
+
return value if DraftBatchMode.all_vars.include?(value)
|
|
38
|
+
raise "Invalid ENUM value #{value} for class #DraftBatchMode"
|
|
39
|
+
end
|
|
40
|
+
end
|
|
41
|
+
end
|