/* * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ import { schedulingCancel } from "../funcs/schedulingCancel.js"; import { schedulingCreate } from "../funcs/schedulingCreate.js"; import { schedulingGet } from "../funcs/schedulingGet.js"; import { schedulingGetOccurrance } from "../funcs/schedulingGetOccurrance.js"; import { schedulingList } from "../funcs/schedulingList.js"; import { schedulingUpdate } from "../funcs/schedulingUpdate.js"; import { ClientSDK, RequestOptions } from "../lib/sdks.js"; import * as operations from "../models/operations/index.js"; import { unwrapAsync } from "../types/fp.js"; export class Scheduling extends ClientSDK { /** * Describes the schedule to create or modify. * * To access this endpoint using an [access token](https://docs.moov.io/api/authentication/access-tokens/) * you'll need to specify the `/accounts/{accountID}/transfers.write` scope. */ async create( request: operations.CreateScheduleRequest, options?: RequestOptions, ): Promise { return unwrapAsync(schedulingCreate( this, request, options, )); } /** * Describes a list of schedules associated with an account. Append the `hydrate=accounts` query parameter to include partial account details in the response. * * To access this endpoint using an [access token](https://docs.moov.io/api/authentication/access-tokens/) * you'll need to specify the `/accounts/{accountID}/transfers.read` scope. */ async list( request: operations.ListSchedulesRequest, options?: RequestOptions, ): Promise { return unwrapAsync(schedulingList( this, request, options, )); } /** * Describes the schedule to modify. * * To access this endpoint using an [access token](https://docs.moov.io/api/authentication/access-tokens/) * you'll need to specify the `/accounts/{accountID}/transfers.write` scope. */ async update( request: operations.UpdateScheduleRequest, options?: RequestOptions, ): Promise { return unwrapAsync(schedulingUpdate( this, request, options, )); } /** * Describes a schedule associated with an account. Requires at least 1 occurrence or recurTransfer to be specified. * * To access this endpoint using an [access token](https://docs.moov.io/api/authentication/access-tokens/) * you'll need to specify the `/accounts/{accountID}/transfers.read` scope. */ async get( request: operations.GetSchedulesRequest, options?: RequestOptions, ): Promise { return unwrapAsync(schedulingGet( this, request, options, )); } /** * Describes the schedule to cancel. * * To access this endpoint using an [access token](https://docs.moov.io/api/authentication/access-tokens/) * you'll need to specify the `/accounts/{accountID}/transfers.write` scope. */ async cancel( request: operations.CancelScheduleRequest, options?: RequestOptions, ): Promise { return unwrapAsync(schedulingCancel( this, request, options, )); } /** * Gets a specific occurrence. * * To access this endpoint using an [access token](https://docs.moov.io/api/authentication/access-tokens/) * you'll need to specify the `/accounts/{accountID}/transfers.read` scope. */ async getOccurrance( request: operations.GetScheduledOccurrenceRequest, options?: RequestOptions, ): Promise { return unwrapAsync(schedulingGetOccurrance( this, request, options, )); } }