✨ Finishing up stellar program
This commit is contained in:
@ -106,24 +106,30 @@ _SnWalletSubscription _$SnWalletSubscriptionFromJson(
|
||||
) => _SnWalletSubscription(
|
||||
id: json['id'] as String,
|
||||
begunAt: DateTime.parse(json['begun_at'] as String),
|
||||
endedAt: DateTime.parse(json['ended_at'] as String),
|
||||
endedAt:
|
||||
json['ended_at'] == null
|
||||
? null
|
||||
: DateTime.parse(json['ended_at'] as String),
|
||||
identifier: json['identifier'] as String,
|
||||
isActive: json['is_active'] as bool,
|
||||
isFreeTrial: json['is_free_trial'] as bool,
|
||||
status: (json['status'] as num).toInt(),
|
||||
paymentMethod: json['payment_method'] as String,
|
||||
paymentDetails: json['payment_details'] as Map<String, dynamic>,
|
||||
basePrice: (json['base_price'] as num).toDouble(),
|
||||
isActive: json['is_active'] as bool? ?? true,
|
||||
isFreeTrial: json['is_free_trial'] as bool? ?? false,
|
||||
status: (json['status'] as num?)?.toInt() ?? 1,
|
||||
paymentMethod: json['payment_method'] as String?,
|
||||
paymentDetails: json['payment_details'] as Map<String, dynamic>?,
|
||||
basePrice: (json['base_price'] as num?)?.toDouble(),
|
||||
couponId: json['coupon_id'] as String?,
|
||||
coupon: json['coupon'],
|
||||
renewalAt: DateTime.parse(json['renewal_at'] as String),
|
||||
renewalAt:
|
||||
json['renewal_at'] == null
|
||||
? null
|
||||
: DateTime.parse(json['renewal_at'] as String),
|
||||
accountId: json['account_id'] as String,
|
||||
account:
|
||||
json['account'] == null
|
||||
? null
|
||||
: SnAccount.fromJson(json['account'] as Map<String, dynamic>),
|
||||
isAvailable: json['is_available'] as bool,
|
||||
finalPrice: (json['final_price'] as num).toDouble(),
|
||||
isAvailable: json['is_available'] as bool? ?? true,
|
||||
finalPrice: (json['final_price'] as num?)?.toDouble(),
|
||||
createdAt: DateTime.parse(json['created_at'] as String),
|
||||
updatedAt: DateTime.parse(json['updated_at'] as String),
|
||||
deletedAt:
|
||||
@ -137,7 +143,7 @@ Map<String, dynamic> _$SnWalletSubscriptionToJson(
|
||||
) => <String, dynamic>{
|
||||
'id': instance.id,
|
||||
'begun_at': instance.begunAt.toIso8601String(),
|
||||
'ended_at': instance.endedAt.toIso8601String(),
|
||||
'ended_at': instance.endedAt?.toIso8601String(),
|
||||
'identifier': instance.identifier,
|
||||
'is_active': instance.isActive,
|
||||
'is_free_trial': instance.isFreeTrial,
|
||||
@ -147,7 +153,7 @@ Map<String, dynamic> _$SnWalletSubscriptionToJson(
|
||||
'base_price': instance.basePrice,
|
||||
'coupon_id': instance.couponId,
|
||||
'coupon': instance.coupon,
|
||||
'renewal_at': instance.renewalAt.toIso8601String(),
|
||||
'renewal_at': instance.renewalAt?.toIso8601String(),
|
||||
'account_id': instance.accountId,
|
||||
'account': instance.account?.toJson(),
|
||||
'is_available': instance.isAvailable,
|
||||
|
Reference in New Issue
Block a user