/** * Do not edit this file it is auto-generated by io-utils / gen-api-models. * See https://github.com/pagopa/io-utils */ /* eslint-disable */ import { PaymentAmount } from "./PaymentAmount"; import { PaymentNoticeNumber } from "./PaymentNoticeNumber"; import { withDefault } from "@pagopa/ts-commons/lib/types"; import * as t from "io-ts"; /** * Metadata needed to process pagoPA payments. */ // required attributes const PaymentDataR = t.interface({ amount: PaymentAmount, notice_number: PaymentNoticeNumber }); // optional attributes const PaymentDataO = t.partial({ invalid_after_due_date: withDefault(t.boolean, false) }); export const PaymentData = t.exact( t.intersection([PaymentDataR, PaymentDataO], "PaymentData") ); export type PaymentData = t.TypeOf;