ExAcme.OrderBuilder (ExAcme v0.3.0)

View Source

Represents 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

Types

t()

ACME Order request object

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

t()

@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

add_dns_identifier(order, domain)

@spec add_dns_identifier(t(), String.t()) :: t()

Adds a DNS identifier to the order request.

Parameters

  • order - The current order request.
  • domain - The domain name to add.

Returns

add_identifier(order, type, value)

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

new_order()

@spec new_order() :: t()

Creates a new order request with default values.

Returns

not_after(order, date)

@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

not_before(order, date)

@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

profile(order, profile)

@spec profile(t(), String.t()) :: t()

Sets the profile for the order request.

Parameters

  • order - The current order request.
  • profile - The profile name.

Returns

to_map(order)

@spec to_map(t()) :: map()

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.