Skip to content

Commit 67fa4da

Browse files
author
serverpod_cloud
committed
fix: 775ab62ebfe288e4331c87b6d5d2a142d62bfcb6
1 parent 4e22ecf commit 67fa4da

1 file changed

Lines changed: 6 additions & 10 deletions

File tree

ground_control_client/lib/src/protocol/domains/billing/models/billing_info.dart

Lines changed: 6 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -76,10 +76,8 @@ abstract class BillingInfo implements _i1.SerializableModel {
7676
country: jsonSerialization['country'] as String,
7777
vatNumber: jsonSerialization['vatNumber'] as String?,
7878
vatType: jsonSerialization['vatType'] as String?,
79-
customerType: jsonSerialization['customerType'] == null
80-
? null
81-
: _i2.BillingCustomerType.fromJson(
82-
(jsonSerialization['customerType'] as String)),
79+
customerType: _i2.BillingCustomerType.fromJson(
80+
(jsonSerialization['customerType'] as String)),
8381
);
8482
}
8583

@@ -114,7 +112,7 @@ abstract class BillingInfo implements _i1.SerializableModel {
114112

115113
String? vatType;
116114

117-
_i2.BillingCustomerType? customerType;
115+
_i2.BillingCustomerType customerType;
118116

119117
/// Returns a shallow copy of this [BillingInfo]
120118
/// with some or all fields replaced by the given arguments.
@@ -153,7 +151,7 @@ abstract class BillingInfo implements _i1.SerializableModel {
153151
'country': country,
154152
if (vatNumber != null) 'vatNumber': vatNumber,
155153
if (vatType != null) 'vatType': vatType,
156-
if (customerType != null) 'customerType': customerType?.toJson(),
154+
'customerType': customerType.toJson(),
157155
};
158156
}
159157

@@ -219,7 +217,7 @@ class _BillingInfoImpl extends BillingInfo {
219217
String? country,
220218
Object? vatNumber = _Undefined,
221219
Object? vatType = _Undefined,
222-
Object? customerType = _Undefined,
220+
_i2.BillingCustomerType? customerType,
223221
}) {
224222
return BillingInfo(
225223
id: id ?? this.id,
@@ -236,9 +234,7 @@ class _BillingInfoImpl extends BillingInfo {
236234
country: country ?? this.country,
237235
vatNumber: vatNumber is String? ? vatNumber : this.vatNumber,
238236
vatType: vatType is String? ? vatType : this.vatType,
239-
customerType: customerType is _i2.BillingCustomerType?
240-
? customerType
241-
: this.customerType,
237+
customerType: customerType ?? this.customerType,
242238
);
243239
}
244240
}

0 commit comments

Comments
 (0)