ExAcme.OrderRequest (ExAcme v0.2.0)
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.
Submits the order request to the ACME server.
Types
@type t() :: %ExAcme.OrderRequest{ 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.OrderRequest{}
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.OrderRequest{}
struct.
@spec new() :: t()
Creates a new order request with default values.
Returns
%ExAcme.OrderRequest{}
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.OrderRequest{}
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.OrderRequest{}
struct.
Sets the profile for the order request.
Parameters
order
- The current order request.profile
- The profile name.
Returns
- Updated
%ExAcme.OrderRequest{}
struct.
@spec submit(t(), ExAcme.AccountKey.t(), ExAcme.client()) :: {:ok, ExAcme.Order.t()} | {:error, term()}
Submits the order request to the ACME server.
Parameters
order
- The order request to submit.key
- The account key for authentication.client
- The ExAcme client agent.
Returns
{:ok, order}
on success.{:error, reason}
on failure.