Skip to content

Instantly share code, notes, and snippets.

@WirecardMobileServices
Last active May 7, 2019 10:10
Show Gist options
  • Save WirecardMobileServices/86347f71693f4ff62187d89599948242 to your computer and use it in GitHub Desktop.
Save WirecardMobileServices/86347f71693f4ff62187d89599948242 to your computer and use it in GitHub Desktop.
WDePOS Modify Sale
// End of Modify process
let completion: SaleUpdateCompletion = { (sale: WDSaleResponse?, error: Error?) in
// sale - Failed sale detail
// error - if encountered during the Modify process
}
let saleMaintain = WDSaleMaintain.init(originalSaleId: "Sale ID", items: [], amount: NSDecimalNumber.one, inclusiveTaxes: true, note: "Text to append to original note", version: NSDecimalNumber.zero)
//Version should be the latest from the original sale. An unmodified sale will have version zero
// Sale Modify - This operation is available only for the Sale in the Unconfirmed status.
sdk.saleManager.maintainSale(saleMaintain, // The Sale Maintain object with the modifications to apply to the original sale
completion: completion) // End of Modify process
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment