The core infrastructure backend (API, database, Docker, etc).
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 

18 lines
709 B

using Bit.Core.Billing.Payment.Models;
using Stripe;
namespace Bit.Core.Test.Billing.Extensions;
public static class StripeExtensions
{
public static bool HasExpansions(this BaseOptions options, params string[] expansions)
=> expansions.All(expansion => options.Expand.Contains(expansion));
public static bool Matches(this AddressOptions address, BillingAddress billingAddress) =>
address.Country == billingAddress.Country &&
address.PostalCode == billingAddress.PostalCode &&
address.Line1 == billingAddress.Line1 &&
address.Line2 == billingAddress.Line2 &&
address.City == billingAddress.City &&
address.State == billingAddress.State;
}