Skip to content
This repository has been archived by the owner on Mar 20, 2018. It is now read-only.

Commit

Permalink
decimal allocations
Browse files Browse the repository at this point in the history
  • Loading branch information
npverni committed Feb 18, 2015
1 parent 33cbc10 commit e8feeb6
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 2 deletions.
4 changes: 2 additions & 2 deletions doculab/docs/api-allocations.textile
Expand Up @@ -65,7 +65,7 @@ Creates a new Allocation, setting the current allocated quantity for the compone

h4. Input Fields

| @quantity@ | The allocated quantity to which to set the line-items allocated quantity. This should always be an integer. For On/Off components, use @1@ for on and @0@ for off. |
| @quantity@ | The allocated quantity to which to set the line-items allocated quantity. By default, this is an integer. If decimal allocations are enabled for the component, it will be a decimal number. For On/Off components, use @1@ for on and @0@ for off. |
| @memo@ | (optional) A memo to record along with the allocation |
| @proration_upgrade_scheme@ | (optional) The scheme used if the proration is an upgrade. Defaults to the site setting if one is not provided. |
| @proration_downgrade_scheme@ | (optional) The scheme used if the proration is a downgrade. Defaults to the site setting if one is not provided. |
Expand Down Expand Up @@ -108,7 +108,7 @@ An array of allocation objects with the following fields:

| @component_id@ | The integer component ID for the allocation. This references a component that you have created in your Product setup |
| @subscription_id@ | The integer subscription ID for the allocation. This references a unique subscription in your Site |
| @quantity@ | The allocated quantity set in to effect by the allocation. This should always be an integer. For On/Off components, use @1@ for on and @0@ for off. |
| @quantity@ | The allocated quantity set in to effect by the allocation.By default this should be an integer. If decimal allocations are enabled for the component, it will be a decimal number. For On/Off components, use @1@ for on and @0@ for off. |
| @previous_quantity@ | The allocated quantity that was in effect before this allocation was created |
| @memo@ | The memo passed when the allocation was created |
| @proration_upgrade_scheme@ | The scheme used if the proration was an upgrade. This is only present when the allocation was created mid-period. |
Expand Down
7 changes: 7 additions & 0 deletions doculab/docs/product-components.textile
Expand Up @@ -108,6 +108,10 @@ If 10 units are allocated (i.e. 10 paying customers), then the cost would be $10

If 20 units are allocated, then the cost would be $20 total for this component.

h4. Fractional Allocations

Quantity component allocations are represented as whole numbers by default (i.e. 5 Licenses). Checking 'Allow fractional quantities' setting will allow you to allocate partrial quantities (i.e 4.5 Minutes). API representations of this component will return a decimal instead of an integer for the quantity values.

h3. Creating Metered Components

Choose to create a "Metered Component" and define it using the form.
Expand All @@ -131,6 +135,9 @@ An On/Off Component consists of 3 pieces of information:
Once you have created an On/Off Component, it will appear under the Product Family on the Products tab. You can make changes to the component by clicking the 'Edit' link.


h4. Fractional Usages

Metered component usages are represented as whole numbers by default (i.e. 5 Licenses). Checking 'Allow fractional quantities' setting will allow you to allocate partrial quantities (i.e 4.5 Minutes). API representations of this component will return a decimal instead of an integer for the quantity values.

h2. Setting Component allocations on Subscriptions

Expand Down

0 comments on commit e8feeb6

Please sign in to comment.