-
Notifications
You must be signed in to change notification settings - Fork 2
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Refactor subscriptions as orders #65
Comments
Change all subscriptions to memberships, including the subscriptions table, all foreign keys, etc. refs #65
Change all subscriptions to memberships and references across models. refs #65
Change all subscriptions to memberships and references across each store. refs #65
Move the SubscriptionMapper to the MembershipMapper, and change all references to subscriptions as memberships. refs #65
modify the OrdersResource, QuotasResource, and UsagesResource to refer to subscriptions as memberships. refs #65
Rename the SubscriptionHelper to MembershipHelper, and update the QuotaHelper and UsageHelper to refer to subscriptions as memberships. refs #65
Refer to subscriptions as memberships in each test. refs #65
Memberships have owners now (vs subscribers), so reflect this in the quotas table as well since it is a copy of the identifier. refs #65
Subscriptions are now Memberships, and subscribers are owners. Note that a |
I was having some difficulties modeling a |
Associates a quota with an order for easier recognition. refs #65
Rename it back given it is the most appropriate name. It get's copied from Order.subject now, which can be a user or group. refs #65
As we use orders to represent subscriptions/memberships, delete the memberships SQL scripts, and add appropriate attributes to the quotas and orders tables. Renumber the scripts for flyway migrations. refs #65
Now that orders also represent a paid subscription, update the SQL SELECT statement to return quotas associated with a given order (if any, i.e. LEFT JOIN). In the interface SELECT methods, use the OrderMapper and the OrderQuotasReducer to populate the returned JSON object with an embedded quota list. For the INSERT and UPDATE operations, add the new properties that are now part of an order. refs #65
Change the reducer to produce an Order with a list of quotas if quotas are present in the result set. Otherwise, return a plain Order object. refs #65
Since the result set may include joined quotas, use table prefixes to identify columns, and add in the new Order properties to the mapper. refs #65
Insert test quotas with order identifiers rather than membership identifiers, and rename methods to use Orders. Add javadoc. Improve formatting. refs #65
Migrate the test methods to select, insert, update, and delete orders with new properties. Update SELECTs to optionally join quotas into the orders. Add Javadoc. Improve formatting. refs #65
Remove membership insertions. Also set the trialing status and transitions. refs #65
these are no longer needed with the simplified model where orders represent subscriptions. refs #65
Change all tests to build orders, insert orders, etc. refs #65
Change all tests to build orders, insert orders, etc. refs #65
This refactor is complete, and we are testing via the test deployment. We'll open new issues as needed. Closing this one. |
Change all subscriptions to memberships and references across models. refs DataONEorg/bookkeeper#65
Refer to subscriptions as memberships in each test. refs DataONEorg/bookkeeper#65
Associates a quota with an order for easier recognition. refs DataONEorg/bookkeeper#65
Rename it back given it is the most appropriate name. It get's copied from Order.subject now, which can be a user or group. refs DataONEorg/bookkeeper#65
Add the subject, name, seriesId, startDate, and endDate fields to the Order model in lieu of a subscription. Update the status enum to merge in Subscription status values. Add getters and setters for new fields, and update the equals() and hashcode() methods. Add JsonProperty annotations on methods as needed. refs DataONEorg/bookkeeper#65
Change the subscriptionId property to orderId, and update the getter and setter methods accordingly. refs DataONEorg/bookkeeper#65
these are no longer needed with the simplified model where orders represent subscriptions. refs DataONEorg/bookkeeper#65
Since we don't technically support ongoing
subscriptions
to services, merge them intoorders
throughout the code base. Also, changesubscribers
toowners
. Products are nowpurchased
as opposed tosubscribed
to.The text was updated successfully, but these errors were encountered: