Render all products/charges of a bundled SKU in provision emails

Problem

When a bundled SKU is purchased, the provision emails only list the info of rate plan of the bundled SKU. The charges of the rate plan are not rendered. When considering a Dedicated or Amazon Q subscription, the charges include important product information.

Proposal

Render the charges of bundled SKUs in the provision emails. The charges could be added in another key (e.g. charges) for a purchased product's info. The following classes have to be modified for this:

  • app/services/orders/rate_plan_info/calculate_diff_from_order_service.rb
  • app/services/subscriptions/rate_plans_info/consolidate_rate_plans_service.rb
  • app/services/subscriptions/rate_plans_info/calculate_diff_from_previous_service.rb

The charges key then has to be rendered in the following partials to apply the change to all provision emails:

  • app/views/shared/mailer/_purchased_products_and_subscription_info.html.haml
  • app/views/shared/mailer/_purchased_products_and_subscription_info.text.erb
  • app/views/shared/mailer/_purchased_products_info.html.haml
  • app/views/shared/mailer/_purchased_products_info.text.erb

Result

Render more details about a purchased bundled SKU than just the rate plan info.