bf45e53169
This correctly displays the stripe balance in dollars, which was previously displayed in cents. Change-Id: Ifb14a63a90d3701201c616780cee466525c8be18
22 lines
865 B
Go
22 lines
865 B
Go
// Copyright (C) 2020 Storj Labs, Inc.
|
||
// See LICENSE for copying information.
|
||
|
||
package payments
|
||
|
||
import (
|
||
"github.com/shopspring/decimal"
|
||
)
|
||
|
||
// 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 {
|
||
FreeCredits int64 `json:"freeCredits"`
|
||
Coins decimal.Decimal `json:"coins"` // STORJ token balance from storjscan.
|
||
Credits decimal.Decimal `json:"credits"`
|
||
// Credits is the balance (in cents) 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.
|
||
}
|