Rep Purchase 
Describes something that can be purchased with Contractor Rep.
Vars | |
cost | The price in Contractor Rep of the purchase. |
---|---|
description | The description of the purchase. |
name | The display name of the purchase. |
refundable | Can this item be refunded? |
stock | How many times the purchase can be made. -1 means infinite stock. |
Procs | |
buy | Attempts to perform the purchase. |
on_buy | Called when the purchase was made successfully. |
refund | Attempts to perform the refund. |
Var Details
cost 
The price in Contractor Rep of the purchase.
description 
The description of the purchase.
name 
The display name of the purchase.
refundable 
Can this item be refunded?
stock 
How many times the purchase can be made. -1 means infinite stock.
Proc Details
buy
Attempts to perform the purchase.
Returns TRUE or FALSE depending on whether the purchase succeeded.
Arguments:
- hub - The contractor hub.
- user - The user who is making the purchase.
on_buy
Called when the purchase was made successfully.
Arguments:
- hub - The contractor hub.
- user - The user who made the purchase.
refund
Attempts to perform the refund.
Returns TRUE or FALSE depending on whether the refund succeeded.
Arguments:
- hub - The contractor hub.
- item - The refunded item.
- user - The user who is making the refund.