/*
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
*/
import { carrierParcelTemplatesGet } from "../funcs/carrierParcelTemplatesGet.js";
import { carrierParcelTemplatesList } from "../funcs/carrierParcelTemplatesList.js";
import { ClientSDK, RequestOptions } from "../lib/sdks.js";
import * as components from "../models/components/index.js";
import * as operations from "../models/operations/index.js";
import { unwrapAsync } from "../types/fp.js";
export class CarrierParcelTemplates extends ClientSDK {
/**
* List all carrier parcel templates
*
* @remarks
* List all carrier parcel template objects.
Use the following query string params to filter the results as needed.
*
* - `include=all` (the default). Includes templates from all carriers
* - `include=user`. Includes templates only from carriers which the user has added (whether or not they're currently enabled)
* - `include=enabled`. includes templates only for carriers which the user has added and enabled
* - `carrier=*token*`. filter by specific carrier, e.g. fedex, usps
*
*/
async list(
include?: operations.Include | undefined,
carrier?: string | undefined,
options?: RequestOptions,
): Promise {
return unwrapAsync(carrierParcelTemplatesList(
this,
include,
carrier,
options,
));
}
/**
* Retrieve a carrier parcel templates
*
* @remarks
* Fetches the parcel template information for a specific carrier parcel template, identified by the token.
*/
async get(
carrierParcelTemplateToken: string,
options?: RequestOptions,
): Promise {
return unwrapAsync(carrierParcelTemplatesGet(
this,
carrierParcelTemplateToken,
options,
));
}
}