# `UblEx.Generator.ApplicationResponse`
[🔗](https://github.com/Octarion/ubl_ex/blob/v0.8.1/lib/ubl_ex/generator/application_response.ex#L1)

Generator for Peppol BIS Billing 3.0 compliant ApplicationResponse (message acknowledgment) documents.

Application responses are used to acknowledge receipt and processing status of invoices and credit notes.

# `generate`

```elixir
@spec generate(map()) :: String.t()
```

Generate a Peppol-compliant UBL ApplicationResponse XML document.

## Parameters

  * `document_data` - Map containing:
    - `:id` - Unique response ID
    - `:date` - Response date (Date struct)
    - `:response_code` - Status code (e.g., "AB" for acknowledged, "RE" for rejected)
    - `:document_reference` - ID of the document being acknowledged
    - `:sender` - Map with `:endpoint_id`, `:scheme`, `:name`
    - `:receiver` - Map with `:endpoint_id`, `:scheme`, `:name`
    - `:status_reason` - Optional reason text
    - `:note` - Optional note

## Response Codes

  * `AB` - Acknowledged / Accepted
  * `RE` - Rejected
  * `AP` - Accepted with errors
  * `CA` - Conditionally accepted
  * `PD` - Paid
  * `IP` - In process
  * `UQ` - Under query

## Example

    document_data = %{
      id: "RESPONSE-001",
      date: ~D[2025-06-02],
      response_code: "AB",
      document_reference: "INV-123",
      sender: %{
        endpoint_id: "0797948229",
        scheme: "0208",
        name: "My Company"
      },
      receiver: %{
        endpoint_id: "0844125969",
        scheme: "0208",
        name: "Supplier Inc"
      }
    }

    xml = UblEx.Generator.ApplicationResponse.generate(document_data)

---

*Consult [api-reference.md](api-reference.md) for complete listing*
