more refactoring for the order and adds api lookup by custom_item_hash to orders and line_items