ExAcme.OrderBuilder (ExAcme v0.5.1)
View SourceRepresents an ACME Order request.
Provides functionalities to build and submit order requests to the ACME server.
Attributes
identifiers
- List of identifiers for the order.profile
- The profile to apply to the order.not_before
- Request start time for the certificate.not_after
- Request end time for the certificate.
Summary
Functions
Adds a DNS identifier to the order request.
Adds an identifier to the order request.
Creates a new order request with default values.
Sets the requested end time for the certificate.
Sets the requested start time for the certificate.
Sets the profile for the order request.
Converts an order request to a map.
Types
@type t() :: %ExAcme.OrderBuilder{ identifiers: [%{type: String.t(), value: String.t()}], not_after: DateTime.t() | nil, not_before: DateTime.t() | nil, profile: String.t() | nil }
ACME Order request object
Functions
Adds a DNS identifier to the order request.
Parameters
order
- The current order request.domain
- The domain name to add.
Returns
- Updated
ExAcme.OrderBuilder
struct.
Adds an identifier to the order request.
Parameters
order
- The current order request.type
- The type of identifier (e.g., "dns").value
- The value of the identifier (e.g., domain name).
Returns
- Updated
ExAcme.OrderBuilder
struct.
@spec new_order() :: t()
Creates a new order request with default values.
Returns
ExAcme.OrderBuilder
struct.
@spec not_after(t(), DateTime.t()) :: t()
Sets the requested end time for the certificate.
Parameters
order
- The current order request.date
- The end datetime.
Returns
- Updated
ExAcme.OrderBuilder
struct.
@spec not_before(t(), DateTime.t()) :: t()
Sets the requested start time for the certificate.
Parameters
order
- The current order request.date
- The start datetime.
Returns
- Updated
ExAcme.OrderBuilder
struct.
Sets the profile for the order request.
Parameters
order
- The current order request.profile
- The profile name.
Returns
- Updated
ExAcme.OrderBuilder
struct.
Converts an order request to a map.
This function transforms the OrderBuilder struct into a map format, removes nil values, and converts keys to camelCase for API compatibility.
Parameters
order
- The order request to convert.
Returns
- A map representation of the order.