import { APIResource } from "../../../../core/resource.js"; import * as Shared from "../../../shared.js"; import { APIPromise } from "../../../../core/api-promise.js"; import { RequestOptions } from "../../../../internal/request-options.js"; /** * Rate cards are used to define default pricing for products. */ export declare class ProductOrders extends APIResource { /** * The ordering of products on a rate card determines the order in which the * products will appear on customers' invoices. Use this endpoint to set the order * of specific products on the rate card by moving them relative to their current * location. * * @example * ```ts * const productOrder = * await client.v1.contracts.rateCards.productOrders.update({ * product_moves: [ * { * product_id: '13117714-3f05-48e5-a6e9-a66093f13b4d', * position: 0, * }, * { * product_id: 'b086f2f4-9851-4466-9ca0-30d53e6a42ac', * position: 1, * }, * ], * rate_card_id: 'd7abd0cd-4ae9-4db7-8676-e986a4ebd8dc', * }); * ``` */ update(body: ProductOrderUpdateParams, options?: RequestOptions): APIPromise; /** * The ordering of products on a rate card determines the order in which the * products will appear on customers' invoices. Use this endpoint to set the order * of products on the rate card. * * @example * ```ts * const response = * await client.v1.contracts.rateCards.productOrders.set({ * product_order: [ * '13117714-3f05-48e5-a6e9-a66093f13b4d', * 'b086f2f4-9851-4466-9ca0-30d53e6a42ac', * ], * rate_card_id: 'd7abd0cd-4ae9-4db7-8676-e986a4ebd8dc', * }); * ``` */ set(body: ProductOrderSetParams, options?: RequestOptions): APIPromise; } export interface ProductOrderUpdateResponse { data: Shared.ID; } export interface ProductOrderSetResponse { data: Shared.ID; } export interface ProductOrderUpdateParams { product_moves: Array; /** * ID of the rate card to update */ rate_card_id: string; } export declare namespace ProductOrderUpdateParams { interface ProductMove { /** * 0-based index of the new position of the product */ position: number; /** * ID of the product to move */ product_id: string; } } export interface ProductOrderSetParams { product_order: Array; /** * ID of the rate card to update */ rate_card_id: string; } export declare namespace ProductOrders { export { type ProductOrderUpdateResponse as ProductOrderUpdateResponse, type ProductOrderSetResponse as ProductOrderSetResponse, type ProductOrderUpdateParams as ProductOrderUpdateParams, type ProductOrderSetParams as ProductOrderSetParams, }; } //# sourceMappingURL=product-orders.d.ts.map