Skip to content

Commit

Permalink
Added Chargebee adapter. #4
Browse files Browse the repository at this point in the history
  • Loading branch information
jezzsantos committed Jul 15, 2024
1 parent f56162a commit da11916
Show file tree
Hide file tree
Showing 48 changed files with 6,866 additions and 3 deletions.
12 changes: 12 additions & 0 deletions src/ApiHost1/appsettings.json
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,18 @@
"AesSecret": "V7z5SZnhHRa7z68adsvazQjeIbSiWWcR+4KuAUikhe0=::u4ErEVotb170bM8qKWyT8A=="
}
},
"Chargebee": {
"BaseUrl": "https://localhost:5656/chargebee/",
"ApiKey": "anapikey",
"SiteName": "asitename",
"ProductFamilyId": "afamilyid",
"Plans": {
"StartingPlanId": "apaidtrial",
"Tier1PlanIds": "apaidtrial",
"Tier2PlanIds": "apaid2",
"Tier3PlanIds": "apaid3"
}
},
"Flagsmith": {
"BaseUrl": "https://localhost:5656/flagsmith/",
"EnvironmentKey": ""
Expand Down
8 changes: 7 additions & 1 deletion src/Application.Services.Shared/IBillingGatewayService.cs
Original file line number Diff line number Diff line change
Expand Up @@ -112,16 +112,20 @@ public class TransferSubscriptionOptions
/// </summary>
public class SubscribeOptions
{
public static readonly SubscribeOptions Immediately = new()
public static SubscribeOptions Immediately => new()
{
StartWhen = StartSubscriptionSchedule.Immediately,
FutureTime = null,
#if TESTINGONLY
PlanId = null
#endif
};

public DateTime? FutureTime { get; set; }
#if TESTINGONLY

public string? PlanId { get; set; }
#endif

public StartSubscriptionSchedule StartWhen { get; set; }

Expand All @@ -131,7 +135,9 @@ public static SubscribeOptions AtScheduledTime(DateTime time)
{
StartWhen = StartSubscriptionSchedule.Scheduled,
FutureTime = time,
#if TESTINGONLY
PlanId = null
#endif
};
}
}
Expand Down

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,9 @@
"RootPath": "./saastack/testing/external"
}
},
"Chargebee": {
"TODO": "You need to provide settings to a real 'testingonly' instance of Chargebee here, or in appsettings.Testing,local.json"
},
"Flagsmith": {
"TODO": "You need to provide settings to a real 'testingonly' instance of Flagsmith here, or in appsettings.Testing,local.json",
"BaseUrl": "https://edge.api.flagsmith.com/api/v1/",
Expand Down

Large diffs are not rendered by default.

Loading

0 comments on commit da11916

Please sign in to comment.