Paddle.License (paddlex v0.1.1) View Source
License
Link to this section Summary
Functions
Generate a Paddle-framework license
Link to this section Types
Specs
Link to this section Functions
Specs
generate(params) :: {:ok, t()} | {:error, Paddle.Error.t()}
when params: %{
:product_id => number(),
:allowed_uses => integer(),
optional(:expires_at) => Date.t()
}
Generate a Paddle-framework license
Examples
params = %{
product_id: 1234,
allowed_uses: 10,
expires_at: ~D[2018-10-10]
}
Paddle.License.generate(params)
{:ok, %Paddle.License{
license_code: "2DEDF6A4-86420251-0927C417-43523113-CA22C29B",
expires_at: ~D[2018-10-10]
}}