/** * Do not edit this file it is auto-generated by io-utils / gen-api-models. * See https://github.com/pagopa/io-utils */ /* tslint:disable */ import { IWithinRangeIntegerTag, WithinRangeInteger } from "italia-ts-commons/lib/numbers"; import * as t from "io-ts"; import { withDefault } from "italia-ts-commons/lib/types"; /** * Maximum amount in euro cents that a service is allowed to charge to a user. */ export type MaxAllowedPaymentAmount = t.TypeOf< typeof MaxAllowedPaymentAmountBase >; const MaxAllowedPaymentAmountBase = t.union([ WithinRangeInteger<0, 9999999999, IWithinRangeIntegerTag<0, 9999999999>>( 0, 9999999999 ), t.literal(9999999999) ]); export const MaxAllowedPaymentAmount = withDefault( MaxAllowedPaymentAmountBase, 0 as MaxAllowedPaymentAmount );