@maxio-com/advanced-billing-sdk
Version:
Ultimate billing and pricing flexibility for B2B SaaS. Maxio integrates directly into your product, so you can seamlessly manage your product catalog, bill customers, and collect payments.
43 lines (39 loc) • 1.22 kB
text/typescript
/**
* AdvancedBilling
*
* This file was automatically generated for Maxio by APIMATIC v3.0 ( https://www.apimatic.io ).
*/
import {
expandoObject,
nullable,
number,
optional,
Schema,
string,
} from '../schema.js';
import {
InvoicePaymentMethodType,
invoicePaymentMethodTypeSchema,
} from './invoicePaymentMethodType.js';
/** Example schema for an `failed_payment` event */
export interface FailedPaymentEventData {
/** The monetary value of the payment, expressed in cents. */
amountInCents: number;
/** The monetary value of the payment, expressed in dollars. */
appliedAmount: number;
/** The memo passed when the payment was created. */
memo?: string | null;
paymentMethod: InvoicePaymentMethodType;
/** The transaction ID of the failed payment. */
transactionId: number;
[key: string]: unknown;
}
export const failedPaymentEventDataSchema: Schema<FailedPaymentEventData> = expandoObject(
{
amountInCents: ['amount_in_cents', number()],
appliedAmount: ['applied_amount', number()],
memo: ['memo', optional(nullable(string()))],
paymentMethod: ['payment_method', invoicePaymentMethodTypeSchema],
transactionId: ['transaction_id', number()],
}
);