Commit 69fa0ea7 by G

feat: api and types for the payment feature

parent 9f4890e5
import { axiosInstance } from "@/axios";
import type { DjangoPaginated, PaymentType } from "./types";
export const getPaymentTypes = () => {
return axiosInstance.get<DjangoPaginated<Record<string, PaymentType>>>("/operateur/");
};
export type PaymentTypeCode = "OM" | "FLOOZ" | "MTN" | "WAVE" | "CB";
export interface PaymentType {
reference: number;
nom: string;
description: string;
code: PaymentTypeCode;
etat: boolean;
type_operateur: string;
}
export interface DjangoPaginated<T> {
count: number;
next: string | null;
previous: string | null;
results: T;
}
export interface Merchant {
marchand_id: string;
nom: string;
code: string;
adresse: string;
url_succes: string;
url_echec: string;
entreprise: number;
user: number;
}
export interface IuserInformations {
username: string;
email: string;
first_name: string;
last_name: string;
marchand: Merchant;
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment