179 lines
7.9 KiB
Plaintext
179 lines
7.9 KiB
Plaintext
Title: MapInstallmentSequenceLambda - Map Method
|
|
Metadata:
|
|
• module: InvoiceInstallments
|
|
• component: MapInstallmentSequenceLambda
|
|
• type: component
|
|
• domain: Accounts Receivable
|
|
• system: Oracle AR
|
|
Content:
|
|
Purpose: Finds installment sequence by matching installment ID from a collection.
|
|
Processing Logic:
|
|
• Accepts MapInstallmentSequenceDto containing InstallmentId and Installments list
|
|
• Validates InstallmentId is not null/empty, throws ArgumentNullException if invalid
|
|
• Validates Installments list is not null, throws ArgumentNullException if invalid
|
|
• Uses FirstOrDefault to find installment where InstallmentId matches
|
|
• Returns InstallmentSequence as string, or null if no match found
|
|
• Lambda configuration: 256MB memory, 30s timeout
|
|
Example Questions:
|
|
• How do I find an installment sequence by installment ID?
|
|
• What Lambda method maps installment IDs to sequence numbers?
|
|
• What validation is performed on installment mapping inputs?
|
|
---
|
|
Title: GetInvoiceWithInstallments Lambda - Handler Method
|
|
Metadata:
|
|
• module: InvoiceInstallments
|
|
• component: GetInvoiceWithInstallments
|
|
• type: component
|
|
• domain: Accounts Receivable
|
|
• system: Oracle AR
|
|
Content:
|
|
Purpose: Retrieves invoice and associated installments for a customer policy.
|
|
Processing Logic:
|
|
• Accepts InvoiceInstallmentsDto with PolicyNumber and AccountNumber
|
|
• Deconstructs DTO to extract policy and account number
|
|
• Creates GetInvoicesDto with PolicyNumber and CustomerAccountNumber
|
|
• Calls IOracleInvoiceIntegration.GetInvoicesAsync to retrieve invoices
|
|
• Throws exception "Invoice not found" if invoices null or empty
|
|
• Selects first invoice from results (invoices[0])
|
|
• Calls IInstallmentIntegration.GetAsync with invoice.TransactionID
|
|
• Returns new Invoice object combining OracleInvoice and installments
|
|
Example Questions:
|
|
• How do I retrieve an invoice with its installments?
|
|
• What happens when no invoice is found for a policy number?
|
|
• What integrations are used to fetch invoice and installment data?
|
|
---
|
|
Title: InvoiceInstallmentsDto
|
|
Metadata:
|
|
• module: InvoiceInstallments
|
|
• component: InvoiceInstallmentsDto
|
|
• type: concept
|
|
• domain: Accounts Receivable
|
|
• system: Oracle AR
|
|
Content:
|
|
Purpose: Input DTO for retrieving invoice with installments, with deconstruction support.
|
|
Processing Logic:
|
|
• PolicyNumber: string identifier for the policy
|
|
• AccountNumber: string customer account identifier
|
|
• Deconstruct method: extracts PolicyNumber and AccountNumber as tuple
|
|
• Validates PolicyNumber not null during deconstruction, throws ArgumentNullException
|
|
• Validates AccountNumber not null during deconstruction, throws ArgumentNullException
|
|
• Enables tuple-style assignment: (string policy, string account) = dto
|
|
Example Questions:
|
|
• What input parameters are needed to retrieve invoice with installments?
|
|
• How does InvoiceInstallmentsDto support tuple deconstruction?
|
|
• What validation occurs during DTO deconstruction?
|
|
---
|
|
Title: MapInstallmentSequenceDto
|
|
Metadata:
|
|
• module: InvoiceInstallments
|
|
• component: MapInstallmentSequenceDto
|
|
• type: concept
|
|
• domain: Accounts Receivable
|
|
• system: Oracle AR
|
|
Content:
|
|
Purpose: Input DTO for mapping installment ID to sequence number.
|
|
Processing Logic:
|
|
• InstallmentId: string identifier for the target installment
|
|
• Installments: List<Installment> collection to search within
|
|
• Both properties are nullable
|
|
• Validation performed in consuming Lambda (MapInstallmentSequenceLambda)
|
|
Example Questions:
|
|
• What properties are needed to map installment sequence?
|
|
• How is the installment collection provided for sequence mapping?
|
|
• Is MapInstallmentSequenceDto validated in the DTO or Lambda?
|
|
---
|
|
Title: Invoice Model (InvoiceInstallments Module)
|
|
Metadata:
|
|
• module: InvoiceInstallments
|
|
• component: Invoice
|
|
• type: concept
|
|
• domain: Accounts Receivable
|
|
• system: Oracle AR
|
|
Content:
|
|
Purpose: Extended invoice model combining OracleInvoice properties with installments collection.
|
|
Processing Logic:
|
|
• Inherits from OracleInvoice base class
|
|
• Adds Installments property: IEnumerable<Installment>
|
|
• Constructor accepts OracleInvoice and installments collection
|
|
• Copies all OracleInvoice properties: TransactionID, TransactionType, TransactionNumber, DocumentNumber, TransactionDate, AccountingDate, PaymentTerms, DueDate, Comments, PurchaseOrderNumber, ProductType, PremiumPayable, InstallmentFee, PhysicalAddressState, PolicyTermOriginalInvoice, CustomerAccountNumber, SitePurposeSiteNumber, TransactionStatus, PrintStatus, InvoiceBalanceAmount, TransactionLines, CreatedOn
|
|
• Assigns Installments collection
|
|
Example Questions:
|
|
• How is an invoice model extended to include installments?
|
|
• What properties are copied from OracleInvoice to the extended Invoice model?
|
|
• How do I combine invoice and installment data in a single object?
|
|
---
|
|
Title: Invoice with Installments Retrieval Workflow
|
|
Metadata:
|
|
• module: InvoiceInstallments
|
|
• component: GetInvoiceWithInstallments
|
|
• type: workflow
|
|
• domain: Accounts Receivable
|
|
• system: Oracle AR
|
|
Content:
|
|
Purpose: Orchestrates retrieval of invoice and installments from Oracle integrations.
|
|
Processing Logic:
|
|
1. Receive InvoiceInstallmentsDto with PolicyNumber and AccountNumber
|
|
2. Deconstruct DTO to extract values
|
|
3. Build GetInvoicesDto request
|
|
4. Call invoice integration to retrieve invoices by policy and account
|
|
5. Validate invoice collection not null/empty
|
|
6. Extract first invoice from results
|
|
7. Call installment integration with invoice.TransactionID
|
|
8. Construct extended Invoice model with OracleInvoice data and installments
|
|
9. Return combined Invoice object
|
|
Key Rules:
|
|
• Always uses first invoice if multiple returned
|
|
• Throws exception if no invoices found
|
|
Example Questions:
|
|
• What is the step-by-step process for retrieving invoice with installments?
|
|
• How are invoice and installment data combined?
|
|
• What happens if multiple invoices match the policy number?
|
|
---
|
|
Title: Installment Sequence Lookup Rule
|
|
Metadata:
|
|
• module: InvoiceInstallments
|
|
• component: MapInstallmentSequenceLambda
|
|
• type: rule
|
|
• domain: Accounts Receivable
|
|
• system: Oracle AR
|
|
Content:
|
|
Purpose: Defines matching logic for finding installment sequence by ID.
|
|
Processing Logic:
|
|
• Uses LINQ FirstOrDefault to search installments collection
|
|
• Matches on InstallmentId equality (i.InstallmentId == mapInstallmentSequenceDto.InstallmentId)
|
|
• Extracts InstallmentSequence property from matched installment
|
|
• Converts InstallmentSequence integer to string via ToString()
|
|
• Returns null if no matching installment found
|
|
Key Rules:
|
|
• Exact match on InstallmentId required
|
|
• Returns null (not exception) for no match
|
|
• Sequence converted to string for return
|
|
Example Questions:
|
|
• How is installment ID matched to find sequence?
|
|
• What is returned when no matching installment ID is found?
|
|
• How is the installment sequence formatted for return?
|
|
---
|
|
Title: InvoiceInstallmentsDto Deconstruction Pattern
|
|
Metadata:
|
|
• module: InvoiceInstallments
|
|
• component: InvoiceInstallmentsDto
|
|
• type: rule
|
|
• domain: Accounts Receivable
|
|
• system: Oracle AR
|
|
Content:
|
|
Purpose: Implements tuple deconstruction for extracting policy and account numbers.
|
|
Processing Logic:
|
|
• Deconstruct method signature: out string policyNumber, out string accountNumber
|
|
• Validates PolicyNumber not null before assignment, throws ArgumentNullException if null
|
|
• Validates AccountNumber not null before assignment, throws ArgumentNullException if null
|
|
• Assigns PolicyNumber to policyNumber out parameter
|
|
• Assigns AccountNumber to accountNumber out parameter
|
|
• Enables syntax: (string policy, string account) = dto
|
|
Key Rules:
|
|
• Validation occurs during deconstruction, not construction
|
|
• Both properties required (no null allowed)
|
|
Example Questions:
|
|
• How does InvoiceInstallmentsDto support C# deconstruction syntax?
|
|
• When are PolicyNumber and AccountNumber validated?
|
|
• What exception is thrown for null policy or account numbers?
|