/** * 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 { CaptureStatus, captureStatusSchema } from './captureStatus.js'; import { SubscriptionAmountWithBreakdown, subscriptionAmountWithBreakdownSchema, } from './subscriptionAmountWithBreakdown.js'; import { SubscriptionPayerName, subscriptionPayerNameSchema, } from './subscriptionPayerName.js'; /** The transaction details. */ export interface SubscriptionTransactionDetails { /** The status of the captured payment. */ status?: CaptureStatus; /** The PayPal-generated transaction ID. */ id: string; /** The breakdown details for the amount. Includes the gross, tax, fee, and shipping amounts. */ amountWithBreakdown: SubscriptionAmountWithBreakdown; /** The name of the party. */ payerName?: SubscriptionPayerName; /** The internationalized email address. Note: Up to 64 characters are allowed before and 255 characters are allowed after the @ sign. However, the generally accepted maximum length for an email address is 254 characters. The pattern verifies that an unquoted @ sign exists. */ payerEmail?: string; /** 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; } export const subscriptionTransactionDetailsSchema: Schema = lazy( () => object({ status: ['status', optional(captureStatusSchema)], id: ['id', string()], amountWithBreakdown: [ 'amount_with_breakdown', subscriptionAmountWithBreakdownSchema, ], payerName: ['payer_name', optional(subscriptionPayerNameSchema)], payerEmail: ['payer_email', optional(string())], time: ['time', string()], }) );