| @ -1,36 +0,0 @@ | |||
| package com.nivesh.production.bajajfd.ui.fragment | |||
| import android.content.Context | |||
| import android.os.Bundle | |||
| import androidx.fragment.app.Fragment | |||
| import com.nivesh.production.bajajfd.ui.activity.BaseActivity | |||
| open class BaseFragment : Fragment() { | |||
| protected var mActivity: BaseActivity? = null | |||
| override fun onAttach(context: Context) { | |||
| super.onAttach(context) | |||
| if (context is BaseActivity) { | |||
| mActivity = context | |||
| } else try { | |||
| throw ClassCastException("You need to extend BaseActivity to calling activity.") | |||
| } catch (e: Exception) { | |||
| e.printStackTrace() | |||
| } | |||
| } | |||
| override fun onCreate(savedInstanceState: Bundle?) { | |||
| super.onCreate(savedInstanceState) | |||
| } | |||
| override fun onStart() { | |||
| super.onStart() | |||
| } | |||
| override fun onStop() { | |||
| super.onStop() | |||
| } | |||
| } | |||
| @ -1,15 +0,0 @@ | |||
| package com.nivesh.production.bajajfd.ui.providerfactory | |||
| import androidx.lifecycle.ViewModel | |||
| import androidx.lifecycle.ViewModelProvider | |||
| import com.nivesh.production.bajajfd.repositories.MainRepository | |||
| import com.nivesh.production.bajajfd.viewModel.StepFiveBajajFDViewModel | |||
| class StepFiveModelProviderFactory(private val mainRepository: MainRepository) : | |||
| ViewModelProvider.Factory { | |||
| override fun <T : ViewModel> create(modelClass: Class<T>): T { | |||
| return StepFiveBajajFDViewModel(mainRepository) as T | |||
| } | |||
| } | |||
| @ -1,15 +0,0 @@ | |||
| package com.nivesh.production.bajajfd.ui.providerfactory | |||
| import androidx.lifecycle.ViewModel | |||
| import androidx.lifecycle.ViewModelProvider | |||
| import com.nivesh.production.bajajfd.repositories.MainRepository | |||
| import com.nivesh.production.bajajfd.viewModel.StepFourBajajFDViewModel | |||
| class StepFourModelProviderFactory(private val mainRepository: MainRepository) : | |||
| ViewModelProvider.Factory { | |||
| override fun <T : ViewModel> create(modelClass: Class<T>): T { | |||
| return StepFourBajajFDViewModel(mainRepository) as T | |||
| } | |||
| } | |||
| @ -1,14 +0,0 @@ | |||
| package com.nivesh.production.bajajfd.ui.providerfactory | |||
| import androidx.lifecycle.ViewModel | |||
| import androidx.lifecycle.ViewModelProvider | |||
| import com.nivesh.production.bajajfd.repositories.MainRepository | |||
| import com.nivesh.production.bajajfd.viewModel.StepOneBajajFDViewModel | |||
| class StepOneModelProviderFactory (private val mainRepository: MainRepository) : ViewModelProvider.Factory { | |||
| override fun <T : ViewModel> create(modelClass: Class<T>): T { | |||
| return StepOneBajajFDViewModel(mainRepository) as T | |||
| } | |||
| } | |||
| @ -1,17 +0,0 @@ | |||
| package com.nivesh.production.bajajfd.ui.providerfactory | |||
| import androidx.lifecycle.ViewModel | |||
| import androidx.lifecycle.ViewModelProvider | |||
| import com.nivesh.production.bajajfd.repositories.MainRepository | |||
| import com.nivesh.production.bajajfd.viewModel.BajajFDViewModel | |||
| import com.nivesh.production.bajajfd.viewModel.StepOneBajajFDViewModel | |||
| import com.nivesh.production.bajajfd.viewModel.StepThreeBajajFDViewModel | |||
| import com.nivesh.production.bajajfd.viewModel.StepTwoBajajFDViewModel | |||
| class StepThreeModelProviderFactory (private val mainRepository: MainRepository) : ViewModelProvider.Factory { | |||
| override fun <T : ViewModel> create(modelClass: Class<T>): T { | |||
| return StepThreeBajajFDViewModel(mainRepository) as T | |||
| } | |||
| } | |||
| @ -1,16 +0,0 @@ | |||
| package com.nivesh.production.bajajfd.ui.providerfactory | |||
| import androidx.lifecycle.ViewModel | |||
| import androidx.lifecycle.ViewModelProvider | |||
| import com.nivesh.production.bajajfd.repositories.MainRepository | |||
| import com.nivesh.production.bajajfd.viewModel.BajajFDViewModel | |||
| import com.nivesh.production.bajajfd.viewModel.StepOneBajajFDViewModel | |||
| import com.nivesh.production.bajajfd.viewModel.StepTwoBajajFDViewModel | |||
| class StepTwoModelProviderFactory (private val mainRepository: MainRepository) : ViewModelProvider.Factory { | |||
| override fun <T : ViewModel> create(modelClass: Class<T>): T { | |||
| return StepTwoBajajFDViewModel(mainRepository) as T | |||
| } | |||
| } | |||
| @ -1,9 +0,0 @@ | |||
| package com.nivesh.production.bajajfd.viewModel | |||
| import androidx.lifecycle.ViewModel | |||
| import com.nivesh.production.bajajfd.repositories.MainRepository | |||
| class StepFiveBajajFDViewModel(private val mainRepository: MainRepository) : ViewModel() { | |||
| } | |||
| @ -1,78 +0,0 @@ | |||
| package com.nivesh.production.bajajfd.viewModel | |||
| import androidx.lifecycle.ViewModel | |||
| import com.nivesh.production.bajajfd.repositories.MainRepository | |||
| class StepFourBajajFDViewModel(private val mainRepository: MainRepository) : ViewModel() { | |||
| // val getPaymentModeMutableData: MutableLiveData<Resource<JsonObject>> = MutableLiveData() | |||
| // fun paymentModeApi(getCodeRequest: GetCodeRequest, token: String, | |||
| // activity: Activity | |||
| // ) = viewModelScope.launch(Common.handleError(activity)) { | |||
| // if (Common.isNetworkAvailable(activity)) { | |||
| // getPaymentModeMutableData.postValue(Resource.Loading()) | |||
| // val response = mainRepository.payModeCheck(getCodeRequest, token) | |||
| // getPaymentModeMutableData.postValue(handleResponse(response)) | |||
| // } | |||
| // } | |||
| // | |||
| // val getFDDetailsMutableData: MutableLiveData<Resource<JsonObject>> = MutableLiveData() | |||
| // fun getFDDetails(getRatesRequest: GetFDDetailsRequest, token: String, | |||
| // activity: Activity) = viewModelScope.launch(Common.handleError(activity)) { | |||
| // if (Common.isNetworkAvailable(activity)) { | |||
| // getFDDetailsMutableData.postValue(Resource.Loading()) | |||
| // val response = mainRepository.getFDDetailsResponse(getRatesRequest, token) | |||
| // getFDDetailsMutableData.postValue(handleResponse(response)) | |||
| // } | |||
| // } | |||
| // | |||
| // val getFDOtherMutableData: MutableLiveData<Resource<JsonObject>> = MutableLiveData() | |||
| // fun saveFDOtherData(getRatesRequest: SaveFDOtherDataRequest, token: String, | |||
| // activity: Activity) = viewModelScope.launch(Common.handleError(activity)) { | |||
| // if (Common.isNetworkAvailable(activity)) { | |||
| // getFDOtherMutableData.postValue(Resource.Loading()) | |||
| // val response = mainRepository.saveFDOtherDataResponse(getRatesRequest, token) | |||
| // getFDOtherMutableData.postValue(handleResponse(response)) | |||
| // } | |||
| // } | |||
| // | |||
| // val getRatesMutableData: MutableLiveData<Resource<JsonObject>> = MutableLiveData() | |||
| // fun updateFDPaymentStatus(getRatesRequest: GetRatesRequest, token: String, | |||
| // activity: Activity) = | |||
| // viewModelScope.launch(Common.handleError(activity)) { | |||
| // if (Common.isNetworkAvailable(activity)) { | |||
| // getRatesMutableData.postValue(Resource.Loading()) | |||
| // val response = mainRepository.updateFDPaymentStatusResponse(getRatesRequest, token) | |||
| // getRatesMutableData.postValue(handleResponse(response)) | |||
| // } | |||
| // } | |||
| // | |||
| // fun finaliseFD(getRatesRequest: GetRatesRequest, token: String, | |||
| // activity: Activity) = viewModelScope.launch(Common.handleError(activity)) { | |||
| // if (Common.isNetworkAvailable(activity)) { | |||
| // getRatesMutableData.postValue(Resource.Loading()) | |||
| // val response = mainRepository.finaliseFDResponse(getRatesRequest, token) | |||
| // getRatesMutableData.postValue(handleResponse(response)) | |||
| // } | |||
| // } | |||
| // | |||
| // fun finaliseKYC(getRatesRequest: GetRatesRequest, token: String, | |||
| // activity: Activity) = viewModelScope.launch(Common.handleError(activity)) { | |||
| // if (Common.isNetworkAvailable(activity)) { | |||
| // getRatesMutableData.postValue(Resource.Loading()) | |||
| // val response = mainRepository.finaliseKYCResponse(getRatesRequest, token) | |||
| // getRatesMutableData.postValue(handleResponse(response)) | |||
| // } | |||
| // } | |||
| // | |||
| // fun paymentReQuery(getRatesRequest: PaymentReQueryRequest, token: String, | |||
| // activity: Activity) = viewModelScope.launch(Common.handleError(activity)) { | |||
| // if (Common.isNetworkAvailable(activity)) { | |||
| // getRatesMutableData.postValue(Resource.Loading()) | |||
| // val response = mainRepository.paymentReQueryResponse(getRatesRequest, token) | |||
| // getRatesMutableData.postValue(handleResponse(response)) | |||
| // } | |||
| // } | |||
| } | |||
| @ -1,67 +0,0 @@ | |||
| package com.nivesh.production.bajajfd.viewModel | |||
| import androidx.lifecycle.ViewModel | |||
| import com.nivesh.production.bajajfd.repositories.MainRepository | |||
| class StepOneBajajFDViewModel(private val mainRepository: MainRepository) : ViewModel() { | |||
| // val getCodeMutableData: MutableLiveData<Resource<JsonObject>> = MutableLiveData() | |||
| // fun getCode(requestBody: GetCodeRequest, token: String, activity: Activity) = | |||
| // viewModelScope.launch( | |||
| // Common.handleError(activity) | |||
| // ) { | |||
| // if (Common.isNetworkAvailable(activity)) { | |||
| // getCodeMutableData.postValue(Resource.Loading()) | |||
| // val response = mainRepository.getCodesResponse(requestBody, token) | |||
| // getCodeMutableData.postValue(handleResponse(response)) | |||
| // } | |||
| // } | |||
| // val getRatesMutableData: MutableLiveData<Resource<JsonObject>> = MutableLiveData() | |||
| // fun getRates(getRatesRequest: GetRatesRequest, token: String, activity: Activity) = | |||
| // viewModelScope.launch( | |||
| // Common.handleError(activity) | |||
| // ) { | |||
| // if (Common.isNetworkAvailable(activity)) { | |||
| // getRatesMutableData.postValue(Resource.Loading()) | |||
| // val response = mainRepository.getRatesResponse(getRatesRequest, token) | |||
| // getRatesMutableData.postValue(handleResponse(response)) | |||
| // } | |||
| // } | |||
| // val getMaturityAmountMutableData: MutableLiveData<Resource<JsonObject>> = MutableLiveData() | |||
| // fun getMaturityAmount(requestBody: GetMaturityAmountRequest, activity: Activity) = | |||
| // viewModelScope.launch( | |||
| // Common.handleError(activity) | |||
| // ) { | |||
| // if (Common.isNetworkAvailable(activity)) { | |||
| // getMaturityAmountMutableData.postValue(Resource.Loading()) | |||
| // val response = mainRepository.createCalculateFDMaturityAmount(requestBody, token) | |||
| // getMaturityAmountMutableData.postValue(handleResponse(response)) | |||
| // } | |||
| // } | |||
| // val getMinAmountMutableData: MutableLiveData<Resource<JsonObject>> = MutableLiveData() | |||
| // fun getMinAmount(requestBody: GetCodeRequest, token: String, activity: Activity) = | |||
| // viewModelScope.launch( | |||
| // Common.handleError(activity) | |||
| // ) { | |||
| // if (Common.isNetworkAvailable(activity)) { | |||
| // getMinAmountMutableData.postValue(Resource.Loading()) | |||
| // val response = mainRepository.getCodesResponse(requestBody, token) | |||
| // getMinAmountMutableData.postValue(handleResponse(response)) | |||
| // } | |||
| // } | |||
| // val getMaxAmountMutableData: MutableLiveData<Resource<JsonObject>> = MutableLiveData() | |||
| // fun getMaxAmount(requestBody: GetCodeRequest, token: String, activity: Activity) = | |||
| // viewModelScope.launch( | |||
| // Common.handleError(activity) | |||
| // ) { | |||
| // if (Common.isNetworkAvailable(activity)) { | |||
| // getMaxAmountMutableData.postValue(Resource.Loading()) | |||
| // val response = mainRepository.getCodesResponse(requestBody, token) | |||
| // getMaxAmountMutableData.postValue(handleResponse(response)) | |||
| // } | |||
| // } | |||
| } | |||
| @ -1,41 +0,0 @@ | |||
| package com.nivesh.production.bajajfd.viewModel | |||
| import androidx.lifecycle.ViewModel | |||
| import com.nivesh.production.bajajfd.repositories.MainRepository | |||
| class StepThreeBajajFDViewModel(private val mainRepository: MainRepository) : ViewModel() { | |||
| // val getTitleMutableData: MutableLiveData<Resource<JsonObject>> = MutableLiveData() | |||
| // fun titleApi(getCodeRequest: GetCodeRequest, token: String, activity: Activity) = viewModelScope.launch( | |||
| // Common.handleError(activity) | |||
| // ) { | |||
| // if (Common.isNetworkAvailable(activity)) { | |||
| // getTitleMutableData.postValue(Resource.Loading()) | |||
| // val response = mainRepository.titleCheck(getCodeRequest, token) | |||
| // getTitleMutableData.postValue(handleResponse(response)) | |||
| // } | |||
| // } | |||
| // | |||
| // val getDocumentUploadMutableData: MutableLiveData<Resource<JsonObject>> = MutableLiveData() | |||
| // fun documentsUpload(documentUpload: DocumentUpload, token: String, activity: Activity) = viewModelScope.launch( | |||
| // Common.handleError(activity) | |||
| // ) { | |||
| // if (Common.isNetworkAvailable(activity)) { | |||
| // getDocumentUploadMutableData.postValue(Resource.Loading()) | |||
| // val response = mainRepository.documentsUploadResponse(documentUpload, token) | |||
| // getDocumentUploadMutableData.postValue(handleResponse(response)) | |||
| // } | |||
| // } | |||
| // | |||
| // val getFDResponseMutableData: MutableLiveData<Resource<JsonObject>> = MutableLiveData() | |||
| // fun createFDApi(getRatesRequest: CreateFDRequest, token: String, activity: Activity) = viewModelScope.launch( | |||
| // Common.handleError(activity) | |||
| // ) { | |||
| // if (Common.isNetworkAvailable(activity)) { | |||
| // getFDResponseMutableData.postValue(Resource.Loading()) | |||
| // val response = mainRepository.createFDKYCResponse(getRatesRequest, token) | |||
| // getFDResponseMutableData.postValue(handleResponse(response)) | |||
| // } | |||
| // } | |||
| } | |||
| @ -1,174 +0,0 @@ | |||
| package com.nivesh.production.bajajfd.viewModel | |||
| import androidx.lifecycle.ViewModel | |||
| import com.nivesh.production.bajajfd.repositories.MainRepository | |||
| class StepTwoBajajFDViewModel(private val mainRepository: MainRepository) : ViewModel() { | |||
| // val getPanCheckMutableData: MutableLiveData<Resource<JsonObject>> = MutableLiveData() | |||
| // fun panCheck(panCheck: PanCheckRequest, token: String, activity : Activity) = viewModelScope.launch( | |||
| // Common.handleError(activity) | |||
| // ) { | |||
| // if (Common.isNetworkAvailable(activity)) { | |||
| // getPanCheckMutableData.postValue(Resource.Loading()) | |||
| // val response = mainRepository.panCheck(panCheck, token) | |||
| // getPanCheckMutableData.postValue(handleResponse(response)) | |||
| // } | |||
| // } | |||
| // | |||
| // val getTitleMutableData: MutableLiveData<Resource<JsonObject>> = MutableLiveData() | |||
| // fun titleApi(getCodeRequest: GetCodeRequest, token: String, activity : Activity) = viewModelScope.launch( | |||
| // Common.handleError(activity) | |||
| // ) { | |||
| // if (Common.isNetworkAvailable(activity)) { | |||
| // getTitleMutableData.postValue(Resource.Loading()) | |||
| // val response = mainRepository.titleCheck(getCodeRequest, token) | |||
| // getTitleMutableData.postValue(handleResponse(response)) | |||
| // } | |||
| // } | |||
| // | |||
| // val getGenderMutableData: MutableLiveData<Resource<JsonObject>> = MutableLiveData() | |||
| // fun genderApi(getCodeRequest: GetCodeRequest, token: String,activity : Activity) = viewModelScope.launch( | |||
| // Common.handleError(activity) | |||
| // ) { | |||
| // if (Common.isNetworkAvailable(activity)) { | |||
| // getGenderMutableData.postValue(Resource.Loading()) | |||
| // val response = mainRepository.genderCheck(getCodeRequest, token) | |||
| // getGenderMutableData.postValue(handleResponse(response)) | |||
| // } | |||
| // } | |||
| // | |||
| // val getAnnualIncomeMutableData: MutableLiveData<Resource<JsonObject>> = MutableLiveData() | |||
| // fun annualIncomeApi(getCodeRequest: GetCodeRequest, token: String,activity : Activity) = viewModelScope.launch( | |||
| // Common.handleError(activity) | |||
| // ) { | |||
| // if (Common.isNetworkAvailable(activity)) { | |||
| // getAnnualIncomeMutableData.postValue(Resource.Loading()) | |||
| // val response = mainRepository.annualIncomeCheck(getCodeRequest, token) | |||
| // getAnnualIncomeMutableData.postValue(handleResponse(response)) | |||
| // } | |||
| // } | |||
| // | |||
| // val getRelationShipMutableData: MutableLiveData<Resource<JsonObject>> = MutableLiveData() | |||
| // fun relationShipApi(getCodeRequest: GetCodeRequest, token: String,activity : Activity) = viewModelScope.launch( | |||
| // Common.handleError(activity) | |||
| // ) { | |||
| // if (Common.isNetworkAvailable(activity)) { | |||
| // getRelationShipMutableData.postValue(Resource.Loading()) | |||
| // val response = mainRepository.relationShipCheck(getCodeRequest, token) | |||
| // getRelationShipMutableData.postValue(handleResponse(response)) | |||
| // } | |||
| // } | |||
| // | |||
| // val getMaritalStatusMutableData: MutableLiveData<Resource<JsonObject>> = MutableLiveData() | |||
| // fun maritalStatusApi(getCodeRequest: GetCodeRequest, token: String,activity : Activity) = viewModelScope.launch( | |||
| // Common.handleError(activity) | |||
| // ) { | |||
| // if (Common.isNetworkAvailable(activity)) { | |||
| // getMaritalStatusMutableData.postValue(Resource.Loading()) | |||
| // val response = mainRepository.maritalStatusCheck(getCodeRequest, token) | |||
| // getMaritalStatusMutableData.postValue(handleResponse(response)) | |||
| // } | |||
| // } | |||
| // | |||
| // val getOccupationMutableData: MutableLiveData<Resource<JsonObject>> = MutableLiveData() | |||
| // fun occupationApi(getCodeRequest: GetCodeRequest, token: String,activity : Activity) = viewModelScope.launch( | |||
| // Common.handleError(activity) | |||
| // ) { | |||
| // if (Common.isNetworkAvailable(activity)) { | |||
| // getOccupationMutableData.postValue(Resource.Loading()) | |||
| // val response = mainRepository.occupationCheck(getCodeRequest, token) | |||
| // getOccupationMutableData.postValue(handleResponse(response)) | |||
| // } | |||
| // } | |||
| // | |||
| // | |||
| // val getStateMasterMutableData: MutableLiveData<Resource<JsonObject>> = MutableLiveData() | |||
| // fun stateApi(token: String,activity : Activity) = viewModelScope.launch( | |||
| // Common.handleError(activity) | |||
| // ) { | |||
| // if (Common.isNetworkAvailable(activity)) { | |||
| // getStateMasterMutableData.postValue(Resource.Loading()) | |||
| // val response = mainRepository.stateCheck(token) | |||
| // getStateMasterMutableData.postValue(handleResponse(response)) | |||
| // } | |||
| // } | |||
| // | |||
| // val getCityListMutableData: MutableLiveData<Resource<JsonObject>> = MutableLiveData() | |||
| // fun cityListApi(cityRequest: CityRequest, token: String,activity : Activity) = viewModelScope.launch( | |||
| // Common.handleError(activity) | |||
| // ) { | |||
| // if (Common.isNetworkAvailable(activity)) { | |||
| // getCityListMutableData.postValue(Resource.Loading()) | |||
| // val response = mainRepository.cityCheck(cityRequest, token) | |||
| // getCityListMutableData.postValue(handleResponse(response)) | |||
| // } | |||
| // } | |||
| // | |||
| // val getFDBankListMutableData: MutableLiveData<Resource<JsonObject>> = MutableLiveData() | |||
| // fun bankListApi( token: String,language: String, activity : Activity) = viewModelScope.launch( | |||
| // Common.handleError(activity) | |||
| // ) { | |||
| // if (Common.isNetworkAvailable(activity)) { | |||
| // getFDBankListMutableData.postValue(Resource.Loading()) | |||
| // val response = mainRepository.bankListCheck(token, language) | |||
| // getFDBankListMutableData.postValue(handleResponse(response)) | |||
| // } | |||
| // } | |||
| // | |||
| // val getIfscCodeCheckMutableData: MutableLiveData<Resource<JsonObject>> = MutableLiveData() | |||
| // fun ifscCodeApi(ifsc : String,activity : Activity) = viewModelScope.launch( | |||
| // Common.handleError(activity) | |||
| // ) { | |||
| // if (Common.isNetworkAvailable(activity)) { | |||
| // getIfscCodeCheckMutableData.postValue(Resource.Loading()) | |||
| // val response = mainRepository.ifscCodeCheck(ifsc) | |||
| // getIfscCodeCheckMutableData.postValue(handleResponse(response)) | |||
| // } | |||
| // } | |||
| // | |||
| // val getIfscCodeDetailsCheckMutableData: MutableLiveData<Resource<String>> = MutableLiveData() | |||
| // fun ifscCodeDetailsApi(ifsc : String,activity : Activity) = viewModelScope.launch( | |||
| // Common.handleError(activity) | |||
| // ) { | |||
| // if (Common.isNetworkAvailable(activity)) { | |||
| // getIfscCodeDetailsCheckMutableData.postValue(Resource.Loading()) | |||
| // val response = mainRepository.ifscCodeBankDetailsCheck(ifsc, token) | |||
| // getIfscCodeDetailsCheckMutableData.postValue(handleResponse1(response)) | |||
| // } | |||
| // } | |||
| // | |||
| // val getPaymentModeMutableData: MutableLiveData<Resource<JsonObject>> = MutableLiveData() | |||
| // fun paymentModeApi(getCodeRequest: GetCodeRequest, token: String,activity : Activity) = viewModelScope.launch( | |||
| // Common.handleError(activity) | |||
| // ) { | |||
| // if (Common.isNetworkAvailable(activity)) { | |||
| // getPaymentModeMutableData.postValue(Resource.Loading()) | |||
| // val response = mainRepository.payModeCheck(getCodeRequest, token) | |||
| // getPaymentModeMutableData.postValue(handleResponse(response)) | |||
| // } | |||
| // } | |||
| // | |||
| // val getFDResponseMutableData: MutableLiveData<Resource<JsonObject>> = MutableLiveData() | |||
| // fun createFDApi(getRatesRequest: CreateFDRequest, token: String,activity : Activity) = viewModelScope.launch( | |||
| // Common.handleError(activity) | |||
| // ) { | |||
| // if (Common.isNetworkAvailable(activity)) { | |||
| // getFDResponseMutableData.postValue(Resource.Loading()) | |||
| // val response = mainRepository.createFDKYCResponse(getRatesRequest, token) | |||
| // getFDResponseMutableData.postValue(handleResponse(response)) | |||
| // } | |||
| // } | |||
| // | |||
| // val bankValidationApiMutableData: MutableLiveData<Resource<JsonObject>> = MutableLiveData() | |||
| // fun bankValidationApi(bankValidationApiRequest : BankValidationApiRequest,token:String,activity : Activity) = viewModelScope.launch( | |||
| // Common.handleError(activity) | |||
| // ) { | |||
| // if (Common.isNetworkAvailable(activity)) { | |||
| // bankValidationApiMutableData.postValue(Resource.Loading()) | |||
| // val response = mainRepository.bankValidationApiRequest(bankValidationApiRequest,token) | |||
| // bankValidationApiMutableData.postValue(handleResponse(response)) | |||
| // } | |||
| // } | |||
| } | |||
Powered by TurnKey Linux.