diff --git a/src/sections/codec.ts b/src/sections/codec.ts index 768c8a00..ca9417a3 100644 --- a/src/sections/codec.ts +++ b/src/sections/codec.ts @@ -4,6 +4,7 @@ import { Codec, number, optional, string } from 'purify-ts' * Shared codecs */ +// This is different from the CurrencyAmount used by merchant-fulfillment export const CurrencyAmount = Codec.interface({ CurrencyCode: optional(string), CurrencyAmount: optional(number), diff --git a/src/sections/merchant-fulfillment/codec.ts b/src/sections/merchant-fulfillment/codec.ts index 5de038a5..09c2c021 100644 --- a/src/sections/merchant-fulfillment/codec.ts +++ b/src/sections/merchant-fulfillment/codec.ts @@ -1,13 +1,17 @@ import { boolean, Codec, enumeration, GetInterface, number, optional, string } from 'purify-ts' import { ensureArray, ensureString, mwsDate } from '../../parsing' -import { CurrencyAmount } from '../codec' import { PredefinedPackageDimensionsEnum } from './type' export const TemporarilyUnavailableCarrier = Codec.interface({ CarrierName: string, }) +export const CurrencyAmount = Codec.interface({ + CurrencyCode: string, + Amount: number, +}) + export const RejectedShippingService = Codec.interface({ CarrierName: string, ShippingServiceId: ensureString,