2020-05-12 18:16:04 +01:00
|
|
|
|
// Copyright (C) 2020 Storj Labs, Inc.
|
|
|
|
|
// See LICENSE for copying information.
|
|
|
|
|
|
|
|
|
|
package payments
|
|
|
|
|
|
2022-11-30 16:24:09 +00:00
|
|
|
|
import (
|
|
|
|
|
"github.com/shopspring/decimal"
|
|
|
|
|
)
|
|
|
|
|
|
2020-05-12 18:16:04 +01:00
|
|
|
|
// Balance is an entity that holds free credits and coins balance of user.
|
|
|
|
|
// Earned by applying of promotional coupon and coins depositing, respectively.
|
|
|
|
|
type Balance struct {
|
2022-11-30 16:24:09 +00:00
|
|
|
|
FreeCredits int64 `json:"freeCredits"`
|
2023-03-05 18:49:32 +00:00
|
|
|
|
Coins decimal.Decimal `json:"coins"` // STORJ token balance from storjscan.
|
|
|
|
|
Credits decimal.Decimal `json:"credits"`
|
|
|
|
|
// Credits is the balance from stripe. This may include the following.
|
|
|
|
|
// 1. legacy Coinpayments deposit.
|
|
|
|
|
// 2. legacy credit for a manual STORJ deposit.
|
|
|
|
|
// 4. bonus manually credited for a storjscan payment once a month before invoicing.
|
|
|
|
|
// 5. any other adjustment we may have to make from time to time manually to the customer´s STORJ balance.
|
2020-05-12 18:16:04 +01:00
|
|
|
|
}
|