fixed rail & operation names
This commit is contained in:
@@ -2,6 +2,12 @@ package discovery
|
||||
|
||||
import "strings"
|
||||
|
||||
// Rail identifies a canonical payment rail token.
|
||||
type Rail string
|
||||
|
||||
// RailOperation identifies a canonical payment-plan rail action token.
|
||||
type RailOperation string
|
||||
|
||||
const (
|
||||
OperationDiscoveryLookup = "discovery.lookup"
|
||||
|
||||
@@ -33,6 +39,33 @@ const (
|
||||
OperationFXConvert = "fx.convert"
|
||||
)
|
||||
|
||||
// Canonical rail identifiers.
|
||||
const (
|
||||
RailUnspecified = "UNSPECIFIED"
|
||||
RailCrypto = "CRYPTO"
|
||||
RailProviderSettlement = "SETTLEMENT"
|
||||
RailLedger = "LEDGER"
|
||||
RailCardPayout = "CARD"
|
||||
RailFiatOnRamp = "ONRAMP"
|
||||
RailFiatOffRamp = "OFFRAMP"
|
||||
)
|
||||
|
||||
// Canonical payment-plan rail operation identifiers.
|
||||
const (
|
||||
RailOperationUnspecified = "UNSPECIFIED"
|
||||
RailOperationDebit = "DEBIT"
|
||||
RailOperationCredit = "CREDIT"
|
||||
RailOperationExternalDebit = "EXTERNAL_DEBIT"
|
||||
RailOperationExternalCredit = "EXTERNAL_CREDIT"
|
||||
RailOperationMove = "MOVE"
|
||||
RailOperationSend = "SEND"
|
||||
RailOperationFee = "FEE"
|
||||
RailOperationObserveConfirm = "OBSERVE_CONFIRM"
|
||||
RailOperationFXConvert = "FX_CONVERT"
|
||||
RailOperationBlock = "BLOCK"
|
||||
RailOperationRelease = "RELEASE"
|
||||
)
|
||||
|
||||
// NormalizeOperation canonicalizes an operation string for comparisons.
|
||||
func NormalizeOperation(value string) string {
|
||||
return strings.ToLower(strings.TrimSpace(value))
|
||||
|
||||
Reference in New Issue
Block a user