2019-10-31 16:56:54 +00:00
|
|
|
// Copyright (C) 2019 Storj Labs, Inc.
|
|
|
|
// See LICENSE for copying information.
|
|
|
|
|
|
|
|
package console
|
|
|
|
|
|
|
|
import (
|
|
|
|
"time"
|
|
|
|
)
|
|
|
|
|
|
|
|
// BillingHistoryItem holds all public information about billing history line.
|
|
|
|
type BillingHistoryItem struct {
|
2019-11-21 13:23:16 +00:00
|
|
|
ID string `json:"id"`
|
|
|
|
Description string `json:"description"`
|
|
|
|
Amount int64 `json:"amount"`
|
|
|
|
Received int64 `json:"received"`
|
|
|
|
Status string `json:"status"`
|
|
|
|
Link string `json:"link"`
|
|
|
|
Start time.Time `json:"start"`
|
|
|
|
End time.Time `json:"end"`
|
|
|
|
Type BillingHistoryItemType `json:"type"`
|
2019-10-31 16:56:54 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
// BillingHistoryItemType indicates type of billing history item.
|
|
|
|
type BillingHistoryItemType int
|
|
|
|
|
|
|
|
const (
|
|
|
|
// Invoice is a Stripe invoice billing item.
|
2019-11-12 11:14:34 +00:00
|
|
|
Invoice BillingHistoryItemType = 0
|
2019-10-31 16:56:54 +00:00
|
|
|
// Transaction is a Coinpayments transaction billing item.
|
2019-11-12 11:14:34 +00:00
|
|
|
Transaction BillingHistoryItemType = 1
|
2020-01-03 14:21:05 +00:00
|
|
|
// Charge is a credit card charge billing item.
|
|
|
|
Charge BillingHistoryItemType = 2
|
2020-01-07 10:41:19 +00:00
|
|
|
// Coupon is an entity that adds some funds to Accounts balance for some fixed period.
|
|
|
|
Coupon BillingHistoryItemType = 3
|
2020-01-24 13:38:53 +00:00
|
|
|
// Credits is an entity that adds some funds to Accounts balance after deposit with storj coins.
|
|
|
|
Credits BillingHistoryItemType = 4
|
2019-10-31 16:56:54 +00:00
|
|
|
)
|