Skip to content

Commit e47a1e8

Browse files
authored
Merge pull request killbill#650 from killbill/update-aviate-catalog-versioning-docs
Update Aviate catalog versioning behavior documentation
2 parents 0ef2c41 + 73f0a08 commit e47a1e8

File tree

1 file changed

+8
-8
lines changed

1 file changed

+8
-8
lines changed

userguide/aviate/aviate-catalog-plugin.adoc

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -35,20 +35,20 @@ Once the plugin is installed and enabled, you can start using the Catalog Plugin
3535

3636
Since the Kill Bill system internally manages catalog versions, the plugin will construct such multi-version catalog based on the entries that need to be returned.
3737

38-
Each plan stored within the Aviate catalog plugn has an associated `effectiveDate`. The catalog versions and what they each include is based on the `plan#effectiveDate`: A new version will be created every time there is a set of changes associated with an existing Plan (e.g. price change). When this happens, a new version is created, which also includes all the previous Plans.
38+
Each plan stored within the Aviate catalog plugin has an associated `effectiveDate`. The catalog versions and what they each include is based on the `plan#effectiveDate`: A new catalog version is created every time a plan is modified (e.g. price change). When this happens, a new version is created with the `effectiveDate` of the modified plan, and it also includes all the previous plans.
3939

40-
Assuming we have the following plans, Pa, Pb, Pc, and we create those at different times and modify those to allow for price changes, we get the following:
40+
Assuming we have plans p1, p2, p3, p4 that are created and modified at different times (using the prime notation to denote modifications, e.g. p1' is the first modification of p1), and given the following sequence of plan creations/updates: p1, p2, p3, p1', p2', p4, p2'', we get the following catalog versions:
4141

4242
[source,bash]
4343
----
44-
* T1: Create Pa -> 1 catalog version v1={Pa}
45-
* T2: Create Pb -> 1 catalog version v1={Pa, Pb}
46-
* T3: Modify Pa -> 2 catalog versions v1={Pa, Pb}, v2={Pa', Pb} // Pa' with the new price
47-
* T4: Create Pc -> 2 catalog versions v1={Pa, Pb}, v2={Pa', Pb, Pc} // Pa' with the new price
48-
* T5: Modify Pb -> 3 catalog versions v1={Pa, Pb}, v2={Pa', Pb, Pc}, v3={Pa', Pb', Pc} // Pa' and Pb' with the new price
49-
...
44+
v1: p1, p2, p3 # v1 effectiveDate = p1 effectiveDate
45+
v2: p1', p2, p3 # v2 effectiveDate = p1' effectiveDate
46+
v3: p1', p2', p3, p4 # v3 effectiveDate = p2' effectiveDate
47+
v4: p1', p2'', p3, p4 # v4 effectiveDate = p2'' effectiveDate
5048
----
5149

50+
Each plan modification triggers a new catalog version so that the `effectiveDate` of that version matches the `effectiveDate` of the modified plan. New plan creations (e.g. p4) are included in the most recent open version without creating a new one. If multiple plans are modified with the exact same `effectiveDate`, they will be grouped in the same catalog version.
51+
5252
== FAQs
5353

5454
*Is it possible to use the KB catalog APIs when the Aviate catalog plugin is enabled?*

0 commit comments

Comments
 (0)