Merge pull request #29982 from overleaf/ls-group-ownership-transfer
Stripe subscription ownership transfer GitOrigin-RevId: 8285f635ecc220595782fbea6def74fdc9a92f36
This commit is contained in:
@@ -4,6 +4,30 @@ import { TeamInviteSchema } from './TeamInvite.mjs'
|
||||
const { Schema } = mongoose
|
||||
const { ObjectId } = Schema
|
||||
|
||||
const PaymentProvider = {
|
||||
service: {
|
||||
type: String,
|
||||
},
|
||||
subscriptionId: {
|
||||
type: String,
|
||||
},
|
||||
state: {
|
||||
type: String,
|
||||
},
|
||||
pausePeriodStart: {
|
||||
type: Date,
|
||||
},
|
||||
pausePeriodEnd: {
|
||||
type: Date,
|
||||
},
|
||||
trialStartedAt: {
|
||||
type: Date,
|
||||
},
|
||||
trialEndsAt: {
|
||||
type: Date,
|
||||
},
|
||||
}
|
||||
|
||||
export const SubscriptionSchema = new Schema(
|
||||
{
|
||||
admin_id: {
|
||||
@@ -68,29 +92,8 @@ export const SubscriptionSchema = new Schema(
|
||||
type: Date,
|
||||
},
|
||||
},
|
||||
paymentProvider: {
|
||||
service: {
|
||||
type: String,
|
||||
},
|
||||
subscriptionId: {
|
||||
type: String,
|
||||
},
|
||||
state: {
|
||||
type: String,
|
||||
},
|
||||
pausePeriodStart: {
|
||||
type: Date,
|
||||
},
|
||||
pausePeriodEnd: {
|
||||
type: Date,
|
||||
},
|
||||
trialStartedAt: {
|
||||
type: Date,
|
||||
},
|
||||
trialEndsAt: {
|
||||
type: Date,
|
||||
},
|
||||
},
|
||||
paymentProvider: PaymentProvider,
|
||||
previousPaymentProvider: PaymentProvider,
|
||||
collectionMethod: {
|
||||
type: String,
|
||||
enum: ['automatic', 'manual'],
|
||||
|
||||
Reference in New Issue
Block a user