fromMap static method
Implementation
static OrderReadLine? fromMap(Object? body) {
final source = readRecord(body);
if (source == null) return null;
return OrderReadLine(
booking: OrderReadLineBooking.fromMap(source['booking']),
chargeItemUuid: readText(source['charge_item_uuid']),
expectedDeliveryDate: readText(source['expected_delivery_date']),
id: readText(source['id']),
item: OrderReadLineItem.fromMap(source['item']),
itemAccountingCode: OrderReadLineItemAccountingCode.fromMap(
source['item_accounting_code']),
itemChargeType: readText(source['item_charge_type']),
itemCustomAttributes: readList<OrderReadLineItemCustomAttribute>(
source['item_custom_attributes'],
OrderReadLineItemCustomAttribute.fromMap),
itemDescription: readText(source['item_description']),
itemInvoiceNote: readText(source['item_invoice_note']),
itemOrderQuantity: readInteger(source['item_order_quantity']),
itemPriceSnapshot:
OrderReadLineItemPriceSnapshot.fromMap(source['item_price_snapshot']),
itemPriceTax: OrderReadLineItemPriceTax.fromMap(source['item_price_tax']),
itemProperties:
OrderReadLineItemProperties.fromMap(source['item_properties']),
itemSaleTaxConfiguration: OrderReadLineItemSaleTaxConfiguration.fromMap(
source['item_sale_tax_configuration']),
itemType: readText(source['item_type']),
object: readText(source['object']),
preOrderStockDetails: OrderReadLinePreOrderStockDetails.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']),
);
}