diff --git a/openapi/components/schemas/OneTimeSalePlan.yaml b/openapi/components/schemas/OneTimeSalePlan.yaml index 784d497044..4b8e2c2b8e 100644 --- a/openapi/components/schemas/OneTimeSalePlan.yaml +++ b/openapi/components/schemas/OneTimeSalePlan.yaml @@ -48,20 +48,7 @@ properties: pricing: $ref: ./PlanPriceFormula.yaml setup: - type: - - 'object' - - 'null' - description: Set up information of the plan. - required: - - price - properties: - price: - description: |- - Price of setting up the plan. - If your service charges a set up fee, specify it here. - To charge no set up fee, set this value to `0`. - type: number - format: double + $ref: ./PlanSetup.yaml customFields: $ref: ./ResourceCustomFields.yaml isActive: diff --git a/openapi/components/schemas/PlanSetup.yaml b/openapi/components/schemas/PlanSetup.yaml new file mode 100644 index 0000000000..bdfcfd0a93 --- /dev/null +++ b/openapi/components/schemas/PlanSetup.yaml @@ -0,0 +1,14 @@ +type: + - 'object' + - 'null' +description: Set up information of the plan. +required: + - price +properties: + price: + description: |- + Price of setting up the plan. + If your service charges a set up fee, specify it here. + To charge no set up fee, set this value to `0`. + type: number + format: double diff --git a/openapi/components/schemas/PlanTrial.yaml b/openapi/components/schemas/PlanTrial.yaml new file mode 100644 index 0000000000..ebfbce07b7 --- /dev/null +++ b/openapi/components/schemas/PlanTrial.yaml @@ -0,0 +1,32 @@ +type: + - 'object' +required: + - price + - period +properties: + price: + description: |- + Price of setting up a trial. + If your service charges a fee for a trial, specify it here. + To charge no trial fee, set this value to `0`. + type: number + format: double + period: + type: object + description: Period information. + required: + - unit + - length + properties: + unit: + description: Unit of time. + type: string + enum: + - day + - week + - month + - year + length: + description: Length of time. + type: integer + minimum: 1 diff --git a/openapi/components/schemas/StorefrontPlan.yaml b/openapi/components/schemas/StorefrontPlan.yaml index 93cb1ec27a..a2b667ae2d 100644 --- a/openapi/components/schemas/StorefrontPlan.yaml +++ b/openapi/components/schemas/StorefrontPlan.yaml @@ -50,20 +50,7 @@ properties: pricing: $ref: ./PlanPriceFormula.yaml setup: - type: - - 'object' - - 'null' - description: Set up information of the plan. - required: - - price - properties: - price: - description: |- - Price of setting up the plan. - If your service charges a set up fee, specify it here. - To charge no set up fee, set this value to `0`. - type: number - format: double + $ref: ./PlanSetup.yaml customFields: $ref: ./ResourceCustomFields.yaml isActive: diff --git a/openapi/components/schemas/SubscriptionPlan.yaml b/openapi/components/schemas/SubscriptionPlan.yaml index 63a19c9928..968e2c8cd7 100644 --- a/openapi/components/schemas/SubscriptionPlan.yaml +++ b/openapi/components/schemas/SubscriptionPlan.yaml @@ -49,20 +49,7 @@ properties: pricing: $ref: ./PlanPriceFormula.yaml setup: - type: - - 'object' - - 'null' - description: Set up information of the plan. - required: - - price - properties: - price: - description: |- - Price of setting up the plan. - If your service charges a set up fee, specify it here. - To charge no set up fee, set this value to `0`. - type: number - format: double + $ref: ./PlanSetup.yaml customFields: $ref: ./ResourceCustomFields.yaml isActive: @@ -123,41 +110,12 @@ properties: - prepaid - postpaid trial: - type: - - 'object' - - 'null' description: |- Trial configuration setting. If you do not want to offer a trial, set this value to `null`. - required: - - price - - period - properties: - price: - description: |- - Price of the trial. - For a free trial, set this value to `0`. - type: number - format: double - period: - type: object - description: Period information. - required: - - unit - - length - properties: - unit: - description: Unit of time. - type: string - enum: - - day - - week - - month - - year - length: - description: Length of time. - type: integer - minimum: 1 + oneOf: + - $ref: ./PlanTrial.yaml + - type: 'null' meteredBilling: type: - 'object' diff --git a/openapi/components/schemas/TrialOnlyPlan.yaml b/openapi/components/schemas/TrialOnlyPlan.yaml index d81277caee..6f2a4e6e8a 100644 --- a/openapi/components/schemas/TrialOnlyPlan.yaml +++ b/openapi/components/schemas/TrialOnlyPlan.yaml @@ -52,20 +52,7 @@ properties: pricing: $ref: ./PlanPriceFormula.yaml setup: - type: - - 'object' - - 'null' - description: Set up information of the plan. - required: - - price - properties: - price: - description: |- - Price of setting up the plan. - If your service charges a set up fee, specify it here. - To charge no set up fee, set this value to `0`. - type: number - format: double + $ref: ./PlanSetup.yaml customFields: $ref: ./ResourceCustomFields.yaml isActive: @@ -83,38 +70,8 @@ properties: description: Specifies if a plan is a trial that does not have recurring instructions. readOnly: true trial: - type: object description: Trial configuration settings. - required: - - price - - period - properties: - price: - description: |- - Price of setting up a trial. - If your service charges a fee for a trial, specify it here. - To charge no trial fee, set this value to `0`. - type: number - format: double - period: - type: object - description: Period information. - required: - - unit - - length - properties: - unit: - description: Unit of time. - type: string - enum: - - day - - week - - month - - year - length: - description: Length of time. - type: integer - minimum: 1 + $ref: ./PlanTrial.yaml invoiceTimeShift: description: |- Use invoice time shift to adjust the invoice issue and due date when billing must occur before the service period changes.