From 6688195dce2af36ffbc23c2c7d1a380ad315229d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Pablo=20Andr=C3=A9s=20V=C3=A9lez=20Vidal?= Date: Wed, 21 Jul 2021 12:04:05 +0200 Subject: [PATCH] MM-37033 - update product model to match with customer web server (#17967) Co-authored-by: Pablo Velez Vidal --- model/cloud.go | 30 ++++++++++++++++++++++++------ 1 file changed, 24 insertions(+), 6 deletions(-) diff --git a/model/cloud.go b/model/cloud.go index 4fdbc29a5c..ffd85a2a55 100644 --- a/model/cloud.go +++ b/model/cloud.go @@ -24,14 +24,32 @@ const ( BillingSchemeFlatFee = BillingScheme("flat_fee") ) +type RecurringInterval string + +const ( + RecurringIntervalYearly = RecurringInterval("year") + RecurringIntervalMonthly = RecurringInterval("month") +) + +type SubscriptionFamily string + +const ( + SubscriptionFamilyCloud = SubscriptionFamily("cloud") + SubscriptionFamilyOnPrem = SubscriptionFamily("on-prem") +) + // Product model represents a product on the cloud system. type Product struct { - ID string `json:"id"` - Name string `json:"name"` - Description string `json:"description"` - PricePerSeat float64 `json:"price_per_seat"` - AddOns []*AddOn `json:"add_ons"` - BillingScheme BillingScheme `json:"billing_scheme"` + ID string `json:"id"` + Name string `json:"name"` + Description string `json:"description"` + PricePerSeat float64 `json:"price_per_seat"` + AddOns []*AddOn `json:"add_ons"` + SKU string `json:"sku"` + PriceID string `json:"price_id"` + Family SubscriptionFamily `json:"product_family"` + RecurringInterval RecurringInterval `json:"recurring_interval"` + BillingScheme BillingScheme `json:"billing_scheme"` } // AddOn represents an addon to a product.