Protocol
TchekBuyBackManager
public protocol TchekBuyBackManager
Requirements
getThirdPartyAvailable()
func getThirdPartyAvailable() -> [TchekThirdParty]
This method list third party available
thirdPartyActivated(tchekThirdParty:)
func thirdPartyActivated(tchekThirdParty: TchekThirdParty) -> Bool
This method return Third Party activated state (login success)
loginPVO2(login:pass:onFailure:onSuccess:)
func loginPVO2(login: String,
pass: String,
onFailure: @escaping (TchekError) -> Void,
onSuccess: @escaping () -> Void)
This method login to PVO2
verifyPVO2Credentials(onFailure:onSuccess:)
func verifyPVO2Credentials(onFailure: @escaping (TchekError) -> Void,
onSuccess: @escaping () -> Void)
This method check if credentials are still valid
logoutPVO2(onFailure:onSuccess:)
func logoutPVO2(onFailure: @escaping (TchekError) -> Void,
onSuccess: @escaping () -> Void)
This method logout to PVO2
buyBackFlowPVO2(builder:shootInspectBuilder:)
func buyBackFlowPVO2(builder: TchekBuyBackFlowBuilder, shootInspectBuilder: TchekShootInspectBuilder) -> UIViewController?
This method initializes a Buy Back Flow customized with the provided TchekBuyBackFlowBuilder
Usage:
let builder = TchekBuyBackFlowBuilder(delegate: self) { builder in
builder...
}
let viewController = TchekSdk.buyBackManager().buyBackFlow(builder: builder)
navigationController.present(viewController, animated: true, completion: nil)
Parameters
| Name | Type | Description |
|---|---|---|
| builder | TchekBuyBackFlowBuilder |
The builder to customize the look of Buy Back Flow UI elements |
| shootInspectBuilder | TchekShootInspectBuilder |
The builder used for customizing the features of Shoot/Inspect |
Returns
A UIViewController to initiate the Buy Back Flow or null if error occurs (onBuyBackFlowError() delegate method will be called)