iron-bound-designs / exchange-addon-licensing

iThemes Exchange Licensing Add-on
GNU Affero General Public License v3.0
6 stars 2 forks source link

Support for Bulk Products in the Future #26

Closed TimothyBJacobs closed 9 years ago

TimothyBJacobs commented 9 years ago

Although bulk products are not yet a think in Exchange, we should plan to be able to support bulk products in the future. There are two mechanisms in which this could work.

  1. Generate a separate license key for each product in the bundle.
  2. Generate a single license key for the bundled product, that can be used for all products.
TimothyBJacobs commented 9 years ago

Option 1

This is the simplest by far. We just treat the license keys as normal, and whenever any events happen to the bulk product, we apply them to all of the bundle's products.

Option 2

This would be a bit more difficult. We'd have to add an additional parameter, product ID, to the following API endpoints: version, product, download. We would track the activations against the bundled product.

An additional complication would be the API. For optimal compatibility, we'd want for a user to be able to enter either a bulk license, or a single license without knowing whether or not they were using a bulk key. This would mean that API clients would need to always pass the product ID they are using. This isn't the most annoying thing, but is a bit disappointing.

Additionally, we'd have to think about what the response would be for a request at the previously mentioned API endpoints when querying using a bundled product ID, instead of one of the sub-products. This makes me think that we should represent all responses in a list format with the product IDs as keys. One a non-bundled product, it'd just return a list of one element.

TimothyBJacobs commented 9 years ago

Implemented endpoints as lists.