diff options
Diffstat (limited to 'packages/taler-wallet-cli')
-rw-r--r-- | packages/taler-wallet-cli/src/harness/merchantApiTypes.ts | 16 |
1 files changed, 15 insertions, 1 deletions
diff --git a/packages/taler-wallet-cli/src/harness/merchantApiTypes.ts b/packages/taler-wallet-cli/src/harness/merchantApiTypes.ts index 35062b579..8b10bb749 100644 --- a/packages/taler-wallet-cli/src/harness/merchantApiTypes.ts +++ b/packages/taler-wallet-cli/src/harness/merchantApiTypes.ts @@ -43,6 +43,8 @@ import { EddsaPublicKeyString, codecForAmountString, TalerProtocolDuration, + codecForTimestamp, + TalerProtocolTimestamp, } from "@gnu-taler/taler-util"; export interface PostOrderRequest { @@ -80,6 +82,15 @@ export const codecForPostOrderResponse = (): Codec<PostOrderResponse> => .property("token", codecOptional(codecForString())) .build("PostOrderResponse"); + +export const codecForRefundDetails = (): Codec<RefundDetails> => + buildCodecForObject<RefundDetails>() + .property("reason", codecForString()) + .property("pending", codecForBoolean()) + .property("amount", codecForString()) + .property("timestamp", codecForTimestamp) + .build("PostOrderResponse"); + export const codecForCheckPaymentPaidResponse = (): Codec<CheckPaymentPaidResponse> => buildCodecForObject<CheckPaymentPaidResponse>() @@ -200,7 +211,10 @@ export interface RefundDetails { reason: string; // when was the refund approved - timestamp: AbsoluteTime; + timestamp: TalerProtocolTimestamp; + + // has not been taken yet + pending: boolean; // Total amount that was refunded (minus a refund fee). amount: AmountString; |