// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. import { APIResource } from '../resource'; import * as Core from '../core'; import * as InstitutionsAPI from './institutions'; export class Institutions extends APIResource { /** * Get Institutions */ list(query: InstitutionListParams, options?: Core.RequestOptions): Core.APIPromise { return this._client.get('/institutions', { query, ...options }); } /** * Update Institution Usage */ usage(id: string, options?: Core.RequestOptions): Core.APIPromise { return this._client.put(`/institutions/${id}/usage`, options); } } export interface InstitutionsSchema { data: Array; } export namespace InstitutionsSchema { export interface Data { id: string; logo: string | null; name: string; provider: 'teller' | 'plaid' | 'gocardless'; available_history?: number | null; } } export interface UpdateUsageSchema { data: UpdateUsageSchema.Data; } export namespace UpdateUsageSchema { export interface Data { id: string; logo: string | null; name: string; provider: 'teller' | 'plaid' | 'gocardless'; available_history?: number | null; } } export interface InstitutionListParams { /** * Country code */ countryCode: | 'AT' | 'BE' | 'BG' | 'HR' | 'CY' | 'CZ' | 'DK' | 'EE' | 'FI' | 'FR' | 'DE' | 'GR' | 'HU' | 'IS' | 'IE' | 'IT' | 'LV' | 'LI' | 'LT' | 'LU' | 'MT' | 'NL' | 'NO' | 'PL' | 'PT' | 'RO' | 'SK' | 'SI' | 'ES' | 'SE' | 'GB' | 'US' | 'CA'; /** * Limit results */ limit?: string; /** * Search query */ q?: string; } export namespace Institutions { export import InstitutionsSchema = InstitutionsAPI.InstitutionsSchema; export import UpdateUsageSchema = InstitutionsAPI.UpdateUsageSchema; export import InstitutionListParams = InstitutionsAPI.InstitutionListParams; }