/* Ċ Ġ* ĠProperty Ġof ĠAk ur ate co Ġ( https :// ak ur ate co . com ). Ċ Ġ*/ Ċ Ċ package Ġcom . ak ur ate co . sdk . feature . de serializer Ċ Ċ import Ġcom . ak ur ate co . sdk . model . api . Ak ur ate co Result Ċ import Ġcom . ak ur ate co . sdk . model . api . Ak ur ate co Status Ċ import Ġcom . ak ur ate co . sdk . model . response . base . Ak ur ate co Response Ċ import Ġcom . ak ur ate co . sdk . model . response . sale . Ak ur ate co Sale Response Ċ import Ġcom . ak ur ate co . sdk . model . response . sale . Ak ur ate co Sale Result Ċ import Ġcom . google . gson . Json Deserialization Context Ċ import Ġcom . google . gson . JsonObject Ċ Ċ /** Ċ Ġ* ĠCustom Ġde serializer Ġfor Ġthe Ġ[ com . ak ur ate co . sdk . feature . adapter . Ak ur ate co Sale Adapter ]. Ċ Ġ* Ġ@ see ĠAk ur ate co Sale Result Ċ Ġ* Ġ@ see ĠAk ur ate co Sale Response Ċ Ġ*/ Ċ class ĠAk ur ate co Sale Deserializer Ġ: ĠAk ur ate co Base Deserializer < Ak ur ate co Sale Result , ĠAk ur ate co Sale Response >() Ġ{ ĊĊĠĠĠ Ġoverride Ġfun Ġparse Result Response ( ĊĠĠĠĠĠĠĠ Ġcontext : ĠJson Deserialization Context , ĊĠĠĠĠĠĠĠ ĠjsonObject : ĠJsonObject ĊĠĠĠ Ġ): ĠAk ur ate co Response . Result < Ak ur ate co Sale Result > Ġ{ ĊĠĠĠĠĠĠĠ Ġval Ġstatus Ġ= ĠjsonObject [" status "]. asString ĊĠĠĠĠĠĠĠ Ġval Ġresult Ġ= ĠjsonObject [" result "]. asString ĊĊĠĠĠĠĠĠĠ Ġval Ġsale Result Ġ= Ġif Ġ( status . equals ( Ak ur ate co Status . SECURE _ 3 D . status , Ġignore Case Ġ= Ġtrue )) Ġ{ ĊĠĠĠĠĠĠĠĠĠĠĠ ĠAk ur ate co Sale Result . Secure 3 d ( context . parse ( jsonObject )) ĊĠĠĠĠĠĠĠ Ġ} Ġelse Ġ{ ĊĠĠĠĠĠĠĠĠĠĠĠ Ġif Ġ( result . equals ( Ak ur ate co Result . DECL IN ED . result , Ġignore Case Ġ= Ġtrue )) Ġ{ ĊĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠ ĠAk ur ate co Sale Result . Decl ine ( context . parse ( jsonObject )) ĊĠĠĠĠĠĠĠĠĠĠĠ Ġ} Ġelse Ġ{ ĊĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠ Ġif Ġ( jsonObject . has (" recurring _ token ")) Ġ{ ĊĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠ ĠAk ur ate co Sale Result . Recurring ( context . parse ( jsonObject )) ĊĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠ Ġ} Ġelse Ġ{ ĊĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠ ĠAk ur ate co Sale Result . Success ( context . parse ( jsonObject )) ĊĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠ Ġ} ĊĠĠĠĠĠĠĠĠĠĠĠ Ġ} ĊĠĠĠĠĠĠĠ Ġ} ĊĊĠĠĠĠĠĠĠ Ġreturn ĠAk ur ate co Response . Result ( sale Result ) ĊĠĠĠ Ġ} Ċ } Ċ