part1
This commit is contained in:
16
API.tax.md
16
API.tax.md
@@ -9,8 +9,7 @@ This document is auto-generated from the JSDoc comments in `src/store` by runnin
|
||||
Creates a new tax rate.
|
||||
|
||||
```js
|
||||
const fn = create(pool);
|
||||
const id = await fn(19);
|
||||
const id = await store.tax.create(19);
|
||||
// => 1
|
||||
```
|
||||
|
||||
@@ -21,8 +20,7 @@ const id = await fn(19);
|
||||
Returns the id of a tax rate, creating it if it does not exist.
|
||||
|
||||
```js
|
||||
const fn = ensure(pool);
|
||||
const id = await fn(19);
|
||||
const id = await store.tax.ensure(19);
|
||||
// => 1
|
||||
```
|
||||
|
||||
@@ -33,9 +31,8 @@ const id = await fn(19);
|
||||
Returns a tax row by its rate.
|
||||
|
||||
```js
|
||||
const fn = getByRate(pool);
|
||||
const tax = await fn(19);
|
||||
// => { id, rate }
|
||||
const tax = await store.tax.getByRate(19);
|
||||
// => { id: 1, rate: 19 }
|
||||
```
|
||||
|
||||
## `tax.list`
|
||||
@@ -45,7 +42,6 @@ const tax = await fn(19);
|
||||
Lists all tax rates.
|
||||
|
||||
```js
|
||||
const fn = list(pool);
|
||||
const taxes = await fn();
|
||||
// => [{ id, rate }]
|
||||
const taxes = await store.tax.list();
|
||||
// => [{ id: 1, rate: 19 }]
|
||||
```
|
||||
|
||||
Reference in New Issue
Block a user