ChannelMetric class

Constructors

ChannelMetric({String? externalId, String? kind, String? platform, int? spendCents, String? spendError, String? status})
Returns a new ChannelMetric instance.

Properties

externalId ↔ String?
ExternalID is the provider-side id of the execution the spend belongs to. Absent until the channel has launched.
getter/setter pair
hashCode → int
The hash code for this object.
no setteroverride
kind ↔ String?
Kind is which channel this row is: paid, organic or email. It is also the row's identity — a campaign carries at most one channel per kind.
getter/setter pair
platform ↔ String?
Platform is the provider the spend was read from: meta, google, x, instagram, or the email provider.
getter/setter pair
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited
spendCents ↔ int?
SpendCents is what the provider itself reports this channel spent, in CENTS. 0 when the channel never launched, when no executor is wired for it, or when the read failed — SpendError tells the last case apart from a genuine zero.
getter/setter pair
spendError ↔ String?
SpendError is why this channel's spend could not be read (connector not connected, provider error), as one secret-free line. Present only on failure; the campaign total then simply omits this channel rather than failing.
getter/setter pair
status ↔ String?
Status is the channel's launch state on the campaign — pending, live, paused, failed or unavailable. Only a live channel is asked for its spend at all.
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) → ChannelMetric?
Returns a new ChannelMetric instance and imports its values from value if it's a Map, null otherwise.
listFromJson(dynamic json, {bool growable = false}) → List<ChannelMetric>
mapFromJson(dynamic json) → Map<String, ChannelMetric>
mapListFromJson(dynamic json, {bool growable = false}) → Map<String, List<ChannelMetric>>

Constants

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