Update references of `Zuora::Remote::RatePlanCharge` with `Zuora::RatePlanCharge` as needed
Problem
In Interface class for `Zuora::RatePlanCharge` (&13681 - closed), we have been adding more class and instance methods to Zuora::Local::RatePlanCharge so that it closely resembles Zuora::Remote::RatePlanCharge. Now we are at a point where we want to start using the Zuora::Local::RatePlanCharge when and where it makes sense. We should be able to do that referencing Zuora::RatePlanCharge, instead of Zuora::Remote::RatePlanCharge.
Proposal
Let's update references of Zuora::Remote::RatePlanCharge with Zuora::RatePlanCharge as needed throughout the code. We should ensure in the places that are now using Zuora::RatePlanCharge, the methods are available in Zuora::RatePlanCharge and/or Zuora::Local::RatePlanCharge.
There may be places where we always want to fetch from the remote resource, for example, in the syncing service. In these places we can continue to use Zuora::Remote::RatePlanCharge.
| file | notes |
|---|---|
| app/models/subscription.rb | Updating in https://gitlab.com/gitlab-org/customers-gitlab-com/-/merge_requests/11209 |
| app/finders/subscriptions/with_complete_rate_plans_finder.rb | Updated in https://gitlab.com/gitlab-org/customers-gitlab-com/-/merge_requests/11110 |
| app/jobs/zuora_callout/order_processed_job.rb | Callout processing |
| app/services/zuora/synchronizers/rate_plan_charge_synchronizer.rb | Resource sync from zuora |
| app/services/zuora/synchronizers/resource_synchronizer.rb | Resource sync from zuora |
| app/services/subscriptions/rate_plan_builder.rb | To be updated in #9467 (closed) |
| lib/tasks/data_maintenance/backfill_rate_plan_charge_tier_updated_decimal_values.rake | Onetime backfill task |
| lib/tasks/data_maintenance/backfill_rate_plan_charge_updated_decimal_values.rake | Onetime backfill task |
| lib/tasks/data_maintenance/backfill_rate_plan_charges_that_are_not_last_segment.rake | Onetime backfill task |