fromMap static method

Implementation

static SettingsGeneralSettingsOrder? fromMap(Object? body) {
  final source = readRecord(body);
  if (source == null) return null;
  return SettingsGeneralSettingsOrder(
    allowNameToBeChangedInOrder:
        readText(source['allow_name_to_be_changed_in_order']),
    allowUnitPriceToBeChangedInOrder:
        readText(source['allow_unit_price_to_be_changed_in_order']),
    defaultFulfillmentStatus: readText(source['default_fulfillment_status']),
    defaultShippingProfile: readAny(source['default_shipping_profile']),
    displayedPriceIsInclusiveOfTax:
        readText(source['displayed_price_is_inclusive_of_tax']),
    enableBooking: readText(source['enable_booking']),
    enableLastSalePriceLookUpForAnAccount:
        readText(source['enable_last_sale_price_look_up_for_an_account']),
    enableOrderBackdating: readText(source['enable_order_backdating']),
    enableQuote: readText(source['enable_quote']),
    orderManagement: SettingsGeneralSettingsOrderOrderManagement.fromMap(
        source['order_management']),
    referralTrackingAtOrderLevel:
        SettingsGeneralSettingsOrderReferralTrackingAtOrderLevel.fromMap(
            source['referral_tracking_at_order_level']),
    salesRepTrackingAtOrderLevel:
        SettingsGeneralSettingsOrderSalesRepTrackingAtOrderLevel.fromMap(
            source['sales_rep_tracking_at_order_level']),
    useGlobalWarehouse: readText(source['use_global_warehouse']),
  );
}