Skip to content

Commit

Permalink
docs: apply suggestions from code review
Browse files Browse the repository at this point in the history
Co-authored-by: Shahed Nasser <[email protected]>
  • Loading branch information
ranjithkumar8352 and shahednasser authored Dec 31, 2024
1 parent b4f1123 commit b421df3
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions packages/core/utils/src/fulfillment/provider.ts
Original file line number Diff line number Diff line change
Expand Up @@ -229,20 +229,21 @@ export class AbstractFulfillmentProviderService
* @returns The calculated price's details.
*
* @example
* import { CalculateShippingOptionPriceDTO } from "@medusajs/framework/types"
* class MyFulfillmentProviderService extends AbstractFulfillmentProviderService {
* // ...
* async calculatePrice(
* optionData: Record<string, unknown>,
* data: Record<string, unknown>,
* context: any
* optionData: CalculateShippingOptionPriceDTO["optionData"],
* data: CalculateShippingOptionPriceDTO["data"],
* context: CalculateShippingOptionPriceDTO["context"]
* ): Promise<CalculatedShippingOptionPrice> {
* // assuming the client can calculate the price using
* // the third-party service
* const price = await this.client.calculate(data)
* return {
* calculated_amount: price,
* is_calculated_price_tax_inclusive: true,
* // Update this boolean value based on your logic
* is_calculated_price_tax_inclusive: true,
* }
* }
* }
Expand Down

0 comments on commit b421df3

Please sign in to comment.