Skip to content

Commit

Permalink
feat(DynamicPricing): Expose Event#precise_total_amount_cents (#217)
Browse files Browse the repository at this point in the history
  • Loading branch information
vincent-pochet authored Sep 30, 2024
1 parent 97bf500 commit 700d9bc
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 0 deletions.
2 changes: 2 additions & 0 deletions lib/lago/api/resources/event.rb
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,7 @@ def whitelist_params(params)
code: params[:code],
timestamp: params[:timestamp],
external_subscription_id: params[:external_subscription_id],
precise_total_amount_cents: params[:precise_total_amount_cents],
properties: params[:properties],
}.compact,
}
Expand All @@ -59,6 +60,7 @@ def whitelist_estimate_params(params)
root_name => {
code: params[:code],
external_subscription_id: params[:external_subscription_id],
precise_total_amount_cents: params[:precise_total_amount_cents],
properties: params[:properties],
}.compact,
}
Expand Down
1 change: 1 addition & 0 deletions spec/factories/event.rb
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
external_subscription_id { '5eb02857-a71e-4ea2-bcf9-57d8885990ba' }
code { '123' }
timestamp { '2022-05-05T12:27:30Z' }
precise_total_amount_cents { '1000.12' }
properties do
{
'custom_field' => 'custom'
Expand Down
1 change: 1 addition & 0 deletions spec/fixtures/api/event.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
"lago_customer_id": "1a901a90-1a90-1a90-1a90-1a901a901a90",
"code": "bm_code",
"timestamp": "2022-04-29T08:59:51.998Z",
"precise_total_amount_cents": null,
"properties": {
"custom_field": 12
},
Expand Down

0 comments on commit 700d9bc

Please sign in to comment.