chore(js-sdk, types): update TSDocs related to tax provider changes (#12428)

This commit is contained in:
Shahed Nasser
2025-05-09 14:34:45 +03:00
committed by GitHub
parent 6032f3ec40
commit 0f802a977a
4 changed files with 81 additions and 3 deletions
@@ -20,6 +20,8 @@ export class TaxProvider {
* This method retrieves a list of tax providers. It sends a request to the
* [List Tax Providers](https://docs.medusajs.com/api/admin#tax-providers_gettaxproviders)
* API route.
*
* @version 2.8.0
*
* @param query - Filters and pagination configurations.
* @param headers - Headers to pass in the request.
@@ -34,6 +36,34 @@ export class TaxProvider {
* console.log(tax_providers)
* })
* ```
*
* To configure the pagination, pass the `limit` and `offset` query parameters.
*
* For example, to retrieve only 10 items and skip 10 items:
*
* ```ts
* sdk.admin.taxProvider.list({
* limit: 10,
* offset: 10,
* })
* .then(({ tax_providers, count, limit, offset }) => {
* console.log(tax_providers)
* })
* ```
*
* Using the `fields` query parameter, you can specify the fields and relations to retrieve
* in each products:
*
* ```ts
* sdk.admin.taxProvider.list({
* fields: "id,*regions"
* })
* .then(({ tax_providers, count, limit, offset }) => {
* console.log(tax_providers)
* })
* ```
*
* Learn more about the `fields` property in the [API reference](https://docs.medusajs.com/api/store#select-fields-and-relations).
*/
async list(
query?: HttpTypes.AdminGetTaxProvidersParams,
@@ -66,6 +66,8 @@ export class TaxRegion {
* This method updates a tax region. It sends a request to the
* [Update Tax Region](https://docs.medusajs.com/api/admin#tax-regions_posttaxregionsid)
* API route.
*
* @version 2.8.0
*
* @param id - The ID of the tax region to update.
* @param body - The details of the tax region to update.