/** * PayPal Server SDKLib * * This file was automatically generated by APIMATIC v3.0 ( https://www.apimatic.io ). */ import { lazy, object, optional, Schema, string } from '../schema.js'; import { Money, moneySchema } from './money.js'; import { ReasonCode, reasonCodeSchema } from './reasonCode.js'; /** The details for the failed payment of the subscription. */ export interface FailedPaymentDetails { /** The currency and amount for a financial transaction, such as a balance or payment due. */ amount: Money; /** The date and time, in [Internet date and time format](https://tools.ietf.org/html/rfc3339#section-5.6). Seconds are required while fractional seconds are optional. Note: The regular expression provides guidance but does not reject all invalid dates. */ time: string; /** The reason code for the payment failure. */ reasonCode?: ReasonCode; /** The date and time, in [Internet date and time format](https://tools.ietf.org/html/rfc3339#section-5.6). Seconds are required while fractional seconds are optional. Note: The regular expression provides guidance but does not reject all invalid dates. */ nextPaymentRetryTime?: string; } export const failedPaymentDetailsSchema: Schema = lazy( () => object({ amount: ['amount', moneySchema], time: ['time', string()], reasonCode: ['reason_code', optional(reasonCodeSchema)], nextPaymentRetryTime: ['next_payment_retry_time', optional(string())], }) );