PurchaseSubscriptionModel class abstract

Model for storing subscription data for billing purposes.

You can retrieve a collection or document by passing collection and document, respectively.

課金用のサブスクリプションデータを保存するためのモデル。

collectionとdocumentをそれぞれ渡すことによりコレクションやドキュメントを取得することができます。

Available extensions
Annotations
  • @freezed
  • @formValue
  • @immutable
  • @CollectionModelPath.new(PurchaseSubscriptionModel.path)

Constructors

PurchaseSubscriptionModel({required String userId, @Default.new(true) bool expired, String? token, String? platform, String? productId, String? purchaseId, String? packageName, int? expiredTime, String? orderId})
Model for storing subscription data for billing purposes.
const
factory
PurchaseSubscriptionModel.fromJson(Map<String, Object?> json)
Convert from JSON.
factory

Properties

copyWith → $PurchaseSubscriptionModelCopyWith<PurchaseSubscriptionModel>
Create a copy of PurchaseSubscriptionModel with the given fields replaced by the non-null parameter values.
no setterinherited
expired → bool
no setterinherited
expiredTime → int?
no setterinherited
hashCode → int
The hash code for this object.
no setterinherited
orderId → String?
no setterinherited
packageName → String?
no setterinherited
platform → String?
no setterinherited
productId → String?
no setterinherited
purchaseId → String?
no setterinherited
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited
token → String?
no setterinherited
userId → String
no setterinherited

Methods

map<TResult extends Object?>(TResult $default(_PurchaseSubscriptionModel value)) → TResult

Available on PurchaseSubscriptionModel, provided by the PurchaseSubscriptionModelPatterns extension

A switch-like method, using callbacks.
mapOrNull<TResult extends Object?>(TResult? $default(_PurchaseSubscriptionModel value)?) → TResult?

Available on PurchaseSubscriptionModel, provided by the PurchaseSubscriptionModelPatterns extension

A variant of map that fallback to returning null.
maybeMap<TResult extends Object?>(TResult $default(_PurchaseSubscriptionModel value)?, {required TResult orElse()}) → TResult

Available on PurchaseSubscriptionModel, provided by the PurchaseSubscriptionModelPatterns extension

A variant of map that fallback to returning orElse.
maybeWhen<TResult extends Object?>(TResult $default(String userId, bool expired, String? token, String? platform, String? productId, String? purchaseId, String? packageName, int? expiredTime, String? orderId)?, {required TResult orElse()}) → TResult

Available on PurchaseSubscriptionModel, provided by the PurchaseSubscriptionModelPatterns extension

A variant of when that fallback to an orElse callback.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toJson() → Map<String, dynamic>
Serializes this PurchaseSubscriptionModel to a JSON map.
inherited
toString() → String
A string representation of this object.
inherited
when<TResult extends Object?>(TResult $default(String userId, bool expired, String? token, String? platform, String? productId, String? purchaseId, String? packageName, int? expiredTime, String? orderId)) → TResult

Available on PurchaseSubscriptionModel, provided by the PurchaseSubscriptionModelPatterns extension

A switch-like method, using callbacks.
whenOrNull<TResult extends Object?>(TResult? $default(String userId, bool expired, String? token, String? platform, String? productId, String? purchaseId, String? packageName, int? expiredTime, String? orderId)?) → TResult?

Available on PurchaseSubscriptionModel, provided by the PurchaseSubscriptionModelPatterns extension

A variant of when that fallback to returning null

Operators

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

Constants

collection → const _$PurchaseSubscriptionModelCollectionQuery
Query for collection.
document → const _$PurchaseSubscriptionModelDocumentQuery
Query for document.
form → const _$PurchaseSubscriptionModelFormQuery
Query for form value.
path → const String
Model path.