Xem danh sách hóa đơn
Để lấy thông tin danh sách hóa đơn, sử dụng hàm apiInstance.getInvoices
import { GetInvoicesRequest } from "@invoice-sdk/api"
const getInvoicesRequest: GetInvoicesRequest
const { status, data } = await apiInstance.getInvoices(getInvoicesRequest);
Để phương thức apiInstance.getInvoices hoạt động, cần cung cấp một tham số:
getInvoicesRequest: GetInvoicesRequest- thông tin để lọc danh sách hóa đơn.
Sau khi phương thức được thực thi, SDK sẽ trả về token xác thực GetInvoicesSuccess hoặc thông báo lỗi GetInvoicesError.
Định dạng các kiểu dữ liệu
Các kiểu dữ liệu được sử dụng trong phương thức apiInstance.getInvoices.
- M-Invoice
- FPT
import { GetInvoicesRequest, GetInvoicesSuccess, GetInvoicesError } from '@invoice-sdk/api'
import { fptGetInvoicesRequest, GetInvoicesSuccess, GetInvoicesError } from '@invoice-sdk/api'
mẹo
Đọc thêm về cách sử dụng kiểu dữ liệu trong SDK Invoice