Commit cfd5bed
authored
[PM-31040] Replace
* docs(billing): add design document for replacing SetupIntent cache
* docs(billing): add implementation plan for replacing SetupIntent cache
* feat(db): add gateway lookup stored procedures for Organization, Provider, and User
* feat(db): add gateway lookup indexes to Organization, Provider, and User table definitions
* chore(db): add SQL Server migration for gateway lookup indexes and stored procedures
* feat(repos): add gateway lookup methods to IOrganizationRepository and Dapper implementation
* feat(repos): add gateway lookup methods to IProviderRepository and Dapper implementation
* feat(repos): add gateway lookup methods to IUserRepository and Dapper implementation
* feat(repos): add EF OrganizationRepository gateway lookup methods and index configuration
* feat(repos): add EF ProviderRepository gateway lookup methods and index configuration
* feat(repos): add EF UserRepository gateway lookup methods and index configuration
* chore(db): add EF migrations for gateway lookup indexes
* refactor(billing): update SetupIntentSucceededHandler to use repository instead of cache
* refactor(billing): simplify StripeEventService by expanding customer on SetupIntent
* refactor(billing): query Stripe for SetupIntents by customer ID in GetPaymentMethodQuery
* refactor(billing): query Stripe for SetupIntents by customer ID in HasPaymentMethodQuery
* refactor(billing): update OrganizationBillingService to set customer on SetupIntent
* refactor(billing): update ProviderBillingService to set customer on SetupIntent and query by customer
* refactor(billing): update UpdatePaymentMethodCommand to set customer on SetupIntent
* refactor(billing): remove bank account support from CreatePremiumCloudHostedSubscriptionCommand
* refactor(billing): remove OrganizationBillingService.UpdatePaymentMethod dead code
* refactor(billing): remove ProviderBillingService.UpdatePaymentMethod
* refactor(billing): remove PremiumUserBillingService.UpdatePaymentMethod and UserService.ReplacePaymentMethodAsync
* refactor(billing): remove SubscriberService.UpdatePaymentSource and related dead code
* refactor(billing): update SubscriberService.GetPaymentSourceAsync to query Stripe by customer ID
Add Task 15a to plan - this was a missed requirement for updating
GetPaymentSourceAsync which still used the cache.
* refactor(billing): complete removal of PremiumUserBillingService.Finalize and UserService.SignUpPremiumAsync
* refactor(billing): remove ISetupIntentCache and SetupIntentDistributedCache
* chore: remove temporary planning documents
* chore: run dotnet format
* fix(billing): add MaxLength(50) to Provider gateway ID properties
* chore(db): add EF migrations for Provider gateway column lengths
* chore: run dotnet format
* chore: rename SQL migration for chronological orderISetupIntentCache with customer-based approach (#6954)1 parent 2ce9827 commit cfd5bed
File tree
69 files changed
+22547
-1891
lines changed- bitwarden_license
- src/Commercial.Core/Billing/Providers/Services
- test/Commercial.Core.Test/Billing/Providers/Services
- src
- Billing/Services/Implementations
- Core
- AdminConsole
- Entities/Provider
- Repositories
- Billing
- Caches
- Implementations
- Extensions
- Organizations/Services
- Payment
- Commands
- Queries
- Premium/Commands
- Providers/Services
- Services
- Implementations
- Repositories
- Services
- Implementations
- Utilities
- Infrastructure.Dapper
- AdminConsole/Repositories
- Repositories
- Infrastructure.EntityFramework
- AdminConsole
- Configurations
- Repositories
- Configurations
- Repositories
- Sql/dbo
- Stored Procedures
- Tables
- test
- Billing.Test/Services
- Core.Test/Billing
- Payment
- Commands
- Queries
- Premium/Commands
- Services
- util
- Migrator/DbScripts
- MySqlMigrations/Migrations
- PostgresMigrations/Migrations
- Seeder/Data/Static
- SqliteMigrations/Migrations
Some content is hidden
Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.
69 files changed
+22547
-1891
lines changedLines changed: 19 additions & 28 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
9 | 9 | | |
10 | 10 | | |
11 | 11 | | |
12 | | - | |
13 | 12 | | |
14 | 13 | | |
15 | 14 | | |
16 | | - | |
17 | 15 | | |
18 | 16 | | |
19 | 17 | | |
20 | 18 | | |
21 | 19 | | |
22 | 20 | | |
23 | 21 | | |
24 | | - | |
25 | 22 | | |
26 | 23 | | |
27 | 24 | | |
| |||
51 | 48 | | |
52 | 49 | | |
53 | 50 | | |
54 | | - | |
55 | 51 | | |
56 | 52 | | |
57 | 53 | | |
| |||
518 | 514 | | |
519 | 515 | | |
520 | 516 | | |
| 517 | + | |
521 | 518 | | |
522 | 519 | | |
523 | 520 | | |
| |||
539 | 536 | | |
540 | 537 | | |
541 | 538 | | |
542 | | - | |
| 539 | + | |
543 | 540 | | |
544 | 541 | | |
545 | 542 | | |
| |||
558 | 555 | | |
559 | 556 | | |
560 | 557 | | |
561 | | - | |
| 558 | + | |
| 559 | + | |
| 560 | + | |
| 561 | + | |
| 562 | + | |
| 563 | + | |
| 564 | + | |
| 565 | + | |
| 566 | + | |
562 | 567 | | |
563 | 568 | | |
564 | 569 | | |
| |||
577 | 582 | | |
578 | 583 | | |
579 | 584 | | |
580 | | - | |
| 585 | + | |
581 | 586 | | |
582 | | - | |
583 | 587 | | |
584 | 588 | | |
585 | | - | |
586 | 589 | | |
587 | 590 | | |
588 | 591 | | |
| |||
635 | 638 | | |
636 | 639 | | |
637 | 640 | | |
638 | | - | |
| 641 | + | |
| 642 | + | |
| 643 | + | |
| 644 | + | |
| 645 | + | |
639 | 646 | | |
640 | | - | |
641 | | - | |
642 | | - | |
643 | | - | |
| 647 | + | |
644 | 648 | | |
645 | 649 | | |
646 | 650 | | |
647 | 651 | | |
648 | | - | |
| 652 | + | |
649 | 653 | | |
650 | 654 | | |
651 | 655 | | |
| |||
699 | 703 | | |
700 | 704 | | |
701 | 705 | | |
702 | | - | |
703 | | - | |
704 | | - | |
705 | | - | |
706 | | - | |
707 | | - | |
708 | | - | |
709 | | - | |
710 | | - | |
711 | | - | |
712 | | - | |
713 | | - | |
714 | | - | |
715 | 706 | | |
716 | 707 | | |
717 | 708 | | |
| |||
Lines changed: 9 additions & 17 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
6 | 6 | | |
7 | 7 | | |
8 | 8 | | |
9 | | - | |
10 | 9 | | |
11 | 10 | | |
12 | 11 | | |
| |||
934 | 933 | | |
935 | 934 | | |
936 | 935 | | |
937 | | - | |
938 | | - | |
939 | 936 | | |
940 | 937 | | |
941 | 938 | | |
942 | | - | |
943 | | - | |
944 | 939 | | |
945 | 940 | | |
946 | | - | |
947 | | - | |
948 | 941 | | |
949 | 942 | | |
950 | 943 | | |
| |||
1031 | 1024 | | |
1032 | 1025 | | |
1033 | 1026 | | |
1034 | | - | |
| 1027 | + | |
| 1028 | + | |
1035 | 1029 | | |
1036 | 1030 | | |
1037 | 1031 | | |
| |||
1532 | 1526 | | |
1533 | 1527 | | |
1534 | 1528 | | |
1535 | | - | |
1536 | | - | |
1537 | | - | |
1538 | | - | |
1539 | | - | |
1540 | | - | |
1541 | | - | |
| 1529 | + | |
| 1530 | + | |
| 1531 | + | |
| 1532 | + | |
1542 | 1533 | | |
1543 | | - | |
| 1534 | + | |
1544 | 1535 | | |
1545 | 1536 | | |
1546 | 1537 | | |
| |||
1550 | 1541 | | |
1551 | 1542 | | |
1552 | 1543 | | |
1553 | | - | |
| 1544 | + | |
| 1545 | + | |
1554 | 1546 | | |
1555 | 1547 | | |
1556 | 1548 | | |
| |||
Lines changed: 13 additions & 8 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
3 | 3 | | |
4 | | - | |
5 | 4 | | |
6 | 5 | | |
7 | 6 | | |
| |||
11 | 10 | | |
12 | 11 | | |
13 | 12 | | |
| 13 | + | |
14 | 14 | | |
15 | 15 | | |
16 | 16 | | |
17 | | - | |
18 | 17 | | |
19 | 18 | | |
20 | 19 | | |
| |||
27 | 26 | | |
28 | 27 | | |
29 | 28 | | |
| 29 | + | |
30 | 30 | | |
31 | 31 | | |
32 | 32 | | |
| 33 | + | |
33 | 34 | | |
34 | 35 | | |
35 | 36 | | |
36 | | - | |
37 | | - | |
| 37 | + | |
| 38 | + | |
38 | 39 | | |
| 40 | + | |
39 | 41 | | |
40 | 42 | | |
41 | 43 | | |
42 | | - | |
43 | | - | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
44 | 50 | | |
45 | | - | |
46 | | - | |
| 51 | + | |
47 | 52 | | |
48 | 53 | | |
49 | 54 | | |
| |||
Lines changed: 1 addition & 45 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | | - | |
3 | | - | |
4 | | - | |
5 | 2 | | |
6 | 3 | | |
7 | 4 | | |
8 | 5 | | |
9 | 6 | | |
10 | 7 | | |
11 | 8 | | |
12 | | - | |
13 | | - | |
14 | | - | |
15 | | - | |
16 | 9 | | |
17 | 10 | | |
18 | 11 | | |
| |||
117 | 110 | | |
118 | 111 | | |
119 | 112 | | |
120 | | - | |
| 113 | + | |
121 | 114 | | |
122 | 115 | | |
123 | 116 | | |
| |||
144 | 137 | | |
145 | 138 | | |
146 | 139 | | |
147 | | - | |
148 | | - | |
149 | | - | |
150 | | - | |
151 | | - | |
152 | | - | |
153 | | - | |
154 | | - | |
155 | | - | |
156 | | - | |
157 | | - | |
158 | | - | |
159 | | - | |
160 | | - | |
161 | | - | |
162 | | - | |
163 | | - | |
164 | | - | |
165 | | - | |
166 | | - | |
167 | | - | |
168 | | - | |
169 | | - | |
170 | | - | |
171 | | - | |
172 | | - | |
173 | | - | |
174 | | - | |
175 | | - | |
176 | | - | |
177 | | - | |
178 | | - | |
179 | | - | |
180 | | - | |
181 | | - | |
182 | | - | |
183 | | - | |
184 | 140 | | |
185 | 141 | | |
186 | 142 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | | - | |
| 1 | + | |
| 2 | + | |
2 | 3 | | |
3 | 4 | | |
4 | 5 | | |
| |||
33 | 34 | | |
34 | 35 | | |
35 | 36 | | |
| 37 | + | |
36 | 38 | | |
| 39 | + | |
37 | 40 | | |
38 | 41 | | |
39 | 42 | | |
| |||
Lines changed: 2 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
9 | 9 | | |
10 | 10 | | |
11 | 11 | | |
| 12 | + | |
| 13 | + | |
12 | 14 | | |
13 | 15 | | |
14 | 16 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
8 | 8 | | |
9 | 9 | | |
10 | 10 | | |
| 11 | + | |
| 12 | + | |
11 | 13 | | |
12 | 14 | | |
13 | 15 | | |
| |||
This file was deleted.
0 commit comments