Package com.ft.viewModel

Types

| FTPLoginViewModel | class FTPLoginViewModel : AndroidViewModel
Copyright © 2019 FinTiv. All rights reserved. |
| FTPMoneyContainerViewModel | class FTPMoneyContainerViewModel : AndroidViewModel
Copyright © 2019 FinTiv. All rights reserved. |
| FTPPaymentViewModel | class FTPPaymentViewModel : AndroidViewModel
Copyright © 2019 FinTiv. All rights reserved. |
| FTPRegistrationViewModel | class FTPRegistrationViewModel : AndroidViewModel
Copyright © 2019 FinTiv. All rights reserved. |

FTPLoginViewModel

class FTPLoginViewModel : AndroidViewModel

Copyright © 2019 FinTiv. All rights reserved.

Constructors

| <init> | FTPLoginViewModel(context:Application)
Copyright © 2019 FinTiv. All rights reserved. |

Properties

| error | var error: MutableLiveData<String> |
| loginResponse | var loginResponse: MutableLiveData<FTPSingOnResponse> |

Functions

| loginWithEmail | fun loginWithEmail(email:String, password:String):Unit
Logs a FTPPerson for the provided email credential & password observe loginResponse field to get the response and observe error field to get the error response |
| logout | fun logout():Unit
Logs a FTPPerson out |

FTPMoneyContainerViewModel

class FTPMoneyContainerViewModel : AndroidViewModel

Copyright © 2019 FinTiv. All rights reserved.

Constructors

| <init> | FTPMoneyContainerViewModel(context:Application)
Copyright © 2019 FinTiv. All rights reserved. |

Properties

| cardConnectToken | var cardConnectToken: MutableLiveData<String> |
| createAccountResponse | var createAccountResponse: MutableLiveData<FTPCreateAccountResponse> |
| error | var error: MutableLiveData<String> |
| moneyContainerCreated | var moneyContainerCreated: MutableLiveData<FTPMoneyContainer> |
| moneyContainerRemoved | var moneyContainerRemoved: MutableLiveData<Int> |
| moneyContainers | var moneyContainers: MutableLiveData<ArrayList<FTPMoneyContainer>> |

Functions

| addMoneyContainer | fun addMoneyContainer(accountNumber:String, expireYear:String, expireMonth:String, accountName:String, cvv:String, description:String, default:Boolean):Unit
fun addMoneyContainer(cardForm: CardForm, cardHolder:String, description:String, default:Boolean= false):Unit
Adds a money container for the FTPPerson observe createAccountResponse field to get the response and observe error field to get the error response |
| createSVAAccount | fun createSVAAccount(accountName:String, currency:String):Unit
Created a SVA for the currently logged user observe createAccountResponse field to get the response and observe error field to get the error response |
| deleteContainer | fun deleteContainer(moneyContainer:FTPMoneyContainer):Unit
Deletes a money container |
| getMoneyContainers | fun getMoneyContainers():Unit
Returns a list of current money containers from fintiv observe moneyContainers field to get the response<ArrayList> and observe error field to get the error response |

FTPPaymentViewModel

class FTPPaymentViewModel : AndroidViewModel

Copyright © 2019 FinTiv. All rights reserved.

Constructors

| <init> | FTPPaymentViewModel(context:Application)
Copyright © 2019 FinTiv. All rights reserved. |

Properties

| error | var error: MutableLiveData<String> |
| payed | var payed: MutableLiveData<Boolean> |

Functions

| payForPurchase | fun payForPurchase(ftPurchase:FTPurchase):Unit
Executes a payment for the current logged customer controller first determines the user’ default SVA, if none is present, creates one for him then load the SVA from the containerId specified in purchase item then executes the payment transaction, observer payed fields observe payed field to get the response |

FTPRegistrationViewModel

class FTPRegistrationViewModel : AndroidViewModel

Copyright © 2019 FinTiv. All rights reserved.

Constructors

| <init> | FTPRegistrationViewModel(context:Application)
Copyright © 2019 FinTiv. All rights reserved. |

Properties

| addCredentialResponse | var addCredentialResponse: MutableLiveData<FTPAddCredentialResponse> |
| error | var error: MutableLiveData<String> |
| personCreated | var personCreated: MutableLiveData<FTPCreatePersonResponse> |
| removeAccountResponse | var removeAccountResponse: MutableLiveData<Boolean> |
| singOnResponse | var singOnResponse: MutableLiveData<FTPSingOnResponse> |

Functions

| deleteCredentials | fun deleteCredentials(email:String, password:String):Unit
Remove user credential observe removeAccountResponse field to get the response |
| loginWithEmail | fun loginWithEmail(email:String, password:String):Unit
Logs a FTPPerson for the provided email credential & password observe singOnResponse field to get the response and observe error field to get the error response |
| logout | fun logout():Unit
Logs a FTPPerson out |
| registerUserWith | fun registerUserWith(name:String, lastName:String, email:String, password:String):Unit
Register a user observe addCredentialResponse field to get the response |