docs: update recipes following 2.2 release (#10868)

This commit is contained in:
Shahed Nasser
2025-01-07 17:07:51 +02:00
committed by GitHub
parent 60fd1cbc6c
commit 8e7d895aa2
4 changed files with 29 additions and 9 deletions
@@ -453,9 +453,15 @@ This method accepts the shipping option's `data` field, which will hold the data
Add the method to `ShipStationProviderService` in `src/modules/shipstation/service.ts`:
```ts title="src/modules/shipstation/service.ts"
// other imports...
import {
// ...
CreateShippingOptionDTO,
} from "@medusajs/framework/types"
class ShipStationProviderService extends AbstractFulfillmentProviderService {
// ...
async canCalculate(data: Record<string, unknown>): Promise<boolean> {
async canCalculate(data: CreateShippingOptionDTO): Promise<boolean> {
return true
}
}
@@ -820,7 +826,7 @@ class ShipStationProviderService extends AbstractFulfillmentProviderService {
},
to_address: context.shipping_address,
items: context.items || [],
currency_code: context.currency_code,
currency_code: context.currency_code as string,
})
rate = shipment.rate_response.rates[0]
} else {