@@ -22,6 +22,7 @@ abstract class Owner implements _i1.SerializableModel {
2222 required this .externalPaymentId,
2323 required this .billingPortalUrl,
2424 required this .billingEmails,
25+ this .primarySubscriptionId,
2526 this .user,
2627 this .billingInfo,
2728 this .projects,
@@ -33,6 +34,7 @@ abstract class Owner implements _i1.SerializableModel {
3334 required String externalPaymentId,
3435 required Uri billingPortalUrl,
3536 required List <String > billingEmails,
37+ String ? primarySubscriptionId,
3638 _i2.User ? user,
3739 _i3.BillingInfo ? billingInfo,
3840 List <_i4.Project >? projects,
@@ -48,6 +50,8 @@ abstract class Owner implements _i1.SerializableModel {
4850 billingEmails: (jsonSerialization['billingEmails' ] as List )
4951 .map ((e) => e as String )
5052 .toList (),
53+ primarySubscriptionId:
54+ jsonSerialization['primarySubscriptionId' ] as String ? ,
5155 user: jsonSerialization['user' ] == null
5256 ? null
5357 : _i2.User .fromJson (
@@ -75,6 +79,10 @@ abstract class Owner implements _i1.SerializableModel {
7579
7680 List <String > billingEmails;
7781
82+ /// The id of the primary (default) subscription of this owner.
83+ /// Null if the owner has no subscription.
84+ String ? primarySubscriptionId;
85+
7886 _i2.User ? user;
7987
8088 _i3.BillingInfo ? billingInfo;
@@ -90,6 +98,7 @@ abstract class Owner implements _i1.SerializableModel {
9098 String ? externalPaymentId,
9199 Uri ? billingPortalUrl,
92100 List <String >? billingEmails,
101+ String ? primarySubscriptionId,
93102 _i2.User ? user,
94103 _i3.BillingInfo ? billingInfo,
95104 List <_i4.Project >? projects,
@@ -102,6 +111,8 @@ abstract class Owner implements _i1.SerializableModel {
102111 'externalPaymentId' : externalPaymentId,
103112 'billingPortalUrl' : billingPortalUrl.toJson (),
104113 'billingEmails' : billingEmails.toJson (),
114+ if (primarySubscriptionId != null )
115+ 'primarySubscriptionId' : primarySubscriptionId,
105116 if (user != null ) 'user' : user? .toJson (),
106117 if (billingInfo != null ) 'billingInfo' : billingInfo? .toJson (),
107118 if (projects != null )
@@ -124,6 +135,7 @@ class _OwnerImpl extends Owner {
124135 required String externalPaymentId,
125136 required Uri billingPortalUrl,
126137 required List <String > billingEmails,
138+ String ? primarySubscriptionId,
127139 _i2.User ? user,
128140 _i3.BillingInfo ? billingInfo,
129141 List <_i4.Project >? projects,
@@ -133,6 +145,7 @@ class _OwnerImpl extends Owner {
133145 externalPaymentId: externalPaymentId,
134146 billingPortalUrl: billingPortalUrl,
135147 billingEmails: billingEmails,
148+ primarySubscriptionId: primarySubscriptionId,
136149 user: user,
137150 billingInfo: billingInfo,
138151 projects: projects,
@@ -148,6 +161,7 @@ class _OwnerImpl extends Owner {
148161 String ? externalPaymentId,
149162 Uri ? billingPortalUrl,
150163 List <String >? billingEmails,
164+ Object ? primarySubscriptionId = _Undefined ,
151165 Object ? user = _Undefined ,
152166 Object ? billingInfo = _Undefined ,
153167 Object ? projects = _Undefined ,
@@ -159,6 +173,9 @@ class _OwnerImpl extends Owner {
159173 billingPortalUrl: billingPortalUrl ?? this .billingPortalUrl,
160174 billingEmails:
161175 billingEmails ?? this .billingEmails.map ((e0) => e0).toList (),
176+ primarySubscriptionId: primarySubscriptionId is String ?
177+ ? primarySubscriptionId
178+ : this .primarySubscriptionId,
162179 user: user is _i2.User ? ? user : this .user? .copyWith (),
163180 billingInfo: billingInfo is _i3.BillingInfo ?
164181 ? billingInfo
0 commit comments