OfferingsModel class

Annotations
  • @JsonSerializable.new()

Constructors

OfferingsModel({List<OfferingModel>? offerings, List<Rule>? rules, int? forceVersion, String? fetchedAt, String? currentOfferingIdentifier, Map<String, String?>? placements, bool usesServerTargeting = false})
OfferingsModel.fromJson(Map<String, dynamic> json)
factory

Properties

all → Map<String, OfferingModel>
no setter
current → OfferingModel?
no setter
currentOfferingIdentifier → String?
Offering selected by the V2 server for the current session and attributes.
final
fetchedAt → String?
ISO-8601 timestamp at which the Web SDK fetched this collection.
final
forceVersion → int?
Service force-version used to invalidate cached offerings.
final
hashCode → int
The hash code for this object.
no setterinherited
offerings → List<OfferingModel>?
final
placements → Map<String, String?>?
final
rules → List<Rule>?
final
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited
usesServerTargeting → bool
Retains server-selection semantics even when its selection is explicitly null.
final

Methods

convertVersionToDouble(String version) → double
Converts a dotted version using the SDK's historical comparison format.
currentOffering({String? placment}) → OfferingModel?
Resolves the offering for the current customer and optional placement.
defaultOffering() → OfferingModel?
Returns the offering marked as the server default.
evaluateField({required String filedName, required String operator, required String data, String? context}) → bool
Evaluates one offering condition using the compatibility context.
evaluateFieldWithContext({required String filedName, required String operator, required String data, required OfferingEvaluationContext evaluationContext, String? context}) → bool
Evaluates one condition using explicit, platform-independent inputs.
evaluateOperator(dynamic left, String operator, dynamic right) → bool
Applies one of the stable server-defined comparison operators.
getCurrentOfferingForPlacement(String? placementIdentifier) → OfferingModel?
getOffering(String identifier) → OfferingModel?
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
resolveOffering({required OfferingEvaluationContext evaluationContext, String? placement}) → OfferingModel?
Resolves an offering using explicit, platform-independent inputs.
toJson() → Map<String, dynamic>
toString() → String
A string representation of this object.
inherited

Operators

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