storj/satellite/payments/projectcharges.go
Jeremy Wharton 5d656e66bf satellite/payments/stripecoinpayments: implement invoice price override
This change allows for overriding project usage prices for a specific
partner so that users who sign up with that partner do not need their
invoices to be manually adjusted.

Relates to storj/storj-private#90

Change-Id: Ia54a9cc7c2f8064922bbb15861f974e5dea82d5a
2023-01-17 14:32:10 +00:00

32 lines
1.0 KiB
Go

// Copyright (C) 2019 Storj Labs, Inc.
// See LICENSE for copying information.
package payments
import (
"github.com/shopspring/decimal"
"storj.io/common/uuid"
"storj.io/storj/satellite/accounting"
)
// ProjectCharge shows project usage and how much money current project will charge in the end of the month.
type ProjectCharge struct {
accounting.ProjectUsage
ProjectID uuid.UUID `json:"projectId"`
// StorageGbHrs shows how much cents we should pay for storing GB*Hrs.
StorageGbHrs int64 `json:"storagePrice"`
// Egress shows how many cents we should pay for Egress.
Egress int64 `json:"egressPrice"`
// SegmentCount shows how many cents we should pay for objects count.
SegmentCount int64 `json:"segmentPrice"`
}
// ProjectUsagePriceModel represents price model for project usage.
type ProjectUsagePriceModel struct {
StorageMBMonthCents decimal.Decimal `json:"storageMBMonthCents"`
EgressMBCents decimal.Decimal `json:"egressMBCents"`
SegmentMonthCents decimal.Decimal `json:"segmentMonthCents"`
}