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

[PM-8844] Families sponsorship line items bug #4440

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open
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
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
using Stripe;
using Bit.Core.Models.Business;
using Stripe;

namespace Bit.Core.Models.Business;
namespace Bit.Core.Billing.Models.Business;

public class SponsorOrganizationSubscriptionUpdate : SubscriptionUpdate
{
Expand All @@ -9,10 +10,11 @@
private readonly bool _applySponsorship;
protected override List<string> PlanIds => new() { _existingPlanStripeId, _sponsoredPlanStripeId };

public SponsorOrganizationSubscriptionUpdate(StaticStore.Plan existingPlan, StaticStore.SponsoredPlan sponsoredPlan, bool applySponsorship)
public SponsorOrganizationSubscriptionUpdate(Core.Models.StaticStore.Plan existingPlan, Core.Models.StaticStore.SponsoredPlan sponsoredPlan, bool applySponsorship)

Check warning on line 13 in src/Core/Billing/Models/Business/SponsorOrganizationSubscriptionUpdate.cs

View check run for this annotation

Codecov / codecov/patch

src/Core/Billing/Models/Business/SponsorOrganizationSubscriptionUpdate.cs#L13

Added line #L13 was not covered by tests
{
_existingPlanStripeId = existingPlan.PasswordManager.StripePlanId;
_sponsoredPlanStripeId = sponsoredPlan?.StripePlanId;
_sponsoredPlanStripeId = sponsoredPlan?.StripePlanId
?? Core.Utilities.StaticStore.SponsoredPlans.FirstOrDefault()?.StripePlanId;

Check warning on line 17 in src/Core/Billing/Models/Business/SponsorOrganizationSubscriptionUpdate.cs

View check run for this annotation

Codecov / codecov/patch

src/Core/Billing/Models/Business/SponsorOrganizationSubscriptionUpdate.cs#L17

Added line #L17 was not covered by tests
_applySponsorship = applySponsorship;
}

Expand Down
1 change: 1 addition & 0 deletions src/Core/Services/Implementations/StripePaymentService.cs
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
using Bit.Core.AdminConsole.Entities.Provider;
using Bit.Core.Billing.Constants;
using Bit.Core.Billing.Models;
using Bit.Core.Billing.Models.Business;
using Bit.Core.Entities;
using Bit.Core.Enums;
using Bit.Core.Exceptions;
Expand Down
Loading