Skip to content

Commit 2bbaf69

Browse files
committed
switching to the correct proration behavior
1 parent 9106728 commit 2bbaf69

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

src/Billing/Jobs/ReconcileAdditionalStorageJob.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -146,7 +146,7 @@ protected override async Task ExecuteJobAsync(IJobExecutionContext context)
146146

147147
var updateOptions = new SubscriptionUpdateOptions
148148
{
149-
ProrationBehavior = StripeConstants.ProrationBehavior.AlwaysInvoice,
149+
ProrationBehavior = StripeConstants.ProrationBehavior.CreateProrations,
150150
Metadata = new Dictionary<string, string>
151151
{
152152
[StripeConstants.MetadataKeys.StorageReconciled2025] = DateTime.UtcNow.ToString("o")

test/Billing.Test/Jobs/ReconcileAdditionalStorageJobTests.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -302,7 +302,7 @@ await _stripeFacade.Received(1).UpdateSubscription(
302302
#region Update Options Tests
303303

304304
[Fact]
305-
public async Task Execute_UpdateOptions_SetsProrationBehaviorToAlwaysInvoice()
305+
public async Task Execute_UpdateOptions_SetsProrationBehaviorToCreateProrations()
306306
{
307307
// Arrange
308308
var context = CreateJobExecutionContext();
@@ -322,7 +322,7 @@ public async Task Execute_UpdateOptions_SetsProrationBehaviorToAlwaysInvoice()
322322
// Assert
323323
await _stripeFacade.Received(1).UpdateSubscription(
324324
"sub_123",
325-
Arg.Is<SubscriptionUpdateOptions>(o => o.ProrationBehavior == "always_invoice"));
325+
Arg.Is<SubscriptionUpdateOptions>(o => o.ProrationBehavior == StripeConstants.ProrationBehavior.CreateProrations));
326326
}
327327

328328
[Fact]

0 commit comments

Comments
 (0)