Uploaded image for project: 'Subscription Watch'
  1. Subscription Watch
  2. SWATCH-1509

Refactor billingCategory to use contract information

XMLWordPrintable

    • False
    • Hide

      None

      Show
      None
    • False
    • BIZ-610 - ROSA-HCP

      As a swatch developer, I want to simplify the calculation of tally values for billingCategory, so that I can avoid edge cases with retallies that make is impossible to provide a useful value.

      First, applicable contract capacity should be fetched via the customer-facing capacity endpoint (/api/rhsm-subscriptions/v1/capacity/products/{product_id}/{metric_id} endpoint). This will require generation of a client to call the capacity API from TallyResource. (Implemented this way to avoid unnecessary coupling of tally and capacity API implementations). The client should re-use the x-rh-identity used to call TallyResource endpoints.

      When billingCategory is prepaid, the value should be (pseudo-code):

      min(snapshotValue, contractCapacity) 

      When billingCategory is on-demand, the value should be (pseudo-code):

      max(snapshotValue - contractCapacity, 0)

       

      QE automation work tracked in SWatch-1526

              mstead@redhat.com Michael Stead
              khowell@redhat.com Kevin Howell
              Trayvon McKnight Trayvon McKnight
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

                Created:
                Updated:
                Resolved: