aboutsummaryrefslogtreecommitdiff
path: root/packages/taler-wallet-cli
diff options
context:
space:
mode:
authorSebastian <sebasjm@gmail.com>2022-05-14 18:09:33 -0300
committerSebastian <sebasjm@gmail.com>2022-05-14 18:09:49 -0300
commite4ea2019430fb3c4b788f67427fbd743f604b7e5 (patch)
treee7426a82a2cc523c15d7f8b64e16c53722f7a87b /packages/taler-wallet-cli
parentc02dbc833bc384b72e5b18450a47ae2b212b0a8e (diff)
feat: awaiting refund
Diffstat (limited to 'packages/taler-wallet-cli')
-rw-r--r--packages/taler-wallet-cli/src/harness/merchantApiTypes.ts16
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;