add purchase resource in model catalog
This commit is contained in:
@@ -161,15 +161,12 @@ func (r *PricedDataResource) GetPrice() (float64, error) {
|
||||
r.UsageEnd = &add
|
||||
}
|
||||
if r.SelectedPricing == nil {
|
||||
return 0, errors.New("selected pricing must be set")
|
||||
}
|
||||
pricing := *r.SelectedPricing
|
||||
if pricing == nil {
|
||||
if len(r.PricingProfiles) == 0 {
|
||||
return 0, errors.New("pricing profile must be set")
|
||||
}
|
||||
pricing = r.PricingProfiles[0]
|
||||
*r.SelectedPricing = r.PricingProfiles[0]
|
||||
}
|
||||
pricing := *r.SelectedPricing
|
||||
var err error
|
||||
amountOfData := float64(1)
|
||||
if pricing.GetOverrideStrategyValue() >= 0 {
|
||||
|
||||
Reference in New Issue
Block a user