Recurring invoices

This commit is contained in:
Hillel Coren 2020-09-21 21:30:36 +03:00
parent f467f7f739
commit b4eef45449
2 changed files with 14 additions and 12 deletions

View File

@ -289,9 +289,11 @@ abstract class InvoiceEntity extends Object
@BuiltValueField(wireName: 'has_tasks') @BuiltValueField(wireName: 'has_tasks')
bool get hasTasks; bool get hasTasks;
@nullable
@BuiltValueField(wireName: 'auto_bill') @BuiltValueField(wireName: 'auto_bill')
String get autoBill; String get autoBill;
@nullable
@BuiltValueField(wireName: 'auto_bill_enabled') @BuiltValueField(wireName: 'auto_bill_enabled')
bool get autoBillEnabled; bool get autoBillEnabled;

View File

@ -201,12 +201,6 @@ class _$InvoiceEntitySerializer implements StructuredSerializer<InvoiceEntity> {
'has_tasks', 'has_tasks',
serializers.serialize(object.hasTasks, serializers.serialize(object.hasTasks,
specifiedType: const FullType(bool)), specifiedType: const FullType(bool)),
'auto_bill',
serializers.serialize(object.autoBill,
specifiedType: const FullType(String)),
'auto_bill_enabled',
serializers.serialize(object.autoBillEnabled,
specifiedType: const FullType(bool)),
'custom_value1', 'custom_value1',
serializers.serialize(object.customValue1, serializers.serialize(object.customValue1,
specifiedType: const FullType(String)), specifiedType: const FullType(String)),
@ -267,6 +261,18 @@ class _$InvoiceEntitySerializer implements StructuredSerializer<InvoiceEntity> {
'id', 'id',
serializers.serialize(object.id, specifiedType: const FullType(String)), serializers.serialize(object.id, specifiedType: const FullType(String)),
]; ];
if (object.autoBill != null) {
result
..add('auto_bill')
..add(serializers.serialize(object.autoBill,
specifiedType: const FullType(String)));
}
if (object.autoBillEnabled != null) {
result
..add('auto_bill_enabled')
..add(serializers.serialize(object.autoBillEnabled,
specifiedType: const FullType(bool)));
}
if (object.customTaxes1 != null) { if (object.customTaxes1 != null) {
result result
..add('custom_taxes1') ..add('custom_taxes1')
@ -1572,12 +1578,6 @@ class _$InvoiceEntity extends InvoiceEntity {
if (hasTasks == null) { if (hasTasks == null) {
throw new BuiltValueNullFieldError('InvoiceEntity', 'hasTasks'); throw new BuiltValueNullFieldError('InvoiceEntity', 'hasTasks');
} }
if (autoBill == null) {
throw new BuiltValueNullFieldError('InvoiceEntity', 'autoBill');
}
if (autoBillEnabled == null) {
throw new BuiltValueNullFieldError('InvoiceEntity', 'autoBillEnabled');
}
if (customValue1 == null) { if (customValue1 == null) {
throw new BuiltValueNullFieldError('InvoiceEntity', 'customValue1'); throw new BuiltValueNullFieldError('InvoiceEntity', 'customValue1');
} }