-
Notifications
You must be signed in to change notification settings - Fork 4
Voucherify 3.0.0 Migration Guide
Voucherify 3.0.0 is the latest major release of Voucherify, a library for iOS written in Swift. As a major release, following Semantic Versioning conventions, 3.0.0 introduces several API-breaking changes that one should be aware of.
This guide is provided in order to ease the transition of existing applications using Voucherify 2.x to the latest APIs, as well as explain the design and structure of new and changed functionality.
Voucherify 3.0.0 officially supports iOS 9+, Xcode 10 and Swift 4.2.
Voucherify 3.0.0 contains some breaking API changes to the foundational classes of validations and redemptions. It is really important to understand how these changes affect the common usage patterns.
For those wishing to validate a voucher, you'll need to skip vouchers()
method on voucherify client object and call voucher's validation methods on validations
field.
client.vouchers().validations().validateVoucher(...) {}
client.validations.validateVoucher(...) {}
For those wishing to redeem a voucher, you'll need to skip vouchers()
method on voucherify client object and call voucher's redeem methods on redemptions
field.
client.vouchers().redeemptions().redeem(...) {}
client.redemptions.redeem(...) {}