Order Flow Payment Draft
This commit is contained in:
@@ -34,16 +34,16 @@ type ProcessingResource struct {
|
||||
Container common.Container `json:"container,omitempty" bson:"container,omitempty"` // Container is the container
|
||||
}
|
||||
|
||||
type CustomizedProcessingResource struct {
|
||||
AbstractCustomizedResource[*ResourceInstance[*ResourcePartnerShip[*ProcessingResourcePricingProfile]]]
|
||||
type PricedProcessingResource struct {
|
||||
PricedResource
|
||||
IsService bool
|
||||
}
|
||||
|
||||
func (r *CustomizedProcessingResource) GetType() tools.DataType {
|
||||
func (r *PricedProcessingResource) GetType() tools.DataType {
|
||||
return tools.PROCESSING_RESOURCE
|
||||
}
|
||||
|
||||
func (a *CustomizedProcessingResource) GetExplicitDurationInS() float64 {
|
||||
func (a *PricedProcessingResource) GetExplicitDurationInS() float64 {
|
||||
if a.ExplicitBookingDurationS == 0 {
|
||||
if a.IsService || a.UsageStart == nil {
|
||||
if a.IsService {
|
||||
@@ -68,6 +68,6 @@ func (p *ProcessingResourcePricingProfile) IsPurchased() bool {
|
||||
return p.Pricing.BuyingStrategy != pricing.PAY_PER_USE
|
||||
}
|
||||
|
||||
func (p *ProcessingResourcePricingProfile) GetPrice(amountOfData float64, val float64, start time.Time, end time.Time, request *tools.APIRequest, params ...string) (float64, error) {
|
||||
func (p *ProcessingResourcePricingProfile) GetPrice(amountOfData float64, val float64, start time.Time, end time.Time, params ...string) (float64, error) {
|
||||
return p.Pricing.GetPrice(amountOfData, val, start, &end)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user