PurchaseDetailsModel extension type
Extension type that represents the details of a purchase.
Wraps a Map<String, dynamic> for all purchase details fields.
Uses from_json_to_json for type-safe JSON handling.
Constructors
- PurchaseDetailsModel({required DateTime purchaseDate, PurchaseId purchaseId = PurchaseId.empty, PurchaseProductId productId = PurchaseProductId.empty, PurchasePriceId priceId = PurchasePriceId.empty, PurchaseStatus status = PurchaseStatus.pendingVerification, PurchaseProductType purchaseType = PurchaseProductType.consumable, Duration freeTrialDuration = Duration.zero, Duration duration = Duration.zero, DateTime? expiryDate, String localVerificationData = '', String serverVerificationData = '', String source = '', String name = '', String formattedPrice = '', double price = 0, String currency = '', String purchaseToken = ''})
-
factory
- PurchaseDetailsModel.fromJson(dynamic json)
-
factory
Properties
- currency → String
-
no setter
- duration → Duration
-
no setter
- expiryDate → DateTime?
-
no setter
- formattedPrice → String
-
no setter
- freeTrialDuration → Duration
-
no setter
- hasFreeTrial → bool
-
no setter
- isCancelled → bool
-
no setter
- isOneTimePurchase → bool
-
no setter
- isPendingVerification → bool
-
no setter
- isPurchased → bool
-
no setter
- isSubscription → bool
-
no setter
- localVerificationData → String
-
no setter
- name → String
-
no setter
- price → double
-
no setter
- priceId → PurchasePriceId
-
no setter
- productId → PurchaseProductId
-
no setter
- purchaseDate → DateTime
-
no setter
- purchaseId → PurchaseId
-
no setter
- purchaseToken → String
-
no setter
- purchaseType → PurchaseProductType
-
no setter
- serverVerificationData → String
-
no setter
- source → String
-
no setter
- status → PurchaseStatus
-
no setter
-
value
→ Map<
String, dynamic> -
final
Methods
-
toJson(
) → Map< String, dynamic> -
toVerificationDto(
) → PurchaseVerificationDtoModel
Static Properties
- empty → PurchaseDetailsModel
-
final