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 88b5486
Show file tree
Hide file tree
Showing 3 changed files with 20 additions and 0 deletions.
10 changes: 10 additions & 0 deletions openapi.yaml

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

5 changes: 5 additions & 0 deletions src/schemas/EventInputObject.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,11 @@ 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
nullable: true
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
5 changes: 5 additions & 0 deletions src/schemas/EventObject.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,11 @@ 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
nullable: true
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 88b5486

Please sign in to comment.