class PaymentMandateContentsClass

PaymentMandateContents Class Follows Single Responsibility Principle (SRP) for managing payment mandate contents

Constructors

new
PaymentMandateContentsClass(
options?: { id?: string; createdAt?: Date; },
)

Properties

Methods

private
generateUniqueId(): string

Get creation timestamp

Get payment mandate contents data

getHash(): Promise<string>

Get the hash of the payment mandate contents for integrity verification

getId(): string

Get unique ID

private
sha256Hash(data: string): string
toJSON(): { id: string; createdAt: string; data: PaymentMandateContents; }

Convert to JSON representation

toString(): string

String representation

validate(): Promise<void>

Validate payment mandate contents using validator

Static Methods

Create a new PaymentMandateContents instance

createWithOptions(
options?: { id?: string; createdAt?: Date; },
): Promise<PaymentMandateContentsClass>

Create a new PaymentMandateContents instance with custom options (for testing)