@@ -19,6 +19,8 @@ abstract class SubscriptionInfo implements _i1.SerializableModel {
1919 required this .createdAt,
2020 required this .startDate,
2121 this .trialEndDate,
22+ this .endDate,
23+ required this .cancelled,
2224 required this .subscriptionId,
2325 required this .planProductId,
2426 required this .planName,
@@ -31,6 +33,8 @@ abstract class SubscriptionInfo implements _i1.SerializableModel {
3133 required DateTime createdAt,
3234 required DateTime startDate,
3335 DateTime ? trialEndDate,
36+ DateTime ? endDate,
37+ required bool cancelled,
3438 required String subscriptionId,
3539 required String planProductId,
3640 required String planName,
@@ -52,6 +56,10 @@ abstract class SubscriptionInfo implements _i1.SerializableModel {
5256 : _i1.DateTimeJsonExtension .fromJson (
5357 jsonSerialization['trialEndDate' ],
5458 ),
59+ endDate: jsonSerialization['endDate' ] == null
60+ ? null
61+ : _i1.DateTimeJsonExtension .fromJson (jsonSerialization['endDate' ]),
62+ cancelled: jsonSerialization['cancelled' ] as bool ,
5563 subscriptionId: jsonSerialization['subscriptionId' ] as String ,
5664 planProductId: jsonSerialization['planProductId' ] as String ,
5765 planName: jsonSerialization['planName' ] as String ,
@@ -70,6 +78,12 @@ abstract class SubscriptionInfo implements _i1.SerializableModel {
7078 /// Trial end date, if currently ongoing.
7179 DateTime ? trialEndDate;
7280
81+ /// The date the subscription ended / will end, if cancelled or otherwise terminated.
82+ DateTime ? endDate;
83+
84+ /// Whether this subscription has been cancelled.
85+ bool cancelled;
86+
7387 /// The id of the subscription.
7488 String subscriptionId;
7589
@@ -95,6 +109,8 @@ abstract class SubscriptionInfo implements _i1.SerializableModel {
95109 DateTime ? createdAt,
96110 DateTime ? startDate,
97111 DateTime ? trialEndDate,
112+ DateTime ? endDate,
113+ bool ? cancelled,
98114 String ? subscriptionId,
99115 String ? planProductId,
100116 String ? planName,
@@ -109,6 +125,8 @@ abstract class SubscriptionInfo implements _i1.SerializableModel {
109125 'createdAt' : createdAt.toJson (),
110126 'startDate' : startDate.toJson (),
111127 if (trialEndDate != null ) 'trialEndDate' : trialEndDate? .toJson (),
128+ if (endDate != null ) 'endDate' : endDate? .toJson (),
129+ 'cancelled' : cancelled,
112130 'subscriptionId' : subscriptionId,
113131 'planProductId' : planProductId,
114132 'planName' : planName,
@@ -131,6 +149,8 @@ class _SubscriptionInfoImpl extends SubscriptionInfo {
131149 required DateTime createdAt,
132150 required DateTime startDate,
133151 DateTime ? trialEndDate,
152+ DateTime ? endDate,
153+ required bool cancelled,
134154 required String subscriptionId,
135155 required String planProductId,
136156 required String planName,
@@ -141,6 +161,8 @@ class _SubscriptionInfoImpl extends SubscriptionInfo {
141161 createdAt: createdAt,
142162 startDate: startDate,
143163 trialEndDate: trialEndDate,
164+ endDate: endDate,
165+ cancelled: cancelled,
144166 subscriptionId: subscriptionId,
145167 planProductId: planProductId,
146168 planName: planName,
@@ -157,6 +179,8 @@ class _SubscriptionInfoImpl extends SubscriptionInfo {
157179 DateTime ? createdAt,
158180 DateTime ? startDate,
159181 Object ? trialEndDate = _Undefined ,
182+ Object ? endDate = _Undefined ,
183+ bool ? cancelled,
160184 String ? subscriptionId,
161185 String ? planProductId,
162186 String ? planName,
@@ -170,6 +194,8 @@ class _SubscriptionInfoImpl extends SubscriptionInfo {
170194 trialEndDate: trialEndDate is DateTime ?
171195 ? trialEndDate
172196 : this .trialEndDate,
197+ endDate: endDate is DateTime ? ? endDate : this .endDate,
198+ cancelled: cancelled ?? this .cancelled,
173199 subscriptionId: subscriptionId ?? this .subscriptionId,
174200 planProductId: planProductId ?? this .planProductId,
175201 planName: planName ?? this .planName,
0 commit comments