NotchPayEnvironment enum

Which NotchPay environment a key belongs to.

NotchPay marks sandbox credentials and resources with a test marker (e.g. an account reference such as acc.test_SD9b2dwJ2nqX8XEclNpEcGGc). This package uses the same convention to tell, from the key alone, whether a checkout is about to move real money or not — so the checkout sheet can warn the customer with a "Sandbox mode" banner instead of silently taking a test payment for a live one (or vice versa).

Inheritance
Available extensions

Values

live → const NotchPayEnvironment

Real money moves. No sandbox marker was found in the key.

sandbox → const NotchPayEnvironment

A sandbox/test key. No real money moves.

Properties

hashCode int
The hash code for this object.
no setterinherited
index int
A numeric identifier for the enumerated value.
no setterinherited
isLive bool
Whether this is live.
no setter
isSandbox bool
Whether this is sandbox.
no setter
name String

Available on Enum, provided by the EnumName extension

The name of the enum value.
no setter
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() String
A string representation of this object.
inherited

Operators

operator ==(Object other) bool
The equality operator.
inherited

Static Methods

detect(String key) NotchPayEnvironment
Detects the environment a key (public or private) belongs to.

Constants

values → const List<NotchPayEnvironment>
A constant List of the values in this enum, in order of their declaration.