This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//End of SDK Setup process | |
CurrentUserCompletion setupCompletion = ^( WDMerchantUser * _Nullable currentUser, WDMerchantCashier * _Nullable cashier, NSError * _Nullable error){ | |
//Current User is returned upon successful login | |
//if the Cash Management is enabled and Cashier record exist for the current user then the Cashier is returned also | |
}; | |
// The SDK is initialized as shared instance so can be accessed | |
// from multiple View Controllers | |
WDePOS *sdk = [WDePOS sharedInstance]; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import java.math.BigDecimal; | |
import java.util.Arrays; | |
import java.util.List; | |
import de.wirecard.epos.EposSDK; | |
import de.wirecard.epos.model.inventory.ProductStockUpdate; | |
import de.wirecard.epos.model.with.With; | |
import de.wirecard.epos.model.with.WithFields; | |
import io.reactivex.android.schedulers.AndroidSchedulers; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import java.math.BigDecimal; | |
import java.util.ArrayList; | |
import java.util.List; | |
import de.wirecard.epos.EposSDK; | |
import de.wirecard.epos.model.sale.builder.ModifyPurchaseRequest; | |
import de.wirecard.epos.model.sale.sales.SaleItem; | |
import de.wirecard.epos.model.sale.sales.SaleItemType; | |
import de.wirecard.epos.model.with.With; | |
import de.wirecard.epos.model.with.WithBase; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// 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. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// End of Modify process | |
SaleUpdateCompletion completion = ^(WDSaleResponse* _Nullable sale, NSError* _Nullable error){ | |
// sale - Modified sale detail | |
// error - if encountered during the Modify process | |
}; | |
WDSaleMaintain *saleMaintain = [[WDSaleMaintain alloc] initWithOriginalSaleId:@"Sale ID" | |
items:[NSArray new] | |
amount:NSDecimalNumber.one | |
inclusiveTaxes:YES |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import de.wirecard.epos.EposSDK; | |
import de.wirecard.epos.model.sale.builder.CancelRequest; | |
import de.wirecard.epos.model.with.With; | |
import de.wirecard.epos.model.with.WithBase; | |
import io.reactivex.android.schedulers.AndroidSchedulers; | |
import io.reactivex.schedulers.Schedulers; | |
//initialize your param | |
String originalSaleId; // SaleId of Sale you would like to Cancel |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import de.wirecard.epos.EposSDK; | |
import de.wirecard.epos.model.sale.builder.FailRequest; | |
import de.wirecard.epos.model.with.With; | |
import de.wirecard.epos.model.with.WithBase; | |
import io.reactivex.android.schedulers.AndroidSchedulers; | |
import io.reactivex.schedulers.Schedulers; | |
//initialize your params | |
String originalSaleId; // Sale ID, you would like to put into Failed state |