package Ġcom . sam irm ac iel . pay flow _ kotlin . shared . data Ċ Ċ import Ġcom . sam irm ac iel . pay flow _ kotlin . shared . model . data repository . Payment S lip Repository Ċ import Ġcom . sam irm ac iel . pay flow _ kotlin . shared . model . data repository . Registration View Params Ċ import Ġcom . sam irm ac iel . pay flow _ kotlin . shared . model . payments lip .* Ċ Ċ class ĠPayment S lip DataSource ( Ġprivate Ġval Ġpayment S lip Dao Ġ: ĠPayment S lip DAO Ġ) Ġ: ĠPayment S lip Repository Ġ{ ĊĊĠĠĠ Ġoverride Ġsuspend Ġfun Ġsave ( registration View Params : ĠRegistration View Params ) Ġ{ ĊĠĠĠĠĠĠĠ Ġval Ġpayment S lip Entity Ġ= Ġregistration View Params . to Payment S lip Entity () ĊĠĠĠĠĠĠĠ Ġpayment S lip Dao . save ( payment S lip Entity ) ĊĠĠĠ Ġ} ĊĊĠĠĠ Ġoverride Ġsuspend Ġfun Ġfind ById ( id : ĠLong ): ĠPayment S lip Ġ{ ĊĠĠĠĠĠĠĠ Ġreturn Ġpayment S lip Dao . findById ( id ). to Payment S lip () ĊĠĠĠ Ġ} ĊĊĠĠĠ Ġoverride Ġsuspend Ġfun ĠfindAll (): ĠMutable List < Payment S lip > Ġ{ ĊĠĠĠĠĠĠĠ Ġval Ġpayment S lip List Ġ: ĠList < Payment S lip Entity > Ġ= Ġpayment S lip Dao . findAll () ĊĠĠĠĠĠĠĠ Ġvar Ġpay List Ġ: ĠMutable List < Payment S lip > Ġ= ĠArrayList () ĊĠĠĠĠĠĠĠ Ġfor Ġ( pay Ġin Ġpayment S lip List ){ ĊĠĠĠĠĠĠĠĠĠĠĠ Ġpay List . add ( pay . to Payment S lip ()) ĊĠĠĠĠĠĠĠ Ġ} ĊĠĠĠĠĠĠĠ Ġreturn Ġpay List ĊĠĠĠ Ġ} ĊĊĠĠĠ Ġoverride Ġsuspend Ġfun Ġdelete ById ( id : ĠLong ) Ġ{ ĊĠĠĠĠĠĠĠ Ġpayment S lip Dao . delete ById ( id ) ĊĠĠĠ Ġ} Ċ }