timber-node 0.0.3 → 0.0.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/invoice.d.ts +13 -0
- package/dist/invoice.js +15 -0
- package/package.json +1 -1
package/dist/invoice.d.ts
CHANGED
|
@@ -87,6 +87,19 @@ export declare class InvoiceService {
|
|
|
87
87
|
* ```
|
|
88
88
|
*/
|
|
89
89
|
list(params?: InvoiceQueryParams): Promise<AxiosResponse<Invoice[]>>;
|
|
90
|
+
/**
|
|
91
|
+
* Fetch an invoice by ID.
|
|
92
|
+
*
|
|
93
|
+
* @param id - The ID of the invoice to fetch.
|
|
94
|
+
* @returns The invoice matching the ID.
|
|
95
|
+
*
|
|
96
|
+
* @example
|
|
97
|
+
* ```ts
|
|
98
|
+
* const invoice = await client.invoice.get('invoice_id_here');
|
|
99
|
+
* console.log(invoice.data);
|
|
100
|
+
* ```
|
|
101
|
+
*/
|
|
102
|
+
get(id: string): Promise<AxiosResponse<Invoice>>;
|
|
90
103
|
create(data: InvoiceData): Promise<AxiosResponse<Invoice>>;
|
|
91
104
|
update(id: string, data: Partial<InvoiceData>): Promise<AxiosResponse<Invoice>>;
|
|
92
105
|
/**
|
package/dist/invoice.js
CHANGED
|
@@ -35,6 +35,21 @@ class InvoiceService {
|
|
|
35
35
|
async list(params = {}) {
|
|
36
36
|
return await this.http.get('/customer/invoice', { params });
|
|
37
37
|
}
|
|
38
|
+
/**
|
|
39
|
+
* Fetch an invoice by ID.
|
|
40
|
+
*
|
|
41
|
+
* @param id - The ID of the invoice to fetch.
|
|
42
|
+
* @returns The invoice matching the ID.
|
|
43
|
+
*
|
|
44
|
+
* @example
|
|
45
|
+
* ```ts
|
|
46
|
+
* const invoice = await client.invoice.get('invoice_id_here');
|
|
47
|
+
* console.log(invoice.data);
|
|
48
|
+
* ```
|
|
49
|
+
*/
|
|
50
|
+
async get(id) {
|
|
51
|
+
return await this.http.get(`/customer/invoice/${id}`);
|
|
52
|
+
}
|
|
38
53
|
async create(data) {
|
|
39
54
|
const formData = new form_data_1.default();
|
|
40
55
|
for (const key in data) {
|