Class: Peddler::APIs::ActionPlans20260601

Inherits:
Peddler::API show all
Defined in:
lib/peddler/apis/action_plans_2026_06_01.rb,
lib/peddler/apis/action_plans_2026_06_01/error.rb,
lib/peddler/apis/action_plans_2026_06_01/plan_step.rb,
lib/peddler/apis/action_plans_2026_06_01/error_list.rb,
lib/peddler/apis/action_plans_2026_06_01/pagination.rb,
lib/peddler/apis/action_plans_2026_06_01/action_item.rb,
lib/peddler/apis/action_plans_2026_06_01/action_plan.rb,
lib/peddler/apis/action_plans_2026_06_01/input_value.rb,
lib/peddler/apis/action_plans_2026_06_01/plan_statuses.rb,
lib/peddler/apis/action_plans_2026_06_01/step_statuses.rb,
lib/peddler/apis/action_plans_2026_06_01/localized_text.rb,
lib/peddler/apis/action_plans_2026_06_01/plan_references.rb,
lib/peddler/apis/action_plans_2026_06_01/action_item_type.rb,
lib/peddler/apis/action_plans_2026_06_01/action_plan_type.rb,
lib/peddler/apis/action_plans_2026_06_01/input_declaration.rb,
lib/peddler/apis/action_plans_2026_06_01/plan_definition_ref.rb,
lib/peddler/apis/action_plans_2026_06_01/step_definition_ref.rb,
lib/peddler/apis/action_plans_2026_06_01/action_item_reference.rb,
lib/peddler/apis/action_plans_2026_06_01/action_item_references.rb,
lib/peddler/apis/action_plans_2026_06_01/search_refinement_value.rb,
lib/peddler/apis/action_plans_2026_06_01/get_action_plan_response.rb,
lib/peddler/apis/action_plans_2026_06_01/search_refinement_values.rb,
lib/peddler/apis/action_plans_2026_06_01/resolution_definition_ref.rb,
lib/peddler/apis/action_plans_2026_06_01/action_item_resolution_ref.rb,
lib/peddler/apis/action_plans_2026_06_01/action_item_step_reference.rb,
lib/peddler/apis/action_plans_2026_06_01/create_action_plan_request.rb,
lib/peddler/apis/action_plans_2026_06_01/list_action_plans_response.rb,
lib/peddler/apis/action_plans_2026_06_01/action_item_type_definition.rb,
lib/peddler/apis/action_plans_2026_06_01/action_item_resolution_reference.rb,
lib/peddler/apis/action_plans_2026_06_01/action_item_type_classifications.rb,
sig/peddler/apis/action_plans_2026_06_01.rbs

Overview

The Selling Partner API for Action Plans

The Action Plans API allows you to create, configure, and execute action plans from pre-defined templates or custom-built workflows.

Defined Under Namespace

Classes: ActionItem, ActionItemReference, ActionItemReferences, ActionItemResolutionRef, ActionItemResolutionReference, ActionItemStepReference, ActionItemType, ActionItemTypeClassifications, ActionItemTypeDefinition, ActionPlan, ActionPlanType, CreateActionPlanRequest, Error, ErrorList, GetActionPlanResponse, InputDeclaration, InputValue, ListActionPlansResponse, LocalizedText, Pagination, PlanDefinitionRef, PlanReferences, PlanStatuses, PlanStep, ResolutionDefinitionRef, SearchRefinementValue, SearchRefinementValues, StepDefinitionRef, StepStatuses

Constant Summary

Constants inherited from Peddler::API

Peddler::API::TRANSIENT_STATUSES

Instance Attribute Summary

Attributes inherited from Peddler::API

#access_token, #base_url, #endpoint, #retries

Instance Method Summary collapse

Methods inherited from Peddler::API

#cannot_sandbox!, #delete, #endpoint_uri, #get, #host_header, #http, #initialize, #must_sandbox!, #parse_base_url, #patch, #percent_encode, #post, #put, #request, #sandbox, #sandbox?, #stringify_array, #timestamp, #user_agent

Constructor Details

This class inherits a constructor from Peddler::API

Instance Method Details

#create_action_plan(body, mode: nil, locale: nil) ⇒ Peddler::Response

Note:

This operation can make a static sandbox call.

Creates an action plan from a template. Use mode=PREVIEW to return the plan without creating or executing it. Omit mode to create the plan and submit it for execution.

Parameters:

  • body (Hash) —

    The request for action plan creation.

  • mode (String) (defaults to: nil) —

    The mode of operation. Set PREVIEW to return the plan without creating or executing it. Omit mode to create the plan and submit it for execution.

  • locale (String) (defaults to: nil) —

    The locale for localized content, as an ISO 639 language code and ISO 3166 country code separated by a hyphen. Defaults to en-US.

  • (Hash[untyped, untyped])
  • mode: (String, nil) (defaults to: nil)
  • locale: (String, nil) (defaults to: nil)

Returns:



44
45
46
47
48
49
50
51
52
# File 'lib/peddler/apis/action_plans_2026_06_01.rb', line 44

def create_action_plan(body, mode: nil, locale: nil)
  path = "/actionPlans/2026-06-01/plans"
  params = {
    "mode" => mode,
    "locale" => locale,
  }.compact
  parser = -> { GetActionPlanResponse }
  post(path, body:, params:, parser:)
end

#get_action_plan(action_plan_id, locale: nil, included_data: nil) ⇒ Peddler::Response

Note:

This operation can make a static sandbox call.

Returns an action plan by ID. Use includedData=steps to include the plan's steps with their resolved input and output values.

Parameters:

  • action_plan_id (String) —

    The unique identifier of the action plan (UUID).

  • locale (String) (defaults to: nil) —

    The locale for localized content, as an ISO 639 language code and ISO 3166 country code separated by a hyphen. Defaults to en-US.

  • included_data (Array<String>) (defaults to: nil) —

    Additional data to include in the response. Include steps to include the plan's steps with their resolved input and output values.

  • (String)
  • locale: (String, nil) (defaults to: nil)
  • included_data: (Array[String], nil) (defaults to: nil)

Returns:



24
25
26
27
28
29
30
31
32
# File 'lib/peddler/apis/action_plans_2026_06_01.rb', line 24

def get_action_plan(action_plan_id, locale: nil, included_data: nil)
  path = "/actionPlans/2026-06-01/plans/#{percent_encode(action_plan_id)}"
  params = {
    "locale" => locale,
    "includedData" => stringify_array(included_data),
  }.compact
  parser = -> { GetActionPlanResponse }
  get(path, params:, parser:)
end

#list_action_plans(statuses: nil, plan_template_ids: nil, action_item_ids: nil, created_after: nil, created_before: nil, page_size: 10, page_token: nil, locale: nil, included_data: nil) ⇒ Peddler::Response

Note:

This operation can make a static sandbox call.

Returns a paginated list of the seller's action plans, sorted newest first by createdDate. Multiple filters are combined with a logical AND. Multiple values in a single filter are combined with a logical OR.

Parameters:

  • statuses (Array<String>) (defaults to: nil) —

    Filters by plan status. Known values: DRAFT, PENDING_SELLING_PARTNER, PROCESSING, DONE, CANCELLED, PARTIAL.

  • plan_template_ids (Array<String>) (defaults to: nil) —

    Filters by plan template IDs. Multiple values allowed.

  • action_item_ids (Array<String>) (defaults to: nil) —

    Filters by associated action item IDs. Multiple values allowed.

  • created_after (String) (defaults to: nil) —

    Plans created at or after this timestamp. Timestamp is in ISO 8601 format.

  • created_before (String) (defaults to: nil) —

    Plans created at or before this timestamp. Timestamp is in ISO 8601 format.

  • page_size (Integer) (defaults to: 10) —

    Maximum number of results per page.

  • page_token (String) (defaults to: nil) —

    A token to retrieve a specific page of results. Pass the nextToken value from a previous response. Note: The previousToken value is not yet supported.

  • locale (String) (defaults to: nil) —

    The locale for localized content, as an ISO 639 language code and ISO 3166 country code separated by a hyphen. Defaults to en-US.

  • included_data (Array<String>) (defaults to: nil) —

    Additional data to return in the response. Specify steps to return each plan's steps with their resolved input and output values. Known values: steps, refinements.

  • statuses: (Array[String], nil) (defaults to: nil)
  • plan_template_ids: (Array[String], nil) (defaults to: nil)
  • action_item_ids: (Array[String], nil) (defaults to: nil)
  • created_after: (String, nil) (defaults to: nil)
  • created_before: (String, nil) (defaults to: nil)
  • page_size: (Integer, nil) (defaults to: 10)
  • page_token: (String, nil) (defaults to: nil)
  • locale: (String, nil) (defaults to: nil)
  • included_data: (Array[String], nil) (defaults to: nil)

Returns:



72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
# File 'lib/peddler/apis/action_plans_2026_06_01.rb', line 72

def list_action_plans(statuses: nil, plan_template_ids: nil, action_item_ids: nil, created_after: nil,
  created_before: nil, page_size: 10, page_token: nil, locale: nil, included_data: nil)
  path = "/actionPlans/2026-06-01/plans"
  params = {
    "statuses" => stringify_array(statuses),
    "planTemplateIds" => stringify_array(plan_template_ids),
    "actionItemIds" => stringify_array(action_item_ids),
    "createdAfter" => created_after,
    "createdBefore" => created_before,
    "pageSize" => page_size,
    "pageToken" => page_token,
    "locale" => locale,
    "includedData" => stringify_array(included_data),
  }.compact
  parser = -> { ListActionPlansResponse }
  get(path, params:, parser:)
end