chore: fixed commit branch on generate reference action (#1857)
* fixed commit branch * fixes after yarn upgrade
This commit is contained in:
@@ -1,7 +1,5 @@
|
||||
# Class: PricingService
|
||||
|
||||
Allows retrieval of prices.
|
||||
|
||||
## Hierarchy
|
||||
|
||||
- `TransactionBaseService`<[`PricingService`](PricingService.md)\>
|
||||
@@ -26,7 +24,7 @@ TransactionBaseService<PricingService\>.constructor
|
||||
|
||||
#### Defined in
|
||||
|
||||
[services/pricing.ts:40](https://github.com/medusajs/medusa/blob/ae5c88b89/packages/medusa/src/services/pricing.ts#L40)
|
||||
[services/pricing.ts:40](https://github.com/medusajs/medusa/blob/32b066d92/packages/medusa/src/services/pricing.ts#L40)
|
||||
|
||||
## Properties
|
||||
|
||||
@@ -60,7 +58,7 @@ TransactionBaseService.manager\_
|
||||
|
||||
#### Defined in
|
||||
|
||||
[services/pricing.ts:33](https://github.com/medusajs/medusa/blob/ae5c88b89/packages/medusa/src/services/pricing.ts#L33)
|
||||
[services/pricing.ts:33](https://github.com/medusajs/medusa/blob/32b066d92/packages/medusa/src/services/pricing.ts#L33)
|
||||
|
||||
___
|
||||
|
||||
@@ -70,7 +68,7 @@ ___
|
||||
|
||||
#### Defined in
|
||||
|
||||
[services/pricing.ts:37](https://github.com/medusajs/medusa/blob/ae5c88b89/packages/medusa/src/services/pricing.ts#L37)
|
||||
[services/pricing.ts:37](https://github.com/medusajs/medusa/blob/32b066d92/packages/medusa/src/services/pricing.ts#L37)
|
||||
|
||||
___
|
||||
|
||||
@@ -80,7 +78,7 @@ ___
|
||||
|
||||
#### Defined in
|
||||
|
||||
[services/pricing.ts:38](https://github.com/medusajs/medusa/blob/ae5c88b89/packages/medusa/src/services/pricing.ts#L38)
|
||||
[services/pricing.ts:38](https://github.com/medusajs/medusa/blob/32b066d92/packages/medusa/src/services/pricing.ts#L38)
|
||||
|
||||
___
|
||||
|
||||
@@ -90,7 +88,7 @@ ___
|
||||
|
||||
#### Defined in
|
||||
|
||||
[services/pricing.ts:35](https://github.com/medusajs/medusa/blob/ae5c88b89/packages/medusa/src/services/pricing.ts#L35)
|
||||
[services/pricing.ts:35](https://github.com/medusajs/medusa/blob/32b066d92/packages/medusa/src/services/pricing.ts#L35)
|
||||
|
||||
___
|
||||
|
||||
@@ -100,7 +98,7 @@ ___
|
||||
|
||||
#### Defined in
|
||||
|
||||
[services/pricing.ts:36](https://github.com/medusajs/medusa/blob/ae5c88b89/packages/medusa/src/services/pricing.ts#L36)
|
||||
[services/pricing.ts:36](https://github.com/medusajs/medusa/blob/32b066d92/packages/medusa/src/services/pricing.ts#L36)
|
||||
|
||||
___
|
||||
|
||||
@@ -114,7 +112,7 @@ TransactionBaseService.transactionManager\_
|
||||
|
||||
#### Defined in
|
||||
|
||||
[services/pricing.ts:34](https://github.com/medusajs/medusa/blob/ae5c88b89/packages/medusa/src/services/pricing.ts#L34)
|
||||
[services/pricing.ts:34](https://github.com/medusajs/medusa/blob/32b066d92/packages/medusa/src/services/pricing.ts#L34)
|
||||
|
||||
## Methods
|
||||
|
||||
@@ -122,10 +120,6 @@ TransactionBaseService.transactionManager\_
|
||||
|
||||
▸ `Protected` **atomicPhase_**<`TResult`, `TError`\>(`work`, `isolationOrErrorHandler?`, `maybeErrorHandlerOrDontFail?`): `Promise`<`TResult`\>
|
||||
|
||||
Wraps some work within a transactional block. If the service already has
|
||||
a transaction manager attached this will be reused, otherwise a new
|
||||
transaction manager is created.
|
||||
|
||||
#### Type parameters
|
||||
|
||||
| Name |
|
||||
@@ -137,23 +131,21 @@ transaction manager is created.
|
||||
|
||||
| Name | Type | Description |
|
||||
| :------ | :------ | :------ |
|
||||
| `work` | (`transactionManager`: `EntityManager`) => `Promise`<`TResult`\> | the transactional work to be done |
|
||||
| `isolationOrErrorHandler?` | `IsolationLevel` \| (`error`: `TError`) => `Promise`<`void` \| `TResult`\> | the isolation level to be used for the work. |
|
||||
| `maybeErrorHandlerOrDontFail?` | (`error`: `TError`) => `Promise`<`void` \| `TResult`\> | Potential error handler |
|
||||
| `work` | (`transactionManager`: `EntityManager`) => `Promise`<`TResult`\> | |
|
||||
| `isolationOrErrorHandler?` | `IsolationLevel` \| (`error`: `TError`) => `Promise`<`void` \| `TResult`\> | |
|
||||
| `maybeErrorHandlerOrDontFail?` | (`error`: `TError`) => `Promise`<`void` \| `TResult`\> | |
|
||||
|
||||
#### Returns
|
||||
|
||||
`Promise`<`TResult`\>
|
||||
|
||||
the result of the transactional work
|
||||
|
||||
#### Inherited from
|
||||
|
||||
TransactionBaseService.atomicPhase\_
|
||||
|
||||
#### Defined in
|
||||
|
||||
[interfaces/transaction-base-service.ts:53](https://github.com/medusajs/medusa/blob/ae5c88b89/packages/medusa/src/interfaces/transaction-base-service.ts#L53)
|
||||
[interfaces/transaction-base-service.ts:53](https://github.com/medusajs/medusa/blob/32b066d92/packages/medusa/src/interfaces/transaction-base-service.ts#L53)
|
||||
|
||||
___
|
||||
|
||||
@@ -161,24 +153,20 @@ ___
|
||||
|
||||
▸ **calculateTaxes**(`variantPricing`, `productRates`): `Promise`<`TaxedPricing`\>
|
||||
|
||||
Gets the prices for a product variant
|
||||
|
||||
#### Parameters
|
||||
|
||||
| Name | Type | Description |
|
||||
| :------ | :------ | :------ |
|
||||
| `variantPricing` | `ProductVariantPricing` | the prices retrieved from a variant |
|
||||
| `productRates` | `TaxServiceRate`[] | the tax rates that the product has applied |
|
||||
| `variantPricing` | `ProductVariantPricing` | |
|
||||
| `productRates` | `TaxServiceRate`[] | |
|
||||
|
||||
#### Returns
|
||||
|
||||
`Promise`<`TaxedPricing`\>
|
||||
|
||||
The tax related variant prices.
|
||||
|
||||
#### Defined in
|
||||
|
||||
[services/pricing.ts:102](https://github.com/medusajs/medusa/blob/ae5c88b89/packages/medusa/src/services/pricing.ts#L102)
|
||||
[services/pricing.ts:102](https://github.com/medusajs/medusa/blob/32b066d92/packages/medusa/src/services/pricing.ts#L102)
|
||||
|
||||
___
|
||||
|
||||
@@ -186,24 +174,19 @@ ___
|
||||
|
||||
▸ **collectPricingContext**(`context`): `Promise`<`PricingContext`\>
|
||||
|
||||
Collects additional information neccessary for completing the price
|
||||
selection.
|
||||
|
||||
#### Parameters
|
||||
|
||||
| Name | Type | Description |
|
||||
| :------ | :------ | :------ |
|
||||
| `context` | `PriceSelectionContext` | the price selection context to use |
|
||||
| `context` | `PriceSelectionContext` | |
|
||||
|
||||
#### Returns
|
||||
|
||||
`Promise`<`PricingContext`\>
|
||||
|
||||
The pricing context
|
||||
|
||||
#### Defined in
|
||||
|
||||
[services/pricing.ts:63](https://github.com/medusajs/medusa/blob/ae5c88b89/packages/medusa/src/services/pricing.ts#L63)
|
||||
[services/pricing.ts:63](https://github.com/medusajs/medusa/blob/32b066d92/packages/medusa/src/services/pricing.ts#L63)
|
||||
|
||||
___
|
||||
|
||||
@@ -211,25 +194,20 @@ ___
|
||||
|
||||
▸ **getProductPricing**(`product`, `context`): `Promise`<`Record`<`string`, `ProductVariantPricing`\>\>
|
||||
|
||||
Gets all the variant prices for a product. All the product's variants will
|
||||
be fetched.
|
||||
|
||||
#### Parameters
|
||||
|
||||
| Name | Type | Description |
|
||||
| :------ | :------ | :------ |
|
||||
| `product` | `Pick`<`Product`, ``"id"`` \| ``"variants"``\> | the product to get pricing for. |
|
||||
| `context` | `PriceSelectionContext` | the price selection context to use |
|
||||
| `product` | `Pick`<`Product`, ``"id"`` \| ``"variants"``\> | |
|
||||
| `context` | `PriceSelectionContext` | |
|
||||
|
||||
#### Returns
|
||||
|
||||
`Promise`<`Record`<`string`, `ProductVariantPricing`\>\>
|
||||
|
||||
A map of variant ids to their corresponding prices
|
||||
|
||||
#### Defined in
|
||||
|
||||
[services/pricing.ts:292](https://github.com/medusajs/medusa/blob/ae5c88b89/packages/medusa/src/services/pricing.ts#L292)
|
||||
[services/pricing.ts:292](https://github.com/medusajs/medusa/blob/32b066d92/packages/medusa/src/services/pricing.ts#L292)
|
||||
|
||||
___
|
||||
|
||||
@@ -237,24 +215,20 @@ ___
|
||||
|
||||
▸ **getProductPricingById**(`productId`, `context`): `Promise`<`Record`<`string`, `ProductVariantPricing`\>\>
|
||||
|
||||
Gets all the variant prices for a product by the product id
|
||||
|
||||
#### Parameters
|
||||
|
||||
| Name | Type | Description |
|
||||
| :------ | :------ | :------ |
|
||||
| `productId` | `string` | the id of the product to get prices for |
|
||||
| `context` | `PriceSelectionContext` | the price selection context to use |
|
||||
| `productId` | `string` | |
|
||||
| `context` | `PriceSelectionContext` | |
|
||||
|
||||
#### Returns
|
||||
|
||||
`Promise`<`Record`<`string`, `ProductVariantPricing`\>\>
|
||||
|
||||
A map of variant ids to their corresponding prices
|
||||
|
||||
#### Defined in
|
||||
|
||||
[services/pricing.ts:310](https://github.com/medusajs/medusa/blob/ae5c88b89/packages/medusa/src/services/pricing.ts#L310)
|
||||
[services/pricing.ts:310](https://github.com/medusajs/medusa/blob/32b066d92/packages/medusa/src/services/pricing.ts#L310)
|
||||
|
||||
___
|
||||
|
||||
@@ -276,7 +250,7 @@ ___
|
||||
|
||||
#### Defined in
|
||||
|
||||
[services/pricing.ts:254](https://github.com/medusajs/medusa/blob/ae5c88b89/packages/medusa/src/services/pricing.ts#L254)
|
||||
[services/pricing.ts:254](https://github.com/medusajs/medusa/blob/32b066d92/packages/medusa/src/services/pricing.ts#L254)
|
||||
|
||||
___
|
||||
|
||||
@@ -284,24 +258,20 @@ ___
|
||||
|
||||
▸ **getProductVariantPricing**(`variant`, `context`): `Promise`<`ProductVariantPricing`\>
|
||||
|
||||
Gets the prices for a product variant.
|
||||
|
||||
#### Parameters
|
||||
|
||||
| Name | Type | Description |
|
||||
| :------ | :------ | :------ |
|
||||
| `variant` | `Pick`<`ProductVariant`, ``"id"`` \| ``"product_id"``\> | the id of the variant to get prices for |
|
||||
| `context` | `PriceSelectionContext` \| `PricingContext` | the price selection context to use |
|
||||
| `variant` | `Pick`<`ProductVariant`, ``"id"`` \| ``"product_id"``\> | |
|
||||
| `context` | `PriceSelectionContext` \| `PricingContext` | |
|
||||
|
||||
#### Returns
|
||||
|
||||
`Promise`<`ProductVariantPricing`\>
|
||||
|
||||
The product variant prices
|
||||
|
||||
#### Defined in
|
||||
|
||||
[services/pricing.ts:180](https://github.com/medusajs/medusa/blob/ae5c88b89/packages/medusa/src/services/pricing.ts#L180)
|
||||
[services/pricing.ts:180](https://github.com/medusajs/medusa/blob/32b066d92/packages/medusa/src/services/pricing.ts#L180)
|
||||
|
||||
___
|
||||
|
||||
@@ -309,24 +279,20 @@ ___
|
||||
|
||||
▸ **getProductVariantPricingById**(`variantId`, `context`): `Promise`<`ProductVariantPricing`\>
|
||||
|
||||
Gets the prices for a product variant by a variant id.
|
||||
|
||||
#### Parameters
|
||||
|
||||
| Name | Type | Description |
|
||||
| :------ | :------ | :------ |
|
||||
| `variantId` | `string` | the id of the variant to get prices for |
|
||||
| `context` | `PriceSelectionContext` \| `PricingContext` | the price selection context to use |
|
||||
| `variantId` | `string` | |
|
||||
| `context` | `PriceSelectionContext` \| `PricingContext` | |
|
||||
|
||||
#### Returns
|
||||
|
||||
`Promise`<`ProductVariantPricing`\>
|
||||
|
||||
The product variant prices
|
||||
|
||||
#### Defined in
|
||||
|
||||
[services/pricing.ts:218](https://github.com/medusajs/medusa/blob/ae5c88b89/packages/medusa/src/services/pricing.ts#L218)
|
||||
[services/pricing.ts:218](https://github.com/medusajs/medusa/blob/32b066d92/packages/medusa/src/services/pricing.ts#L218)
|
||||
|
||||
___
|
||||
|
||||
@@ -348,7 +314,7 @@ ___
|
||||
|
||||
#### Defined in
|
||||
|
||||
[services/pricing.ts:138](https://github.com/medusajs/medusa/blob/ae5c88b89/packages/medusa/src/services/pricing.ts#L138)
|
||||
[services/pricing.ts:138](https://github.com/medusajs/medusa/blob/32b066d92/packages/medusa/src/services/pricing.ts#L138)
|
||||
|
||||
___
|
||||
|
||||
@@ -356,24 +322,20 @@ ___
|
||||
|
||||
▸ **getShippingOptionPricing**(`shippingOption`, `context`): `Promise`<`PricedShippingOption`\>
|
||||
|
||||
Gets the prices for a shipping option.
|
||||
|
||||
#### Parameters
|
||||
|
||||
| Name | Type | Description |
|
||||
| :------ | :------ | :------ |
|
||||
| `shippingOption` | `ShippingOption` | the shipping option to get prices for |
|
||||
| `context` | `PriceSelectionContext` \| `PricingContext` | the price selection context to use |
|
||||
| `shippingOption` | `ShippingOption` | |
|
||||
| `context` | `PriceSelectionContext` \| `PricingContext` | |
|
||||
|
||||
#### Returns
|
||||
|
||||
`Promise`<`PricedShippingOption`\>
|
||||
|
||||
The shipping option prices
|
||||
|
||||
#### Defined in
|
||||
|
||||
[services/pricing.ts:396](https://github.com/medusajs/medusa/blob/ae5c88b89/packages/medusa/src/services/pricing.ts#L396)
|
||||
[services/pricing.ts:396](https://github.com/medusajs/medusa/blob/32b066d92/packages/medusa/src/services/pricing.ts#L396)
|
||||
|
||||
___
|
||||
|
||||
@@ -381,24 +343,20 @@ ___
|
||||
|
||||
▸ **setProductPrices**(`products`, `context?`): `Promise`<(`Product` \| `PricedProduct`)[]\>
|
||||
|
||||
Set additional prices on a list of products.
|
||||
|
||||
#### Parameters
|
||||
|
||||
| Name | Type | Description |
|
||||
| :------ | :------ | :------ |
|
||||
| `products` | `Product`[] | list of products on which to set additional prices |
|
||||
| `context` | `PriceSelectionContext` | the price selection context to use |
|
||||
| `products` | `Product`[] | |
|
||||
| `context` | `PriceSelectionContext` | |
|
||||
|
||||
#### Returns
|
||||
|
||||
`Promise`<(`Product` \| `PricedProduct`)[]\>
|
||||
|
||||
A list of products with variants decorated with prices
|
||||
|
||||
#### Defined in
|
||||
|
||||
[services/pricing.ts:353](https://github.com/medusajs/medusa/blob/ae5c88b89/packages/medusa/src/services/pricing.ts#L353)
|
||||
[services/pricing.ts:353](https://github.com/medusajs/medusa/blob/32b066d92/packages/medusa/src/services/pricing.ts#L353)
|
||||
|
||||
___
|
||||
|
||||
@@ -406,24 +364,20 @@ ___
|
||||
|
||||
▸ **setShippingOptionPrices**(`shippingOptions`, `context?`): `Promise`<`PricedShippingOption`[]\>
|
||||
|
||||
Set additional prices on a list of shipping options.
|
||||
|
||||
#### Parameters
|
||||
|
||||
| Name | Type | Description |
|
||||
| :------ | :------ | :------ |
|
||||
| `shippingOptions` | `ShippingOption`[] | list of shipping options on which to set additional prices |
|
||||
| `context` | `Omit`<`PriceSelectionContext`, ``"region_id"``\> | the price selection context to use |
|
||||
| `shippingOptions` | `ShippingOption`[] | |
|
||||
| `context` | `Omit`<`PriceSelectionContext`, ``"region_id"``\> | |
|
||||
|
||||
#### Returns
|
||||
|
||||
`Promise`<`PricedShippingOption`[]\>
|
||||
|
||||
A list of shipping options with prices
|
||||
|
||||
#### Defined in
|
||||
|
||||
[services/pricing.ts:445](https://github.com/medusajs/medusa/blob/ae5c88b89/packages/medusa/src/services/pricing.ts#L445)
|
||||
[services/pricing.ts:445](https://github.com/medusajs/medusa/blob/32b066d92/packages/medusa/src/services/pricing.ts#L445)
|
||||
|
||||
___
|
||||
|
||||
@@ -431,24 +385,20 @@ ___
|
||||
|
||||
▸ **setVariantPrices**(`variants`, `context`): `Promise`<`PricedVariant`[]\>
|
||||
|
||||
Set additional prices on a list of product variants.
|
||||
|
||||
#### Parameters
|
||||
|
||||
| Name | Type | Description |
|
||||
| :------ | :------ | :------ |
|
||||
| `variants` | `ProductVariant`[] | list of variants on which to set additional prices |
|
||||
| `context` | `PriceSelectionContext` | the price selection context to use |
|
||||
| `variants` | `ProductVariant`[] | |
|
||||
| `context` | `PriceSelectionContext` | |
|
||||
|
||||
#### Returns
|
||||
|
||||
`Promise`<`PricedVariant`[]\>
|
||||
|
||||
A list of products with variants decorated with prices
|
||||
|
||||
#### Defined in
|
||||
|
||||
[services/pricing.ts:328](https://github.com/medusajs/medusa/blob/ae5c88b89/packages/medusa/src/services/pricing.ts#L328)
|
||||
[services/pricing.ts:328](https://github.com/medusajs/medusa/blob/32b066d92/packages/medusa/src/services/pricing.ts#L328)
|
||||
|
||||
___
|
||||
|
||||
@@ -472,7 +422,7 @@ TransactionBaseService.shouldRetryTransaction\_
|
||||
|
||||
#### Defined in
|
||||
|
||||
[interfaces/transaction-base-service.ts:34](https://github.com/medusajs/medusa/blob/ae5c88b89/packages/medusa/src/interfaces/transaction-base-service.ts#L34)
|
||||
[interfaces/transaction-base-service.ts:34](https://github.com/medusajs/medusa/blob/32b066d92/packages/medusa/src/interfaces/transaction-base-service.ts#L34)
|
||||
|
||||
___
|
||||
|
||||
@@ -496,4 +446,4 @@ TransactionBaseService.withTransaction
|
||||
|
||||
#### Defined in
|
||||
|
||||
[interfaces/transaction-base-service.ts:16](https://github.com/medusajs/medusa/blob/ae5c88b89/packages/medusa/src/interfaces/transaction-base-service.ts#L16)
|
||||
[interfaces/transaction-base-service.ts:16](https://github.com/medusajs/medusa/blob/32b066d92/packages/medusa/src/interfaces/transaction-base-service.ts#L16)
|
||||
|
||||
Reference in New Issue
Block a user