// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. import { APIResource } from '../../../resource'; import * as Core from '../../../core'; import * as AgreementAPI from './agreement'; export class Agreement extends APIResource { /** * Agreement (GoCardLess) */ create( body: AgreementCreateParams, options?: Core.RequestOptions, ): Core.APIPromise { return this._client.post('/auth/gocardless/agreement', { body, ...options }); } } export interface GocardlessAgreementSchema { data: GocardlessAgreementSchema.Data; } export namespace GocardlessAgreementSchema { export interface Data { id: string; accepted: boolean; access_valid_for_days: number; created: string; institution_id: string; max_historical_days: number; } } export interface AgreementCreateParams { institutionId: string; transactionTotalDays: number; } export namespace Agreement { export import GocardlessAgreementSchema = AgreementAPI.GocardlessAgreementSchema; export import AgreementCreateParams = AgreementAPI.AgreementCreateParams; }