import { APIResource } from "../../../core/resource.js"; import { APIPromise } from "../../../core/api-promise.js"; import { RequestOptions } from "../../../internal/request-options.js"; /** * Named schedules are used for storing custom data that can change over time. Named schedules are often used in custom pricing logic. */ export declare class NamedSchedules extends APIResource { /** * Get a named schedule for the given rate card. This endpoint's availability is * dependent on your client's configuration. * * @example * ```ts * const namedSchedule = * await client.v1.contracts.namedSchedules.retrieve({ * rate_card_id: 'd7abd0cd-4ae9-4db7-8676-e986a4ebd8dc', * schedule_name: 'my-schedule', * covering_date: '2022-02-15T00:00:00Z', * }); * ``` */ retrieve(body: NamedScheduleRetrieveParams, options?: RequestOptions): APIPromise; /** * Update a named schedule for the given rate card. This endpoint's availability is * dependent on your client's configuration. * * @example * ```ts * await client.v1.contracts.namedSchedules.update({ * rate_card_id: 'd7abd0cd-4ae9-4db7-8676-e986a4ebd8dc', * schedule_name: 'my-schedule', * starting_at: '2022-02-01T00:00:00Z', * value: { my_key: 'my_value' }, * ending_before: '2022-02-15T00:00:00Z', * }); * ``` */ update(body: NamedScheduleUpdateParams, options?: RequestOptions): APIPromise; } export interface NamedScheduleRetrieveResponse { data: Array; } export declare namespace NamedScheduleRetrieveResponse { interface Data { starting_at: string; value: unknown; ending_before?: string; } } export interface NamedScheduleRetrieveParams { /** * ID of the rate card whose named schedule is to be retrieved */ rate_card_id: string; /** * The identifier for the schedule to be retrieved */ schedule_name: string; /** * If provided, at most one schedule segment will be returned (the one that covers * this date). If not provided, all segments will be returned. */ covering_date?: string; } export interface NamedScheduleUpdateParams { /** * ID of the rate card whose named schedule is to be updated */ rate_card_id: string; /** * The identifier for the schedule to be updated */ schedule_name: string; starting_at: string; /** * The value to set for the named schedule. The structure of this object is * specific to the named schedule. */ value: unknown; ending_before?: string; } export declare namespace NamedSchedules { export { type NamedScheduleRetrieveResponse as NamedScheduleRetrieveResponse, type NamedScheduleRetrieveParams as NamedScheduleRetrieveParams, type NamedScheduleUpdateParams as NamedScheduleUpdateParams, }; } //# sourceMappingURL=named-schedules.d.ts.map