Update billing account when setting customer zuora_account_id

Problem

As part of #4795 (closed) the UpdateBillingAccountService was introduced to find or create a billing account for the customer based on its zuora_account_id.

Basically every time the zuora_account_id is set for the customer we want to also call the UpdateBillingAccountService to keep the customer's associated billing account up to date. This includes when the zuora_account_id is set to nil.

Reference MRs that do this:

  • https://gitlab.com/gitlab-org/customers-gitlab-com/-/merge_requests/5810+
  • https://gitlab.com/gitlab-org/customers-gitlab-com/-/merge_requests/5808+
  • https://gitlab.com/gitlab-org/customers-gitlab-com/-/merge_requests/5811+

Proposal

Update the code within qa / quality that sets customer's zuora_account_id to also update the billing account in a similar way.

Some places that do this (might not be the entire set):

  • PostZuoraRefreshTask
  • OrderApiClient
  • QA::Resource::Subscription
Assignee Loading
Time tracking Loading