Class: Telnyx::Resources::AI::Missions::Runs::Plan
- Inherits:
-
Object
- Object
- Telnyx::Resources::AI::Missions::Runs::Plan
- Defined in:
- lib/telnyx/resources/ai/missions/runs/plan.rb
Instance Method Summary collapse
-
#add_steps_to_plan(run_id, mission_id:, steps:, request_options: {}) ⇒ Telnyx::Models::AI::Missions::Runs::PlanAddStepsToPlanResponse
Add one or more steps to an existing plan.
-
#create(run_id, mission_id:, steps:, request_options: {}) ⇒ Telnyx::Models::AI::Missions::Runs::PlanCreateResponse
Create the initial plan for a run.
-
#get_step_details(step_id, mission_id:, run_id:, request_options: {}) ⇒ Telnyx::Models::AI::Missions::Runs::PlanGetStepDetailsResponse
Get details of a specific plan step.
-
#initialize(client:) ⇒ Plan
constructor
private
A new instance of Plan.
-
#retrieve(run_id, mission_id:, request_options: {}) ⇒ Telnyx::Models::AI::Missions::Runs::PlanRetrieveResponse
Get the plan (all steps) for a run.
-
#update_step(step_id, mission_id:, run_id:, metadata: nil, status: nil, request_options: {}) ⇒ Telnyx::Models::AI::Missions::Runs::PlanUpdateStepResponse
Update the status of a plan step.
Constructor Details
#initialize(client:) ⇒ Plan
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
Returns a new instance of Plan.
165 166 167 |
# File 'lib/telnyx/resources/ai/missions/runs/plan.rb', line 165 def initialize(client:) @client = client end |
Instance Method Details
#add_steps_to_plan(run_id, mission_id:, steps:, request_options: {}) ⇒ Telnyx::Models::AI::Missions::Runs::PlanAddStepsToPlanResponse
Add one or more steps to an existing plan
79 80 81 82 83 84 85 86 87 88 89 90 91 92 |
# File 'lib/telnyx/resources/ai/missions/runs/plan.rb', line 79 def add_steps_to_plan(run_id, params) parsed, = Telnyx::AI::Missions::Runs::PlanAddStepsToPlanParams.dump_request(params) mission_id = parsed.delete(:mission_id) do raise ArgumentError.new("missing required path argument #{_1}") end @client.request( method: :post, path: ["ai/missions/%1$s/runs/%2$s/plan/steps", mission_id, run_id], body: parsed, model: Telnyx::Models::AI::Missions::Runs::PlanAddStepsToPlanResponse, options: ) end |
#create(run_id, mission_id:, steps:, request_options: {}) ⇒ Telnyx::Models::AI::Missions::Runs::PlanCreateResponse
Create the initial plan for a run
24 25 26 27 28 29 30 31 32 33 34 35 36 37 |
# File 'lib/telnyx/resources/ai/missions/runs/plan.rb', line 24 def create(run_id, params) parsed, = Telnyx::AI::Missions::Runs::PlanCreateParams.dump_request(params) mission_id = parsed.delete(:mission_id) do raise ArgumentError.new("missing required path argument #{_1}") end @client.request( method: :post, path: ["ai/missions/%1$s/runs/%2$s/plan", mission_id, run_id], body: parsed, model: Telnyx::Models::AI::Missions::Runs::PlanCreateResponse, options: ) end |
#get_step_details(step_id, mission_id:, run_id:, request_options: {}) ⇒ Telnyx::Models::AI::Missions::Runs::PlanGetStepDetailsResponse
Get details of a specific plan step
106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 |
# File 'lib/telnyx/resources/ai/missions/runs/plan.rb', line 106 def get_step_details(step_id, params) parsed, = Telnyx::AI::Missions::Runs::PlanGetStepDetailsParams.dump_request(params) mission_id = parsed.delete(:mission_id) do raise ArgumentError.new("missing required path argument #{_1}") end run_id = parsed.delete(:run_id) do raise ArgumentError.new("missing required path argument #{_1}") end @client.request( method: :get, path: ["ai/missions/%1$s/runs/%2$s/plan/steps/%3$s", mission_id, run_id, step_id], model: Telnyx::Models::AI::Missions::Runs::PlanGetStepDetailsResponse, options: ) end |
#retrieve(run_id, mission_id:, request_options: {}) ⇒ Telnyx::Models::AI::Missions::Runs::PlanRetrieveResponse
Get the plan (all steps) for a run
50 51 52 53 54 55 56 57 58 59 60 61 62 |
# File 'lib/telnyx/resources/ai/missions/runs/plan.rb', line 50 def retrieve(run_id, params) parsed, = Telnyx::AI::Missions::Runs::PlanRetrieveParams.dump_request(params) mission_id = parsed.delete(:mission_id) do raise ArgumentError.new("missing required path argument #{_1}") end @client.request( method: :get, path: ["ai/missions/%1$s/runs/%2$s/plan", mission_id, run_id], model: Telnyx::Models::AI::Missions::Runs::PlanRetrieveResponse, options: ) end |
#update_step(step_id, mission_id:, run_id:, metadata: nil, status: nil, request_options: {}) ⇒ Telnyx::Models::AI::Missions::Runs::PlanUpdateStepResponse
Update the status of a plan step
143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 |
# File 'lib/telnyx/resources/ai/missions/runs/plan.rb', line 143 def update_step(step_id, params) parsed, = Telnyx::AI::Missions::Runs::PlanUpdateStepParams.dump_request(params) mission_id = parsed.delete(:mission_id) do raise ArgumentError.new("missing required path argument #{_1}") end run_id = parsed.delete(:run_id) do raise ArgumentError.new("missing required path argument #{_1}") end @client.request( method: :patch, path: ["ai/missions/%1$s/runs/%2$s/plan/steps/%3$s", mission_id, run_id, step_id], body: parsed, model: Telnyx::Models::AI::Missions::Runs::PlanUpdateStepResponse, options: ) end |