fromMap static method
Implementation
static BookingByIdLine? fromMap(Object? body) {
final source = readRecord(body);
if (source == null) return null;
return BookingByIdLine(
chargeItemUuid: readText(source['charge_item_uuid']),
expectedDeliveryDate: readText(source['expected_delivery_date']),
id: readText(source['id']),
item: BookingByIdLineItem.fromMap(source['item']),
itemAccountingCode: BookingByIdLineItemAccountingCode.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: BookingByIdLineItemPriceSnapshot.fromMap(
source['item_price_snapshot']),
itemPriceTax:
BookingByIdLineItemPriceTax.fromMap(source['item_price_tax']),
itemProperties:
BookingByIdLineItemProperties.fromMap(source['item_properties']),
itemSaleTaxConfiguration: BookingByIdLineItemSaleTaxConfiguration.fromMap(
source['item_sale_tax_configuration']),
itemType: readText(source['item_type']),
object: readText(source['object']),
preOrderStockDetails: BookingByIdLinePreOrderStockDetails.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']),
);
}