Port methods provided by IronBank to `Zuora::Local::RatePlanCharge`

Problem

In order to be able to use the local (Zuora::Local::RatePlanCharge) or remote (Zuora::Remote::RatePlanCharge) resource objects interchangeably based on a feature flag, we need to ensure these objects resemble each other as close as possible. This means that any attribute or method available to one class (the remote class) should be available to the other (the local class).

The Zuora::Remote::RatePlanCharge has instance and class methods provided via IronBank. These methods will need to be made available on the local resource.

Proposal

Let's define any instance or class method on Zuora::Local::RatePlanCharge provided via IronBank. These methods should behave similar to the methods available to Zuora::Remote::RatePlanCharge.

Here are some of the relationships defined in IronBank:

  • with_one :original, resource_name: "RatePlanCharge"
  • with_one :product_rate_plan_charge, alias: :catalog_charge
  • with_one :rate_plan, alias: :plan
  • with_many :rate_plan_charge_tiers, alias: :tiers

Perhaps not all of these relationships are used in CDot, and therefore wouldn't need to be ported. Others relationships may already be defined in the model.

Note: not adding with_one :product_rate_plan_charge, alias: :catalog_charge association as it's not being used in CDot

Edited Nov 01, 2024 by Tarun Vellishetty
Assignee Loading
Time tracking Loading