package Ġcom . the dev piece . gateway . api Ċ Ċ import Ġorg . springframework . boot . Spring Application Ċ import Ġorg . springframework . boot . autoconfigure . SpringBoot Application Ċ import Ġorg . springframework . web . bind . annotation . PostMapping Ċ import Ġorg . springframework . web . bind . annotation . RequestBody Ċ import Ġorg . springframework . web . bind . annotation . RequestMapping Ċ import Ġorg . springframework . web . bind . annotation . RestController Ċ import Ġjavax . validation . constraints . Min Ċ Ċ /** Ċ Ġ* Ġ@ author ĠG ab riel ĠFrancisco Ġ< pe o _ g fs il va @ u ol inc . com > Ċ Ġ*/ Ċ data Ġclass ĠPayment Mock (@ Min ( 1 ) Ġval Ġvalue : ĠInt Ġ= Ġ 0 , Ġval Ġstatus : ĠString Ġ= Ġ"") Ċ Ċ @ RestController Ċ @ RequestMapping ("/ payment ") Ċ class ĠPayment Mock Endpoint Ġ{ ĊĠĠĠ Ġ@ PostMapping ĊĠĠĠ Ġfun Ġpay (@ RequestBody Ġbody : ĠPayment Mock ): ĠPayment Mock Ġ= Ġwhen Ġ{ ĊĠĠĠĠĠĠĠ Ġbody . value Ġ== Ġ 3 0 0 0 Ġ-> ĠPayment Mock ( body . value , Ġ" PA ID ") ĊĠĠĠĠĠĠĠ Ġelse Ġ-> ĠPayment Mock ( body . value , Ġ" NOT _ PA ID ") ĊĠĠĠ Ġ} Ċ } Ċ Ċ @ SpringBoot Application Ċ open Ġclass ĠApplication Ċ Ċ fun Ġmain ( args : ĠArray < String >) Ġ{ ĊĠĠĠ ĠSpring Application . run ( Application :: class . java , Ġ* args ) Ċ }