From 0899a1db7c0bd2dae722e5aed22a9d520e180fcc Mon Sep 17 00:00:00 2001 From: Lucas de Oliveira Date: Thu, 29 Feb 2024 17:32:34 -0300 Subject: [PATCH] Add meteredBilling field to StorefrontPlan (#1815) --- .../components/schemas/StorefrontPlan.yaml | 33 +++++++++++++++++++ 1 file changed, 33 insertions(+) diff --git a/openapi/components/schemas/StorefrontPlan.yaml b/openapi/components/schemas/StorefrontPlan.yaml index 3951ee6c31..93cb1ec27a 100644 --- a/openapi/components/schemas/StorefrontPlan.yaml +++ b/openapi/components/schemas/StorefrontPlan.yaml @@ -112,6 +112,39 @@ properties: description: Length of time. type: integer minimum: 1 + meteredBilling: + type: + - 'object' + - 'null' + required: + - strategy + description: |- + Use metered billing when an exact quantity is unknown. + Report usage during a service period and charge customers afterwards. + Metered billing plans must be postpaid. + properties: + strategy: + type: string + enum: + - sum + - last + x-enumDescriptions: + sum: Total amount of reported invoice item quantity usage. + last: Last reported invoice item quantity usage. + min: + description: Minimum quantity that is charged at the end of a service period regardless of reported usage. + type: + - 'number' + - 'null' + format: float + minimum: 0.01 + max: + description: Maximum quantity that is charged at the end of a service period regardless of reported usage. + type: + - 'number' + - 'null' + format: float + minimum: 0.01 createdTime: $ref: ./CreatedTime.yaml updatedTime: