add sets up
This commit is contained in:
@@ -152,8 +152,15 @@ type StorageResourcePricingProfile struct {
|
||||
pricing.ExploitPricingProfile[StorageResourcePricingStrategy] // ExploitPricingProfile is the pricing profile of a storage it means that we exploit the resource for an amount of continuous time
|
||||
}
|
||||
|
||||
func (p *StorageResourcePricingProfile) IsPurchased() bool {
|
||||
return p.Pricing.BuyingStrategy != pricing.PAY_PER_USE
|
||||
func (p *StorageResourcePricingProfile) IsPurchasable() bool {
|
||||
return p.Pricing.BuyingStrategy != pricing.UNDEFINED_SUBSCRIPTION
|
||||
}
|
||||
|
||||
func (p *StorageResourcePricingProfile) IsBooked() bool {
|
||||
if p.Pricing.BuyingStrategy == pricing.PERMANENT {
|
||||
p.Pricing.BuyingStrategy = pricing.SUBSCRIPTION
|
||||
}
|
||||
return true
|
||||
}
|
||||
|
||||
func (p *StorageResourcePricingProfile) GetPrice(amountOfData float64, val float64, start time.Time, end time.Time, params ...string) (float64, error) {
|
||||
|
||||
Reference in New Issue
Block a user