Endpoint class

Constructors

Endpoint({String? created, int? deliveries7d, String? description, List<String> events = const [], int? failures7d, String? id, String? org, String? secret, String? status, String? updated, String? url})
Returns a new Endpoint instance.

Properties

created ↔ String?
CreatedAt is when the endpoint was registered, RFC3339 in UTC — stored in that spelling because it sorts as a string.
getter/setter pair
deliveries7d ↔ int?
Deliveries7d is how many deliveries SETTLED in the trailing 7 days — the attempts that ended ok or failed, so a delivery still retrying is in neither counter yet. It is counted from the log at read time rather than stored, and it is filled only on a list or a get; a create answers 0 because there is no history, which is why it is never omitted.
getter/setter pair
description ↔ String?
Description is the operator's own label for the endpoint. Never sent anywhere.
getter/setter pair
events ↔ List<String>
Events are the subject patterns this endpoint subscribes to ("commerce.order.>"). An EMPTY list means every event, not none.
getter/setter pair
failures7d ↔ int?
Failures7d is how many of those settled as failed — the subscriber never accepted it and no further attempt will be made. It is the numerator to Deliveries7d, over the same window.
getter/setter pair
hashCode → int
The hash code for this object.
no setteroverride
id ↔ String?
ID is the endpoint's handle, server-minted and stable for its life. It is what every other route here addresses.
getter/setter pair
org ↔ String?
Org is the tenant that owns the endpoint, taken from the validated principal rather than from any request field.
getter/setter pair
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited
secret ↔ String?
Secret is the HMAC-SHA256 signing key a subscriber recomputes the signature with. It is returned exactly ONCE, on create: a later read of the endpoint omits it, so a lost secret is replaced rather than recovered.
getter/setter pair
status ↔ String?
Status is "active" or "disabled" — nothing else is accepted. A disabled endpoint keeps its subscription and receives no deliveries, except a manual test send, which goes out anyway.
getter/setter pair
updated ↔ String?
UpdatedAt is when its url, events, status or description last changed.
getter/setter pair
url ↔ String?
URL is where the POST goes. Changing it is the one edit that redirects an org's events, which is why it is never bindable from a query string.
getter/setter pair

Methods

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

Operators

operator ==(Object other) → bool
The equality operator.
override

Static Methods

fromJson(dynamic value) → Endpoint?
Returns a new Endpoint instance and imports its values from value if it's a Map, null otherwise.
listFromJson(dynamic json, {bool growable = false}) → List<Endpoint>
mapFromJson(dynamic json) → Map<String, Endpoint>
mapListFromJson(dynamic json, {bool growable = false}) → Map<String, List<Endpoint>>

Constants

requiredKeys → const Set<String>
The list of required keys that must be present in a JSON.