def create_order_source(prices_include_tax, line_data, tax_rates):
 lines = [Line.from_text(x) for x in line_data]
 shop = get_shop(prices_include_tax, currency=u'USD')
 tax_classes = create_assigned_tax_classes(tax_rates)
 products = create_products(shop, lines, tax_classes)
 services = create_services(shop, lines, tax_classes)
 source = OrderSource(shop)
 fill_order_source(source, lines, products, services)
 return source

def create_order_source ( prices_include_tax , line_data , tax_rates ) : lines = [ Line . from_text ( x ) for x in line_data ] shop = get_shop ( prices_include_tax , currency = u'USD' ) tax_classes = create_assigned_tax_classes ( tax_rates ) products = create_products ( shop , lines , tax_classes ) services = create_services ( shop , lines , tax_classes ) source = OrderSource ( shop ) fill_order_source ( source , lines , products , services ) return source
get order source with some testing data .