package Ġcom . ec wid . apic lient . v 3 . dto . coupon . request Ċ Ċ import Ġcom . ec wid . apic lient . v 3 . dto . ApiRequest Ċ import Ġcom . ec wid . apic lient . v 3 . dto . order . enums . Discount Coupon Status Ċ import Ġcom . ec wid . apic lient . v 3 . dto . order . enums . Discount Coupon Type Ċ import Ġcom . ec wid . apic lient . v 3 . impl . Request Info Ċ import Ġjava . util .* Ċ import Ġjava . util . concurrent . TimeUnit Ċ Ċ data Ġclass ĠCo upon Search Request ( Ċ ĉ val Ġoffset : ĠInt Ġ= Ġ 0 , Ċ ĉ val Ġlimit : ĠInt Ġ= Ġ 1 0 0 , Ċ ĉ val Ġcode : ĠString ? Ġ= Ġnull , Ċ ĉ val Ġdiscount Type : ĠSet < Discount Coupon Type >? Ġ= Ġnull , Ċ ĉ val Ġavailability : ĠDiscount Coupon Status ? Ġ= Ġnull , Ċ ĉ val Ġcreated From : ĠDate ? Ġ= Ġnull , Ċ ĉ val Ġcreated To : ĠDate ? Ġ= Ġnull , Ċ ĉ val Ġupdated From : ĠDate ? Ġ= Ġnull , Ċ ĉ val Ġupdated To : ĠDate ? Ġ= Ġnull Ċ ) Ġ: ĠApi Request Ġ{ Ċ ĉ override Ġfun Ġto Request Info () Ġ= ĠRequest Info . create GetRequest ( Ċĉ ĉ path Segments Ġ= ĠlistOf ( Ċĉĉ ĉ " discount _ coup ons " Ċĉ ĉ ), Ċĉ ĉ params Ġ= Ġto Params () Ċ ĉ ) ĊĊ ĉ private Ġfun Ġto Params (): ĠMap < String , ĠString > Ġ{ Ċĉ ĉ val Ġrequest Ġ= Ġthis Ċĉ ĉ return Ġmutable Map Of < String , ĠString >(). apply Ġ{ Ċĉĉ ĉ put (" offset ", Ġrequest . offset . toString ()) Ċĉĉ ĉ put (" limit ", Ġrequest . limit . toString ()) Ċĉĉ ĉ request . code ?. let Ġ{ Ġput (" code ", Ġit ) Ġ} Ċĉĉ ĉ request . discount Type ?. let Ġ{ Ġput (" discount _ type ", Ġit . join ToString ( separator Ġ= Ġ", ")) Ġ} Ċĉĉ ĉ request . availability ?. let Ġ{ Ġput (" availability ", Ġit . name ) Ġ} Ċĉĉ ĉ request . created From ?. let Ġ{ Ġput (" created From ", ĠTimeUnit . MILLISECONDS . to Seconds ( it . time ). toString ()) Ġ} Ċĉĉ ĉ request . created To ?. let Ġ{ Ġput (" created To ", ĠTimeUnit . MILLISECONDS . to Seconds ( it . time ). toString ()) Ġ} Ċĉĉ ĉ request . updated From ?. let Ġ{ Ġput (" updated From ", ĠTimeUnit . MILLISECONDS . to Seconds ( it . time ). toString ()) Ġ} Ċĉĉ ĉ request . updated To ?. let Ġ{ Ġput (" updated To ", ĠTimeUnit . MILLISECONDS . to Seconds ( it . time ). toString ()) Ġ} Ċĉ ĉ }. toMap () Ċ ĉ } Ċ } Ċ