Skip to content

Instantly share code, notes, and snippets.

@nukturnal
Created November 8, 2012 06:34
Show Gist options
  • Save nukturnal/4037239 to your computer and use it in GitHub Desktop.
Save nukturnal/4037239 to your computer and use it in GitHub Desktop.
MPower Java Building a Checkout Invoice
// Adding items to your invoice is very basic, the parameters
// expected are name_of_item, quantity, unit_price, total_price and
// optional item description.
invoice.addItem("13' Apple Retina 500 HDD",1,10.99,10.99);
invoice.addItem("Case Logic laptop Bag",2,100.50,201,"Optional description");
invoice.addItem("Philips electric shaver",2,50.50,101.00);
/* You can optionally set a generation invoice description text which can
be used in cases where your invoice does not need an items list or in cases
where you need to include some extra descriptive information to your invoice */
invoice.setDescription("Optional Invoice description here");
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment