IssueInvoiceRequest.fromJson constructor
IssueInvoiceRequest.fromJson(
- Map<String, dynamic> j
)
Implementation
factory IssueInvoiceRequest.fromJson(Map<String, dynamic> j) => IssueInvoiceRequest(
idempotencyKey: _pflicht<String>(j, 'idempotencyKey'),
taxScheme: _pflicht<String>(j, 'taxScheme'),
priceMode: _pflicht<String>(j, 'priceMode'),
serviceStart: _pflicht<String>(j, 'serviceStart'),
items: [for (final p in _liste(j, 'items')) InvoiceItemInput.fromJson(p)],
customerId: _text(j, 'customerId'),
serviceEnd: _text(j, 'serviceEnd'),
paymentTermDays: _ganz(j, 'paymentTermDays'),
orderReference: _text(j, 'orderReference'),
intro: _text(j, 'intro'),
note: _text(j, 'note'),
paymentReference: _text(j, 'paymentReference'),
girocode: j['girocode'] is bool ? j['girocode'] as bool : null,
tracking: j['tracking'] is bool ? j['tracking'] as bool : null,
metadata: j['metadata'] is Map ? Map<String, String>.from(j['metadata'] as Map) : null,
language: _text(j, 'language'),
brandId: _text(j, 'brandId'),
payment: j['payment'] is Map ? PaymentInput.fromJson(Map<String, dynamic>.from(j['payment'] as Map)) : null,
);