PricedItem evolved
This commit is contained in:
@@ -41,11 +41,11 @@ func (abs *DataResource) ConvertToPricedResource(t tools.DataType, selectedInsta
|
||||
if t != tools.DATA_RESOURCE {
|
||||
return nil, errors.New("not the proper type expected : cannot convert to priced resource : have " + t.String() + " wait Data")
|
||||
}
|
||||
p, err := abs.AbstractInstanciatedResource.ConvertToPricedResource(t, selectedInstance, selectedPartnership, selectedBuyingStrategy, selectedStrategy, selectedBookingModeIndex, request)
|
||||
p, err := ConvertToPricedResource[*DataResourcePricingProfile](t, selectedInstance, selectedPartnership, selectedBuyingStrategy, selectedStrategy, selectedBookingModeIndex, abs, request)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
priced := p.(*PricedResource)
|
||||
priced := p.(*PricedResource[*DataResourcePricingProfile])
|
||||
return &PricedDataResource{
|
||||
PricedResource: *priced,
|
||||
}, nil
|
||||
@@ -160,7 +160,7 @@ func (p *DataResourcePricingProfile) IsBooked() bool {
|
||||
}
|
||||
|
||||
type PricedDataResource struct {
|
||||
PricedResource
|
||||
PricedResource[*DataResourcePricingProfile]
|
||||
UsageStorageGB float64 `json:"storage_gb,omitempty" bson:"storage_gb,omitempty"`
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user