Chuyển tới nội dung chính

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.

import { GetInvoicesRequest, GetInvoicesSuccess, GetInvoicesError } from '@invoice-sdk/api'