flexbase-client
Version:
Flexbase api client
44 lines (43 loc) • 1.55 kB
TypeScript
import { Card, CardHiddenInfo, Group, EmbedUrlHiddenInfo } from '../models/Card/Card.js';
import { Address } from '../models/Address/Address.js';
import { FlexbaseClientBase } from './FlexbaseClient.Base.js';
import { FlexbaseResponse } from '../models/FlexbaseResponse.js';
import { Limits } from '../models/Banking/Cards.js';
interface QueryParameters {
searchTerm?: string;
status?: string;
full?: boolean;
}
interface CardsResponse extends FlexbaseResponse {
cards: Card[];
}
interface CardResponse extends FlexbaseResponse {
card: Card | null;
}
interface UpdateCardForm {
expensesTypes: {
amount: number | null;
groups: Group[];
interval: string | null;
};
notifyUse: boolean;
shipTo?: Address;
creditLimit: number | null;
cardName?: string;
}
interface CardForm {
cardType: string;
shipTo?: Address;
service?: string;
limits?: Limits;
}
export declare class FlexbaseClientCard extends FlexbaseClientBase {
private params;
getCardsByCompany({ searchTerm, status, full }?: QueryParameters): Promise<CardsResponse>;
getCard(cardId: string, full?: boolean): Promise<CardResponse>;
issueCard(userId: string, form: CardForm): Promise<CardResponse>;
updateCard(cardId: string, formData: UpdateCardForm): Promise<CardResponse>;
updateCardStatus(cardId: string, status: 'active' | 'suspended' | 'terminated', last4?: string): Promise<CardResponse>;
getCardHiddenInfo(cardId: string): Promise<CardHiddenInfo | EmbedUrlHiddenInfo>;
}
export {};