Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
30 changes: 19 additions & 11 deletions openapi.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion src/resources/events.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ get:
example: "event-123"
- name: timestamp_from_started_at
in: query
description: Requires `external_subscription_id` to be set. Filter events by timestamp after the subscription started at datetime.
description: Requires `external_subscription_id` to be set, and cannot be combined with `timestamp_from`. Filter events by timestamp after the subscription started at datetime.
required: false
explode: true
schema:
Expand Down
4 changes: 2 additions & 2 deletions src/schemas/BillableMetricBaseInput.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,8 @@ properties:
- "null"
example: "round((ended_at - started_at) * units)"
description: |
Expression used to calculate the event units. The expression is evalutated for each event and the result is then used to calculate the total aggregated units.
Accepted function are `ceil`, `concat` and `round` as well as `+`, `-`, `\` and `*` operations.
Expression used to calculate the event units. The expression is evaluated for each event and the result is then used to calculate the total aggregated units.
Accepted functions are `ceil`, `concat` and `round` as well as `+`, `-`, `\` and `*` operations.
Round is accepting an optional second parameter to specify the number of decimal.
rounding_function:
type:
Expand Down
4 changes: 2 additions & 2 deletions src/schemas/BillableMetricEvaluateExpressionInput.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@ properties:
type: string
example: "round((ended_at - started_at) * units)"
description: |
Expression used to calculate the event units. The expression is evalutated for each event and the result is then used to calculate the total aggregated units.
Accepted function are `ceil`, `concat` and `round` as well as `+`, `-`, `\` and `*` operations.
Expression used to calculate the event units. The expression is evaluated for each event and the result is then used to calculate the total aggregated units.
Accepted functions are `ceil`, `concat` and `round` as well as `+`, `-`, `\` and `*` operations.
Round is accepting an optional second parameter to specify the number of decimal.
event:
type: object
Expand Down
6 changes: 4 additions & 2 deletions src/schemas/BillableMetricObject.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -58,9 +58,11 @@ properties:
example: "2022-09-14T16:35:31Z"
description: "Creation date of the billable metric."
expression:
type: string
type:
- string
- "null"
example: "round((ended_at - started_at) * units)"
description: "Expression used to calculate the event units. The expression is evalutated for each event and the result is then used to calculate the total aggregated units."
description: "Expression used to calculate the event units. The expression is evaluated for each event and the result is then used to calculate the total aggregated units."
field_name:
type:
- string
Expand Down
6 changes: 6 additions & 0 deletions src/schemas/EventEstimateFeesInput.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,12 @@ properties:
type: string
example: "sub_1234567890"
description: The unique identifier of the subscription within your application.
precise_total_amount_cents:
type:
- string
- "null"
example: "1234.56"
description: The precise total amount in cents with precision used by the `dynamic` pricing model to compute the estimated usage amount. Defaults to `0` when omitted.
properties:
type: object
description: This field represents additional properties associated with the event, which are utilized in the calculation of the final fee. This object becomes mandatory when the targeted billable metric employs a `sum_agg`, `max_agg`, or `unique_count_agg` aggregation method. However, when using a simple `count_agg`, this object is not required. Any property of the targeted billable metric can be sent here, in addition to the documented fields below.
Expand Down
2 changes: 1 addition & 1 deletion src/schemas/EventInputObject.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ properties:
description: |
This field captures the Unix timestamp in seconds indicating the occurrence of the event in Coordinated Universal Time (UTC).
If this timestamp is not provided, the API will automatically set it to the time of event reception.
You can also provide miliseconds precision by appending decimals to the timestamp.
You can also provide milliseconds precision by appending decimals to the timestamp.
precise_total_amount_cents:
type:
- string
Expand Down
6 changes: 3 additions & 3 deletions src/schemas/EventObject.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -32,13 +32,13 @@ properties:
type: string
format: "date-time"
example: "2022-04-29T08:59:51.123Z"
description: This field captures the Unix timestamp in seconds indicating the occurrence of the event in Coordinated Universal Time (UTC). If this timestamp is not provided, the API will automatically set it to the time of event reception.
description: The date and time at which the event occurred, in ISO 8601 format with millisecond precision and expressed in Coordinated Universal Time (UTC). When no timestamp is sent on the event, it is set to the time of event reception.
precise_total_amount_cents:
type:
- string
- "null"
example: "1234.56"
description: The precise total amount that was sent in the event payload. This filed is used by the `dynamic` pricing model.
description: The precise total amount that was sent in the event payload. This field is used by the `dynamic` pricing model.
properties:
type: object
description: This field represents additional properties associated with the event, which are utilized in the calculation of the final fee. This object becomes mandatory when the targeted billable metric employs a `sum_agg`, `max_agg`, or `unique_count_agg` aggregation method. However, when using a simple `count_agg`, this object is not required.
Expand Down Expand Up @@ -68,7 +68,7 @@ properties:
external_subscription_id:
type: string
example: "sub_1234567890"
description: The unique identifier of the subscription within your application. It is a mandatory field when the customer possesses multiple subscriptions or when the `external_customer_id` is not provided.
description: The unique identifier of the subscription within your application, as sent on the event. It is the value Lago uses to attach the event to a subscription.
created_at:
type:
- string
Expand Down
Loading