Datum.fromJson constructor

Datum.fromJson(
  1. Map<String, dynamic> json
)

Implementation

factory Datum.fromJson(Map<String, dynamic> json) => Datum(
      id: json["id"],
      name: json["name"],
      status: json["status"],
      connectionResponse: json["connection_response"],
      channelUpdatedAt: json["channel_updated_at"] == null
          ? null
          : DateTime.parse(json["channel_updated_at"]),
      statusCode: json["status_code"],
      settings: json["settings"] == null
          ? null
          : DatumSettings.fromJson(json["settings"]),
      auth: json["auth"] == null
          ? null
          : List<dynamic>.from(json["auth"].map((x) => x)),
      connection: json["connection"],
      ordersSync: json["orders_sync"],
      inventorySync: json["inventory_sync"],
      catalogSync: json["catalog_sync"],
      ordersSyncedOn: json["orders_synced_on"],
      inventorySyncedOn: json["inventory_synced_on"],
      baseChannelCode: json["base_channel_code"],
      baseChannel: json["base_channel"] == null
          ? null
          : BaseChannel.fromJson(json["base_channel"]),
      catalogSyncedOn: json["catalog_synced_on"],
      orderStatusMapper: json["order_status_mapper"],
      paymentStatusMapper: json["payment_status_mapper"],
      brandName: json["brand_name"],
      brandLogo: json["brand_logo"],
      allowMarkAsPaid: json["allow_mark_as_paid"],
      warehouseLocations: json["warehouse_locations"] == null
          ? null
          : List<dynamic>.from(json["warehouse_locations"].map((x) => x)),
      skipUnpaidPrepaid: json["skip_unpaid_prepaid"],
      vendorId: json["vendor_id"],
      b2BChannels: json["b2b_channels"] == null
          ? null
          : List<dynamic>.from(json["b2b_channels"].map((x) => x)),
    );