Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(fee): Expose charge_id in REST API #2710

Merged
merged 1 commit into from
Oct 18, 2024
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
1 change: 1 addition & 0 deletions app/serializers/v1/fee_serializer.rb
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ def serialize

payload = {
lago_id: model.id,
lago_charge_id: model.charge_id,
lago_charge_filter_id: model.charge_filter_id,
lago_invoice_id: model.invoice_id,
lago_true_up_fee_id: model.true_up_fee&.id,
Expand Down
1 change: 1 addition & 0 deletions spec/serializers/v1/fee_serializer_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@
aggregate_failures do
expect(result['fee']).to include(
'lago_id' => fee.id,
'lago_charge_id' => fee.charge_id,
'lago_charge_filter_id' => fee.charge_filter_id,
'lago_invoice_id' => fee.invoice_id,
'lago_true_up_fee_id' => fee.true_up_fee&.id,
Expand Down