import axiosInstance from "../axios";

export interface TransactionsResponse {
    data: TransactionsData[] | []
}

export interface TransactionsData {
    _id: string,
    card: TransactionsCard
    userId: string,
    amount: number,
    dollarAmount: number,
    status: number,
    created_at: string,
    updated_at: string,
    __v: number,
    id: string
}

export interface TransactionsCard {
    _id: string,
    holderName: string,
    PAN: number,
    IBAN: string,
    created_at: string,
    updated_at: string,
    id: string
}

export const getTransactionsList = () => axiosInstance.get<TransactionsResponse>("/gps/transactions")