Skip to content

Commit

Permalink
feat(plan_override): Add plan overrides to subscription
Browse files Browse the repository at this point in the history
  • Loading branch information
rsempe committed Oct 11, 2023
1 parent e1d0744 commit 1084ad6
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 0 deletions.
1 change: 1 addition & 0 deletions lib/lago/api/resources/subscription.rb
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ def whitelist_params(params)
subscription_at: params[:subscription_at],
ending_at: params[:ending_at],
subscription_date: params[:subscription_date], # Deprecated
plan_overrides: params[:plan_overrides],
}.compact
}
end
Expand Down
3 changes: 3 additions & 0 deletions spec/lago/api/resources/subscription_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,9 @@
subscription_date: factory_subscription.subscription_date,
billing_time: factory_subscription.billing_time,
ending_at: factory_subscription.ending_at,
plan_overrides: {
amount_cents: 1000,
}
}
end
let(:body) do
Expand Down

0 comments on commit 1084ad6

Please sign in to comment.