MM-37033 - update product model to match with customer web server (#17967)

Co-authored-by: Pablo Velez Vidal <pablo.velez@mattermost.com>
Этот коммит содержится в:
Pablo Andrés Vélez Vidal
2021-07-21 12:04:05 +02:00
коммит произвёл GitHub
родитель 959834aefa
Коммит 6688195dce

Просмотреть файл

@@ -24,6 +24,20 @@ const (
BillingSchemeFlatFee = BillingScheme("flat_fee") 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. // Product model represents a product on the cloud system.
type Product struct { type Product struct {
ID string `json:"id"` ID string `json:"id"`
@@ -31,6 +45,10 @@ type Product struct {
Description string `json:"description"` Description string `json:"description"`
PricePerSeat float64 `json:"price_per_seat"` PricePerSeat float64 `json:"price_per_seat"`
AddOns []*AddOn `json:"add_ons"` 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"` BillingScheme BillingScheme `json:"billing_scheme"`
} }