This commit is contained in:
swrup 2025-11-21 19:09:46 +01:00
parent 65ccb5a86f
commit 7d2bb9cfa6
3 changed files with 9 additions and 9 deletions

View file

@ -1,4 +1,3 @@
open Types
open Api_types open Api_types
open Crypto open Crypto
@ -19,6 +18,12 @@ module ErrorDetail = struct
|> Jsont.Object.finish |> Jsont.Object.finish
end end
module Amount = struct
include Amount
let jsont = Jsont.of_of_string ~kind:"Amount" of_string ~enc:to_string
end
module Timestamp = struct module Timestamp = struct
open Timestamp open Timestamp

View file

@ -1,5 +0,0 @@
module Amount = struct
include Amount
let jsont = Jsont.of_of_string ~kind:"Amount" of_string ~enc:to_string
end

View file

@ -28,10 +28,10 @@ let () =
() ()
let () = let () =
let open Types.Amount in let open Amount in
let v = let v =
Amount.make ~sign:(Some Amount.Sign_plus) ~currency:"EUR" make ~sign:(Some Sign_plus) ~currency:"EUR" ~value:(Int64.of_int 25)
~value:(Int64.of_int 25) ~fraction:(Int32.of_int 678) ~fraction:(Int32.of_int 678)
|> Result.get_ok |> Result.get_ok
in in
let s = to_string v in let s = to_string v in