Creation of the BillingAccountContact model

This issue is part of the creation and implementation of the BillingAccountContact model to cache the "Bill to" and "Sold to" Zuora contacts:

  1. Rename current BillingAccountContact helper class (closed)
  2. Creation of the BillingAccountContact model 👈 You are here
  3. Implementation of BillingAccountContact and sync with Zuora
  4. Data backfill for existing BillingAccount objects

Proposal

This issue tracks effort related to the creation of the BillingAccountContact model. This model will hold Zuora::Contact data as well as the zuora_contact_id related to the object we want to save.

A BillingAccountContact object will ultimately be the SSOT for customer contact details, which means that contact detail fields in Customer should also be present in BillingAccountContact (we may want to be consistent with the new Presenter introduced via this MR).

BillingAccountContact objects will only be created to hold Bill to and Sold to contact data, given a BillingAccount object. This means that BillingAccount#sold_to and BillingAccount#bill_to references will have to be added: this mimics the architecture behind Zuora::Account (ie. access of these contact objects via zuora_account.bill_to and zuora_account.sold_to, even if they are the same object (which is often the case))

Work on this issue should not be about implementation.

Result

Passing tests.

Edited Apr 05, 2023 by Etienne Baqué
Assignee Loading
Time tracking Loading