PlanService

public struct PlanService

Provides access to plan operations

  • Returns plans list with summary information.

    Declaration

    Swift

    public func plans(includeAccounts: Bool) async throws -> [PlanSummary]

    Parameters

    includeAccounts

    Includes plan accounts in the response

    Return Value

    A list of plans

  • Returns a single plan with all related entities.

    This is effectively a full plan export. Depending on the size of your plan, this request can take a while.

    Declaration

    Swift

    public func plan(
        planId: String,
        lastKnowledgeOfServer: Int? = nil
    ) async throws -> (PlanDetail, ServerKnowledge)

    Parameters

    planId

    The id of the plan (last_used can also be used to specify the last used plan)

    lastKnowledgeOfServer

    The starting server knowledge. If provided, only entities that have changed since lastKnowledgeOfServer will be included.

    Return Value

    A single plan and the last knowledge of the server

  • planSettings(planId:) Asynchronous

    Returns settings for a plan.

    Declaration

    Swift

    public func planSettings(planId: String) async throws -> PlanSettings

    Parameters

    planId

    The id of the plan (last_used can also be used to specify the last used plan)

    Return Value

    Settings for a specific plan