Skip to content

Commit

Permalink
feat(DynamicPricing): Document Event#precise_total_amount_cents
Browse files Browse the repository at this point in the history
  • Loading branch information
vincent-pochet committed Sep 20, 2024
1 parent 8cfd743 commit 9987e3b
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/schemas/EventInputObject.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,10 @@ properties:
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.
precise_total_amount_cents:
type: string
example: "1234.56"
description: The precise total amount in cents with precision used by the `dynamic` pricing model to compute the usage amount.
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
4 changes: 4 additions & 0 deletions src/schemas/EventObject.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,10 @@ properties:
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.
precise_total_amount_cents:
type: string
example: "1234.56"
description: The precise total amount that was sent in the event payload. This filed 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

0 comments on commit 9987e3b

Please sign in to comment.