fromMap static method
Implementation
static BookingLine? fromMap(Object? body) {
final source = readRecord(body, envelopeKey: 'order_line');
if (source == null) return null;
return BookingLine(
chargeItemUuid: readText(source['charge_item_uuid']),
expectedDeliveryDate: readText(source['expected_delivery_date']),
id: readText(source['id']),
item: BookingLineItem.fromMap(source['item']),
itemAccountingCode:
BookingLineItemAccountingCode.fromMap(source['item_accounting_code']),
itemChargeType: readText(source['item_charge_type']),
itemCustomAttributes:
readList<Object>(source['item_custom_attributes'], readAny),
itemDescription: readText(source['item_description']),
itemInvoiceNote: readText(source['item_invoice_note']),
itemOrderQuantity: readInteger(source['item_order_quantity']),
itemPriceSnapshot:
BookingLineItemPriceSnapshot.fromMap(source['item_price_snapshot']),
itemPriceTax: BookingLineItemPriceTax.fromMap(source['item_price_tax']),
itemProperties:
BookingLineItemProperties.fromMap(source['item_properties']),
itemSaleTaxConfiguration: BookingLineItemSaleTaxConfiguration.fromMap(
source['item_sale_tax_configuration']),
itemType: readText(source['item_type']),
object: readText(source['object']),
preOrderStockDetails: BookingLinePreOrderStockDetails.fromMap(
source['pre_order_stock_details']),
shippingCost: readDecimal(source['shipping_cost']),
subtotal: readText(source['subtotal']),
tax: readText(source['tax']),
taxExemptWhenSold: readFlag(source['tax_exempt_when_sold']),
total: readText(source['total']),
version: readInteger(source['version']),
);
}