function serializeTier(tier, options) {
    const json = tier.toJSON(options);

    const serialized = {
        id: json.id,
        name: json.name,
        description: json.description,
        slug: json.slug,
        active: json.status === 'active',
        type: json.type,
        welcome_page_url: json.welcomePageURL,
        created_at: json.createdAt,
        updated_at: json.updatedAt,
        visibility: json.visibility,
        benefits: json.benefits,
        currency: json.currency,
        monthly_price: json.monthlyPrice,
        yearly_price: json.yearlyPrice,
        trial_days: json.trialDays
    };

    if (!Array.isArray(serialized.benefits)) {
        serialized.benefits = null;
    }

    if (serialized.type === 'free') {
        delete serialized.currency;
        delete serialized.monthly_price;
        delete serialized.yearly_price;
    }

    return serialized;
}
@param {import('bookshelf').Model} tier
@param {object} options

@returns {SerializedTier}