From 1084ad64486b955ff73260668da36822f1848a89 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Romain=20Semp=C3=A9?= Date: Wed, 11 Oct 2023 15:02:48 +0200 Subject: [PATCH] feat(plan_override): Add plan overrides to subscription --- lib/lago/api/resources/subscription.rb | 1 + spec/lago/api/resources/subscription_spec.rb | 3 +++ 2 files changed, 4 insertions(+) diff --git a/lib/lago/api/resources/subscription.rb b/lib/lago/api/resources/subscription.rb index be9a8d4..d8df7d0 100644 --- a/lib/lago/api/resources/subscription.rb +++ b/lib/lago/api/resources/subscription.rb @@ -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 diff --git a/spec/lago/api/resources/subscription_spec.rb b/spec/lago/api/resources/subscription_spec.rb index b39113e..f9d7393 100644 --- a/spec/lago/api/resources/subscription_spec.rb +++ b/spec/lago/api/resources/subscription_spec.rb @@ -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