fromMap static method
Implementation
static ExpressLine? fromMap(Object? body) {
final source = readRecord(body);
if (source == null) return null;
return ExpressLine(
chargeItemUuid: readText(source['charge_item_uuid']),
expectedDeliveryDate: readText(source['expected_delivery_date']),
id: readText(source['id']),
item: ExpressLineItem.fromMap(source['item']),
itemAccountingCode:
ExpressLineItemAccountingCode.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:
ExpressLineItemPriceSnapshot.fromMap(source['item_price_snapshot']),
itemPriceTax: ExpressLineItemPriceTax.fromMap(source['item_price_tax']),
itemSaleTaxConfiguration: ExpressLineItemSaleTaxConfiguration.fromMap(
source['item_sale_tax_configuration']),
itemType: readText(source['item_type']),
object: readText(source['object']),
preOrderStockDetails: ExpressLinePreOrderStockDetails.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']),
);
}