googlegan.pp 111 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400140114021403140414051406140714081409141014111412141314141415141614171418141914201421142214231424142514261427142814291430143114321433143414351436143714381439144014411442144314441445144614471448144914501451145214531454145514561457145814591460146114621463146414651466146714681469147014711472147314741475147614771478147914801481148214831484148514861487148814891490149114921493149414951496149714981499150015011502150315041505150615071508150915101511151215131514151515161517151815191520152115221523152415251526152715281529153015311532153315341535153615371538153915401541154215431544154515461547154815491550155115521553155415551556155715581559156015611562156315641565156615671568156915701571157215731574157515761577157815791580158115821583158415851586158715881589159015911592159315941595159615971598159916001601160216031604160516061607160816091610161116121613161416151616161716181619162016211622162316241625162616271628162916301631163216331634163516361637163816391640164116421643164416451646164716481649165016511652165316541655165616571658165916601661166216631664166516661667166816691670167116721673167416751676167716781679168016811682168316841685168616871688168916901691169216931694169516961697169816991700170117021703170417051706170717081709171017111712171317141715171617171718171917201721172217231724172517261727172817291730173117321733173417351736173717381739174017411742174317441745174617471748174917501751175217531754175517561757175817591760176117621763176417651766176717681769177017711772177317741775177617771778177917801781178217831784178517861787178817891790179117921793179417951796179717981799180018011802180318041805180618071808180918101811181218131814181518161817181818191820182118221823182418251826182718281829183018311832183318341835183618371838183918401841184218431844184518461847184818491850185118521853185418551856185718581859186018611862186318641865186618671868186918701871187218731874187518761877187818791880188118821883188418851886188718881889189018911892189318941895189618971898189919001901190219031904190519061907190819091910191119121913191419151916191719181919192019211922192319241925192619271928192919301931193219331934193519361937193819391940194119421943194419451946194719481949195019511952195319541955195619571958195919601961196219631964196519661967196819691970197119721973197419751976197719781979198019811982198319841985198619871988198919901991199219931994199519961997199819992000200120022003200420052006200720082009201020112012201320142015201620172018201920202021202220232024202520262027202820292030203120322033203420352036203720382039204020412042204320442045204620472048204920502051205220532054205520562057205820592060206120622063206420652066206720682069207020712072207320742075207620772078207920802081208220832084208520862087208820892090209120922093209420952096209720982099210021012102210321042105210621072108210921102111211221132114211521162117211821192120212121222123212421252126212721282129213021312132213321342135213621372138213921402141214221432144214521462147214821492150215121522153215421552156215721582159216021612162216321642165216621672168216921702171217221732174217521762177217821792180218121822183218421852186218721882189219021912192219321942195219621972198219922002201220222032204220522062207220822092210221122122213221422152216221722182219222022212222222322242225222622272228222922302231223222332234223522362237223822392240224122422243224422452246224722482249225022512252225322542255225622572258225922602261226222632264226522662267226822692270227122722273227422752276227722782279228022812282228322842285228622872288228922902291229222932294229522962297229822992300230123022303230423052306230723082309231023112312231323142315231623172318231923202321232223232324232523262327232823292330233123322333233423352336233723382339234023412342234323442345234623472348234923502351235223532354235523562357235823592360236123622363236423652366236723682369237023712372237323742375237623772378237923802381238223832384238523862387238823892390239123922393239423952396239723982399240024012402240324042405240624072408240924102411241224132414241524162417241824192420242124222423242424252426242724282429243024312432243324342435243624372438243924402441244224432444244524462447244824492450245124522453245424552456245724582459246024612462246324642465246624672468246924702471247224732474247524762477247824792480248124822483248424852486248724882489249024912492249324942495249624972498249925002501250225032504250525062507250825092510251125122513251425152516251725182519252025212522252325242525252625272528252925302531253225332534253525362537253825392540254125422543254425452546254725482549255025512552255325542555255625572558255925602561256225632564256525662567256825692570257125722573257425752576257725782579258025812582258325842585258625872588258925902591259225932594259525962597259825992600260126022603260426052606260726082609261026112612261326142615261626172618261926202621262226232624262526262627262826292630263126322633263426352636263726382639264026412642264326442645264626472648264926502651265226532654265526562657265826592660266126622663266426652666266726682669267026712672267326742675267626772678267926802681268226832684268526862687268826892690269126922693269426952696269726982699270027012702270327042705270627072708270927102711271227132714271527162717271827192720272127222723272427252726272727282729273027312732273327342735273627372738273927402741274227432744274527462747274827492750275127522753275427552756275727582759276027612762276327642765276627672768276927702771277227732774277527762777277827792780278127822783278427852786278727882789279027912792279327942795279627972798279928002801280228032804280528062807280828092810281128122813281428152816281728182819282028212822282328242825282628272828282928302831283228332834283528362837283828392840284128422843284428452846284728482849285028512852285328542855285628572858285928602861286228632864286528662867286828692870287128722873287428752876287728782879288028812882288328842885288628872888288928902891289228932894289528962897289828992900290129022903290429052906290729082909291029112912291329142915291629172918291929202921292229232924292529262927292829292930293129322933293429352936293729382939294029412942294329442945294629472948294929502951295229532954295529562957295829592960296129622963296429652966296729682969297029712972297329742975297629772978297929802981298229832984298529862987298829892990299129922993299429952996299729982999300030013002300330043005300630073008300930103011301230133014301530163017301830193020302130223023302430253026302730283029303030313032303330343035303630373038303930403041304230433044304530463047304830493050305130523053305430553056305730583059306030613062306330643065306630673068306930703071307230733074307530763077307830793080308130823083308430853086308730883089309030913092309330943095309630973098309931003101310231033104310531063107310831093110311131123113311431153116311731183119312031213122312331243125312631273128312931303131313231333134313531363137313831393140314131423143314431453146314731483149315031513152315331543155315631573158315931603161316231633164316531663167316831693170317131723173317431753176317731783179318031813182318331843185318631873188318931903191319231933194319531963197319831993200320132023203320432053206320732083209321032113212321332143215321632173218321932203221322232233224322532263227322832293230323132323233323432353236323732383239324032413242324332443245324632473248324932503251325232533254325532563257325832593260326132623263326432653266326732683269327032713272327332743275327632773278327932803281328232833284328532863287328832893290329132923293329432953296329732983299330033013302330333043305330633073308330933103311331233133314331533163317331833193320332133223323332433253326332733283329333033313332333333343335333633373338333933403341334233433344334533463347334833493350335133523353335433553356335733583359336033613362336333643365336633673368336933703371337233733374337533763377337833793380338133823383338433853386338733883389339033913392339333943395339633973398339934003401340234033404340534063407340834093410341134123413341434153416341734183419342034213422342334243425342634273428342934303431343234333434343534363437343834393440344134423443344434453446344734483449345034513452345334543455345634573458345934603461346234633464346534663467346834693470347134723473347434753476347734783479348034813482348334843485348634873488348934903491349234933494349534963497349834993500350135023503350435053506350735083509351035113512351335143515351635173518351935203521352235233524352535263527352835293530353135323533353435353536353735383539354035413542354335443545354635473548354935503551355235533554355535563557355835593560356135623563356435653566356735683569357035713572357335743575357635773578357935803581358235833584358535863587358835893590359135923593359435953596359735983599360036013602360336043605360636073608360936103611361236133614361536163617361836193620362136223623362436253626362736283629363036313632363336343635363636373638363936403641364236433644364536463647364836493650365136523653365436553656365736583659366036613662366336643665366636673668366936703671367236733674367536763677367836793680368136823683368436853686368736883689369036913692369336943695369636973698369937003701370237033704370537063707370837093710371137123713371437153716371737183719372037213722372337243725372637273728372937303731373237333734373537363737373837393740374137423743374437453746374737483749375037513752375337543755375637573758375937603761376237633764376537663767376837693770377137723773377437753776377737783779378037813782378337843785378637873788378937903791379237933794379537963797379837993800380138023803380438053806380738083809381038113812381338143815381638173818381938203821382238233824382538263827382838293830383138323833383438353836383738383839384038413842384338443845384638473848384938503851385238533854385538563857385838593860386138623863386438653866386738683869387038713872387338743875387638773878387938803881388238833884388538863887388838893890389138923893389438953896389738983899390039013902390339043905390639073908390939103911391239133914391539163917391839193920392139223923392439253926392739283929393039313932393339343935393639373938393939403941394239433944394539463947394839493950395139523953395439553956395739583959396039613962396339643965396639673968396939703971397239733974397539763977397839793980398139823983398439853986398739883989399039913992399339943995399639973998399940004001400240034004400540064007400840094010401140124013
  1. unit googlegan;
  2. {
  3. **********************************************************************
  4. This file is part of the Free Component Library (FCL)
  5. Copyright (c) 2015 The free pascal team.
  6. See the file COPYING.FPC, included in this distribution,
  7. for details about the copyright.
  8. This program is distributed in the hope that it will be useful,
  9. but WITHOUT ANY WARRANTY; without even the implied warranty of
  10. MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
  11. **********************************************************************
  12. }
  13. //Generated on: 16-5-15 08:53:04
  14. {$MODE objfpc}
  15. {$H+}
  16. interface
  17. uses sysutils, classes, googleservice, restbase, googlebase;
  18. type
  19. //Top-level schema types
  20. TAdvertiser = Class;
  21. TAdvertisers = Class;
  22. TCcOffer = Class;
  23. TCcOffers = Class;
  24. TEvent = Class;
  25. TEvents = Class;
  26. TLink = Class;
  27. TLinks = Class;
  28. TMoney = Class;
  29. TPublisher = Class;
  30. TPublishers = Class;
  31. TReport = Class;
  32. TAdvertiserArray = Array of TAdvertiser;
  33. TAdvertisersArray = Array of TAdvertisers;
  34. TCcOfferArray = Array of TCcOffer;
  35. TCcOffersArray = Array of TCcOffers;
  36. TEventArray = Array of TEvent;
  37. TEventsArray = Array of TEvents;
  38. TLinkArray = Array of TLink;
  39. TLinksArray = Array of TLinks;
  40. TMoneyArray = Array of TMoney;
  41. TPublisherArray = Array of TPublisher;
  42. TPublishersArray = Array of TPublishers;
  43. TReportArray = Array of TReport;
  44. //Anonymous types, using auto-generated names
  45. TCcOfferTypebonusRewardsItem = Class;
  46. TCcOfferTypedefaultFeesItem = Class;
  47. TCcOfferTyperewardsItem = Class;
  48. TEventTypeproductsItem = Class;
  49. TLinkTypespecialOffers = Class;
  50. TAdvertisersTypeitemsArray = Array of TAdvertiser;
  51. TCcOfferTypebonusRewardsArray = Array of TCcOfferTypebonusRewardsItem;
  52. TCcOfferTypedefaultFeesArray = Array of TCcOfferTypedefaultFeesItem;
  53. TCcOfferTyperewardsArray = Array of TCcOfferTyperewardsItem;
  54. TCcOffersTypeitemsArray = Array of TCcOffer;
  55. TEventTypeproductsArray = Array of TEventTypeproductsItem;
  56. TEventsTypeitemsArray = Array of TEvent;
  57. TLinksTypeitemsArray = Array of TLink;
  58. TPublishersTypeitemsArray = Array of TPublisher;
  59. TReportTyperowsArray = Array of TTJSONSchemaArray;
  60. TReportTypetotals_rowsArray = Array of TTJSONSchemaArray;
  61. { --------------------------------------------------------------------
  62. TAdvertiser
  63. --------------------------------------------------------------------}
  64. TAdvertiser = Class(TGoogleBaseObject)
  65. Private
  66. FallowPublisherCreatedLinks : boolean;
  67. Fcategory : String;
  68. FcommissionDuration : integer;
  69. FcontactEmail : String;
  70. FcontactPhone : String;
  71. FdefaultLinkId : String;
  72. Fdescription : String;
  73. FepcNinetyDayAverage : TMoney;
  74. FepcSevenDayAverage : TMoney;
  75. Fid : String;
  76. Fitem : TAdvertiser;
  77. FjoinDate : TDatetime;
  78. Fkind : String;
  79. FlogoUrl : String;
  80. FmerchantCenterIds : TStringArray;
  81. Fname : String;
  82. FpayoutRank : String;
  83. FproductFeedsEnabled : boolean;
  84. FredirectDomains : TStringArray;
  85. FsiteUrl : String;
  86. Fstatus : String;
  87. Protected
  88. //Property setters
  89. Procedure SetallowPublisherCreatedLinks(AIndex : Integer; AValue : boolean); virtual;
  90. Procedure Setcategory(AIndex : Integer; const AValue : String); virtual;
  91. Procedure SetcommissionDuration(AIndex : Integer; AValue : integer); virtual;
  92. Procedure SetcontactEmail(AIndex : Integer; const AValue : String); virtual;
  93. Procedure SetcontactPhone(AIndex : Integer; const AValue : String); virtual;
  94. Procedure SetdefaultLinkId(AIndex : Integer; const AValue : String); virtual;
  95. Procedure Setdescription(AIndex : Integer; const AValue : String); virtual;
  96. Procedure SetepcNinetyDayAverage(AIndex : Integer; AValue : TMoney); virtual;
  97. Procedure SetepcSevenDayAverage(AIndex : Integer; AValue : TMoney); virtual;
  98. Procedure Setid(AIndex : Integer; const AValue : String); virtual;
  99. Procedure Setitem(AIndex : Integer; AValue : TAdvertiser); virtual;
  100. Procedure SetjoinDate(AIndex : Integer; AValue : TDatetime); virtual;
  101. Procedure Setkind(AIndex : Integer; const AValue : String); virtual;
  102. Procedure SetlogoUrl(AIndex : Integer; const AValue : String); virtual;
  103. Procedure SetmerchantCenterIds(AIndex : Integer; AValue : TStringArray); virtual;
  104. Procedure Setname(AIndex : Integer; const AValue : String); virtual;
  105. Procedure SetpayoutRank(AIndex : Integer; const AValue : String); virtual;
  106. Procedure SetproductFeedsEnabled(AIndex : Integer; AValue : boolean); virtual;
  107. Procedure SetredirectDomains(AIndex : Integer; AValue : TStringArray); virtual;
  108. Procedure SetsiteUrl(AIndex : Integer; const AValue : String); virtual;
  109. Procedure Setstatus(AIndex : Integer; const AValue : String); virtual;
  110. //2.6.4. bug workaround
  111. {$IFDEF VER2_6}
  112. Procedure SetArrayLength(Const AName : String; ALength : Longint); override;
  113. {$ENDIF VER2_6}
  114. Public
  115. Published
  116. Property allowPublisherCreatedLinks : boolean Index 0 Read FallowPublisherCreatedLinks Write SetallowPublisherCreatedLinks;
  117. Property category : String Index 8 Read Fcategory Write Setcategory;
  118. Property commissionDuration : integer Index 16 Read FcommissionDuration Write SetcommissionDuration;
  119. Property contactEmail : String Index 24 Read FcontactEmail Write SetcontactEmail;
  120. Property contactPhone : String Index 32 Read FcontactPhone Write SetcontactPhone;
  121. Property defaultLinkId : String Index 40 Read FdefaultLinkId Write SetdefaultLinkId;
  122. Property description : String Index 48 Read Fdescription Write Setdescription;
  123. Property epcNinetyDayAverage : TMoney Index 56 Read FepcNinetyDayAverage Write SetepcNinetyDayAverage;
  124. Property epcSevenDayAverage : TMoney Index 64 Read FepcSevenDayAverage Write SetepcSevenDayAverage;
  125. Property id : String Index 72 Read Fid Write Setid;
  126. Property item : TAdvertiser Index 80 Read Fitem Write Setitem;
  127. Property joinDate : TDatetime Index 88 Read FjoinDate Write SetjoinDate;
  128. Property kind : String Index 96 Read Fkind Write Setkind;
  129. Property logoUrl : String Index 104 Read FlogoUrl Write SetlogoUrl;
  130. Property merchantCenterIds : TStringArray Index 112 Read FmerchantCenterIds Write SetmerchantCenterIds;
  131. Property name : String Index 120 Read Fname Write Setname;
  132. Property payoutRank : String Index 128 Read FpayoutRank Write SetpayoutRank;
  133. Property productFeedsEnabled : boolean Index 136 Read FproductFeedsEnabled Write SetproductFeedsEnabled;
  134. Property redirectDomains : TStringArray Index 144 Read FredirectDomains Write SetredirectDomains;
  135. Property siteUrl : String Index 152 Read FsiteUrl Write SetsiteUrl;
  136. Property status : String Index 160 Read Fstatus Write Setstatus;
  137. end;
  138. TAdvertiserClass = Class of TAdvertiser;
  139. { --------------------------------------------------------------------
  140. TAdvertisers
  141. --------------------------------------------------------------------}
  142. TAdvertisers = Class(TGoogleBaseObject)
  143. Private
  144. Fitems : TAdvertisersTypeitemsArray;
  145. Fkind : String;
  146. FnextPageToken : String;
  147. Protected
  148. //Property setters
  149. Procedure Setitems(AIndex : Integer; AValue : TAdvertisersTypeitemsArray); virtual;
  150. Procedure Setkind(AIndex : Integer; const AValue : String); virtual;
  151. Procedure SetnextPageToken(AIndex : Integer; const AValue : String); virtual;
  152. //2.6.4. bug workaround
  153. {$IFDEF VER2_6}
  154. Procedure SetArrayLength(Const AName : String; ALength : Longint); override;
  155. {$ENDIF VER2_6}
  156. Public
  157. Published
  158. Property items : TAdvertisersTypeitemsArray Index 0 Read Fitems Write Setitems;
  159. Property kind : String Index 8 Read Fkind Write Setkind;
  160. Property nextPageToken : String Index 16 Read FnextPageToken Write SetnextPageToken;
  161. end;
  162. TAdvertisersClass = Class of TAdvertisers;
  163. { --------------------------------------------------------------------
  164. TCcOfferTypebonusRewardsItem
  165. --------------------------------------------------------------------}
  166. TCcOfferTypebonusRewardsItem = Class(TGoogleBaseObject)
  167. Private
  168. Famount : double;
  169. Fdetails : String;
  170. Protected
  171. //Property setters
  172. Procedure Setamount(AIndex : Integer; AValue : double); virtual;
  173. Procedure Setdetails(AIndex : Integer; const AValue : String); virtual;
  174. Public
  175. Published
  176. Property amount : double Index 0 Read Famount Write Setamount;
  177. Property details : String Index 8 Read Fdetails Write Setdetails;
  178. end;
  179. TCcOfferTypebonusRewardsItemClass = Class of TCcOfferTypebonusRewardsItem;
  180. { --------------------------------------------------------------------
  181. TCcOfferTypedefaultFeesItem
  182. --------------------------------------------------------------------}
  183. TCcOfferTypedefaultFeesItem = Class(TGoogleBaseObject)
  184. Private
  185. Fcategory : String;
  186. FmaxRate : double;
  187. FminRate : double;
  188. FrateType : String;
  189. Protected
  190. //Property setters
  191. Procedure Setcategory(AIndex : Integer; const AValue : String); virtual;
  192. Procedure SetmaxRate(AIndex : Integer; AValue : double); virtual;
  193. Procedure SetminRate(AIndex : Integer; AValue : double); virtual;
  194. Procedure SetrateType(AIndex : Integer; const AValue : String); virtual;
  195. Public
  196. Published
  197. Property category : String Index 0 Read Fcategory Write Setcategory;
  198. Property maxRate : double Index 8 Read FmaxRate Write SetmaxRate;
  199. Property minRate : double Index 16 Read FminRate Write SetminRate;
  200. Property rateType : String Index 24 Read FrateType Write SetrateType;
  201. end;
  202. TCcOfferTypedefaultFeesItemClass = Class of TCcOfferTypedefaultFeesItem;
  203. { --------------------------------------------------------------------
  204. TCcOfferTyperewardsItem
  205. --------------------------------------------------------------------}
  206. TCcOfferTyperewardsItem = Class(TGoogleBaseObject)
  207. Private
  208. FadditionalDetails : String;
  209. Famount : double;
  210. Fcategory : String;
  211. FexpirationMonths : double;
  212. FmaxRewardTier : double;
  213. FminRewardTier : double;
  214. Protected
  215. //Property setters
  216. Procedure SetadditionalDetails(AIndex : Integer; const AValue : String); virtual;
  217. Procedure Setamount(AIndex : Integer; AValue : double); virtual;
  218. Procedure Setcategory(AIndex : Integer; const AValue : String); virtual;
  219. Procedure SetexpirationMonths(AIndex : Integer; AValue : double); virtual;
  220. Procedure SetmaxRewardTier(AIndex : Integer; AValue : double); virtual;
  221. Procedure SetminRewardTier(AIndex : Integer; AValue : double); virtual;
  222. Public
  223. Published
  224. Property additionalDetails : String Index 0 Read FadditionalDetails Write SetadditionalDetails;
  225. Property amount : double Index 8 Read Famount Write Setamount;
  226. Property category : String Index 16 Read Fcategory Write Setcategory;
  227. Property expirationMonths : double Index 24 Read FexpirationMonths Write SetexpirationMonths;
  228. Property maxRewardTier : double Index 32 Read FmaxRewardTier Write SetmaxRewardTier;
  229. Property minRewardTier : double Index 40 Read FminRewardTier Write SetminRewardTier;
  230. end;
  231. TCcOfferTyperewardsItemClass = Class of TCcOfferTyperewardsItem;
  232. { --------------------------------------------------------------------
  233. TCcOffer
  234. --------------------------------------------------------------------}
  235. TCcOffer = Class(TGoogleBaseObject)
  236. Private
  237. FadditionalCardBenefits : TStringArray;
  238. FadditionalCardHolderFee : String;
  239. FageMinimum : double;
  240. FageMinimumDetails : String;
  241. FannualFee : double;
  242. FannualFeeDisplay : String;
  243. FannualRewardMaximum : double;
  244. FapprovedCategories : TStringArray;
  245. FaprDisplay : String;
  246. FbalanceComputationMethod : String;
  247. FbalanceTransferTerms : String;
  248. FbonusRewards : TCcOfferTypebonusRewardsArray;
  249. FcarRentalInsurance : String;
  250. FcardBenefits : TStringArray;
  251. FcardName : String;
  252. FcardType : String;
  253. FcashAdvanceTerms : String;
  254. FcreditLimitMax : double;
  255. FcreditLimitMin : double;
  256. FcreditRatingDisplay : String;
  257. FdefaultFees : TCcOfferTypedefaultFeesArray;
  258. Fdisclaimer : String;
  259. FemergencyInsurance : String;
  260. FexistingCustomerOnly : boolean;
  261. FextendedWarranty : String;
  262. FfirstYearAnnualFee : double;
  263. FflightAccidentInsurance : String;
  264. FforeignCurrencyTransactionFee : String;
  265. FfraudLiability : String;
  266. FgracePeriodDisplay : String;
  267. FimageUrl : String;
  268. FinitialSetupAndProcessingFee : String;
  269. FintroBalanceTransferTerms : String;
  270. FintroCashAdvanceTerms : String;
  271. FintroPurchaseTerms : String;
  272. Fissuer : String;
  273. FissuerId : String;
  274. FissuerWebsite : String;
  275. Fkind : String;
  276. FlandingPageUrl : String;
  277. FlatePaymentFee : String;
  278. FluggageInsurance : String;
  279. FmaxPurchaseRate : double;
  280. FminPurchaseRate : double;
  281. FminimumFinanceCharge : String;
  282. Fnetwork : String;
  283. FofferId : String;
  284. FoffersImmediateCashReward : boolean;
  285. FoverLimitFee : String;
  286. FprohibitedCategories : TStringArray;
  287. FpurchaseRateAdditionalDetails : String;
  288. FpurchaseRateType : String;
  289. FreturnedPaymentFee : String;
  290. FrewardPartner : String;
  291. FrewardUnit : String;
  292. Frewards : TCcOfferTyperewardsArray;
  293. FrewardsExpire : boolean;
  294. FrewardsHaveBlackoutDates : boolean;
  295. FstatementCopyFee : String;
  296. FtrackingUrl : String;
  297. FtravelInsurance : String;
  298. FvariableRatesLastUpdated : String;
  299. FvariableRatesUpdateFrequency : String;
  300. Protected
  301. //Property setters
  302. Procedure SetadditionalCardBenefits(AIndex : Integer; AValue : TStringArray); virtual;
  303. Procedure SetadditionalCardHolderFee(AIndex : Integer; const AValue : String); virtual;
  304. Procedure SetageMinimum(AIndex : Integer; AValue : double); virtual;
  305. Procedure SetageMinimumDetails(AIndex : Integer; const AValue : String); virtual;
  306. Procedure SetannualFee(AIndex : Integer; AValue : double); virtual;
  307. Procedure SetannualFeeDisplay(AIndex : Integer; const AValue : String); virtual;
  308. Procedure SetannualRewardMaximum(AIndex : Integer; AValue : double); virtual;
  309. Procedure SetapprovedCategories(AIndex : Integer; AValue : TStringArray); virtual;
  310. Procedure SetaprDisplay(AIndex : Integer; const AValue : String); virtual;
  311. Procedure SetbalanceComputationMethod(AIndex : Integer; const AValue : String); virtual;
  312. Procedure SetbalanceTransferTerms(AIndex : Integer; const AValue : String); virtual;
  313. Procedure SetbonusRewards(AIndex : Integer; AValue : TCcOfferTypebonusRewardsArray); virtual;
  314. Procedure SetcarRentalInsurance(AIndex : Integer; const AValue : String); virtual;
  315. Procedure SetcardBenefits(AIndex : Integer; AValue : TStringArray); virtual;
  316. Procedure SetcardName(AIndex : Integer; const AValue : String); virtual;
  317. Procedure SetcardType(AIndex : Integer; const AValue : String); virtual;
  318. Procedure SetcashAdvanceTerms(AIndex : Integer; const AValue : String); virtual;
  319. Procedure SetcreditLimitMax(AIndex : Integer; AValue : double); virtual;
  320. Procedure SetcreditLimitMin(AIndex : Integer; AValue : double); virtual;
  321. Procedure SetcreditRatingDisplay(AIndex : Integer; const AValue : String); virtual;
  322. Procedure SetdefaultFees(AIndex : Integer; AValue : TCcOfferTypedefaultFeesArray); virtual;
  323. Procedure Setdisclaimer(AIndex : Integer; const AValue : String); virtual;
  324. Procedure SetemergencyInsurance(AIndex : Integer; const AValue : String); virtual;
  325. Procedure SetexistingCustomerOnly(AIndex : Integer; AValue : boolean); virtual;
  326. Procedure SetextendedWarranty(AIndex : Integer; const AValue : String); virtual;
  327. Procedure SetfirstYearAnnualFee(AIndex : Integer; AValue : double); virtual;
  328. Procedure SetflightAccidentInsurance(AIndex : Integer; const AValue : String); virtual;
  329. Procedure SetforeignCurrencyTransactionFee(AIndex : Integer; const AValue : String); virtual;
  330. Procedure SetfraudLiability(AIndex : Integer; const AValue : String); virtual;
  331. Procedure SetgracePeriodDisplay(AIndex : Integer; const AValue : String); virtual;
  332. Procedure SetimageUrl(AIndex : Integer; const AValue : String); virtual;
  333. Procedure SetinitialSetupAndProcessingFee(AIndex : Integer; const AValue : String); virtual;
  334. Procedure SetintroBalanceTransferTerms(AIndex : Integer; const AValue : String); virtual;
  335. Procedure SetintroCashAdvanceTerms(AIndex : Integer; const AValue : String); virtual;
  336. Procedure SetintroPurchaseTerms(AIndex : Integer; const AValue : String); virtual;
  337. Procedure Setissuer(AIndex : Integer; const AValue : String); virtual;
  338. Procedure SetissuerId(AIndex : Integer; const AValue : String); virtual;
  339. Procedure SetissuerWebsite(AIndex : Integer; const AValue : String); virtual;
  340. Procedure Setkind(AIndex : Integer; const AValue : String); virtual;
  341. Procedure SetlandingPageUrl(AIndex : Integer; const AValue : String); virtual;
  342. Procedure SetlatePaymentFee(AIndex : Integer; const AValue : String); virtual;
  343. Procedure SetluggageInsurance(AIndex : Integer; const AValue : String); virtual;
  344. Procedure SetmaxPurchaseRate(AIndex : Integer; AValue : double); virtual;
  345. Procedure SetminPurchaseRate(AIndex : Integer; AValue : double); virtual;
  346. Procedure SetminimumFinanceCharge(AIndex : Integer; const AValue : String); virtual;
  347. Procedure Setnetwork(AIndex : Integer; const AValue : String); virtual;
  348. Procedure SetofferId(AIndex : Integer; const AValue : String); virtual;
  349. Procedure SetoffersImmediateCashReward(AIndex : Integer; AValue : boolean); virtual;
  350. Procedure SetoverLimitFee(AIndex : Integer; const AValue : String); virtual;
  351. Procedure SetprohibitedCategories(AIndex : Integer; AValue : TStringArray); virtual;
  352. Procedure SetpurchaseRateAdditionalDetails(AIndex : Integer; const AValue : String); virtual;
  353. Procedure SetpurchaseRateType(AIndex : Integer; const AValue : String); virtual;
  354. Procedure SetreturnedPaymentFee(AIndex : Integer; const AValue : String); virtual;
  355. Procedure SetrewardPartner(AIndex : Integer; const AValue : String); virtual;
  356. Procedure SetrewardUnit(AIndex : Integer; const AValue : String); virtual;
  357. Procedure Setrewards(AIndex : Integer; AValue : TCcOfferTyperewardsArray); virtual;
  358. Procedure SetrewardsExpire(AIndex : Integer; AValue : boolean); virtual;
  359. Procedure SetrewardsHaveBlackoutDates(AIndex : Integer; AValue : boolean); virtual;
  360. Procedure SetstatementCopyFee(AIndex : Integer; const AValue : String); virtual;
  361. Procedure SettrackingUrl(AIndex : Integer; const AValue : String); virtual;
  362. Procedure SettravelInsurance(AIndex : Integer; const AValue : String); virtual;
  363. Procedure SetvariableRatesLastUpdated(AIndex : Integer; const AValue : String); virtual;
  364. Procedure SetvariableRatesUpdateFrequency(AIndex : Integer; const AValue : String); virtual;
  365. //2.6.4. bug workaround
  366. {$IFDEF VER2_6}
  367. Procedure SetArrayLength(Const AName : String; ALength : Longint); override;
  368. {$ENDIF VER2_6}
  369. Public
  370. Published
  371. Property additionalCardBenefits : TStringArray Index 0 Read FadditionalCardBenefits Write SetadditionalCardBenefits;
  372. Property additionalCardHolderFee : String Index 8 Read FadditionalCardHolderFee Write SetadditionalCardHolderFee;
  373. Property ageMinimum : double Index 16 Read FageMinimum Write SetageMinimum;
  374. Property ageMinimumDetails : String Index 24 Read FageMinimumDetails Write SetageMinimumDetails;
  375. Property annualFee : double Index 32 Read FannualFee Write SetannualFee;
  376. Property annualFeeDisplay : String Index 40 Read FannualFeeDisplay Write SetannualFeeDisplay;
  377. Property annualRewardMaximum : double Index 48 Read FannualRewardMaximum Write SetannualRewardMaximum;
  378. Property approvedCategories : TStringArray Index 56 Read FapprovedCategories Write SetapprovedCategories;
  379. Property aprDisplay : String Index 64 Read FaprDisplay Write SetaprDisplay;
  380. Property balanceComputationMethod : String Index 72 Read FbalanceComputationMethod Write SetbalanceComputationMethod;
  381. Property balanceTransferTerms : String Index 80 Read FbalanceTransferTerms Write SetbalanceTransferTerms;
  382. Property bonusRewards : TCcOfferTypebonusRewardsArray Index 88 Read FbonusRewards Write SetbonusRewards;
  383. Property carRentalInsurance : String Index 96 Read FcarRentalInsurance Write SetcarRentalInsurance;
  384. Property cardBenefits : TStringArray Index 104 Read FcardBenefits Write SetcardBenefits;
  385. Property cardName : String Index 112 Read FcardName Write SetcardName;
  386. Property cardType : String Index 120 Read FcardType Write SetcardType;
  387. Property cashAdvanceTerms : String Index 128 Read FcashAdvanceTerms Write SetcashAdvanceTerms;
  388. Property creditLimitMax : double Index 136 Read FcreditLimitMax Write SetcreditLimitMax;
  389. Property creditLimitMin : double Index 144 Read FcreditLimitMin Write SetcreditLimitMin;
  390. Property creditRatingDisplay : String Index 152 Read FcreditRatingDisplay Write SetcreditRatingDisplay;
  391. Property defaultFees : TCcOfferTypedefaultFeesArray Index 160 Read FdefaultFees Write SetdefaultFees;
  392. Property disclaimer : String Index 168 Read Fdisclaimer Write Setdisclaimer;
  393. Property emergencyInsurance : String Index 176 Read FemergencyInsurance Write SetemergencyInsurance;
  394. Property existingCustomerOnly : boolean Index 184 Read FexistingCustomerOnly Write SetexistingCustomerOnly;
  395. Property extendedWarranty : String Index 192 Read FextendedWarranty Write SetextendedWarranty;
  396. Property firstYearAnnualFee : double Index 200 Read FfirstYearAnnualFee Write SetfirstYearAnnualFee;
  397. Property flightAccidentInsurance : String Index 208 Read FflightAccidentInsurance Write SetflightAccidentInsurance;
  398. Property foreignCurrencyTransactionFee : String Index 216 Read FforeignCurrencyTransactionFee Write SetforeignCurrencyTransactionFee;
  399. Property fraudLiability : String Index 224 Read FfraudLiability Write SetfraudLiability;
  400. Property gracePeriodDisplay : String Index 232 Read FgracePeriodDisplay Write SetgracePeriodDisplay;
  401. Property imageUrl : String Index 240 Read FimageUrl Write SetimageUrl;
  402. Property initialSetupAndProcessingFee : String Index 248 Read FinitialSetupAndProcessingFee Write SetinitialSetupAndProcessingFee;
  403. Property introBalanceTransferTerms : String Index 256 Read FintroBalanceTransferTerms Write SetintroBalanceTransferTerms;
  404. Property introCashAdvanceTerms : String Index 264 Read FintroCashAdvanceTerms Write SetintroCashAdvanceTerms;
  405. Property introPurchaseTerms : String Index 272 Read FintroPurchaseTerms Write SetintroPurchaseTerms;
  406. Property issuer : String Index 280 Read Fissuer Write Setissuer;
  407. Property issuerId : String Index 288 Read FissuerId Write SetissuerId;
  408. Property issuerWebsite : String Index 296 Read FissuerWebsite Write SetissuerWebsite;
  409. Property kind : String Index 304 Read Fkind Write Setkind;
  410. Property landingPageUrl : String Index 312 Read FlandingPageUrl Write SetlandingPageUrl;
  411. Property latePaymentFee : String Index 320 Read FlatePaymentFee Write SetlatePaymentFee;
  412. Property luggageInsurance : String Index 328 Read FluggageInsurance Write SetluggageInsurance;
  413. Property maxPurchaseRate : double Index 336 Read FmaxPurchaseRate Write SetmaxPurchaseRate;
  414. Property minPurchaseRate : double Index 344 Read FminPurchaseRate Write SetminPurchaseRate;
  415. Property minimumFinanceCharge : String Index 352 Read FminimumFinanceCharge Write SetminimumFinanceCharge;
  416. Property network : String Index 360 Read Fnetwork Write Setnetwork;
  417. Property offerId : String Index 368 Read FofferId Write SetofferId;
  418. Property offersImmediateCashReward : boolean Index 376 Read FoffersImmediateCashReward Write SetoffersImmediateCashReward;
  419. Property overLimitFee : String Index 384 Read FoverLimitFee Write SetoverLimitFee;
  420. Property prohibitedCategories : TStringArray Index 392 Read FprohibitedCategories Write SetprohibitedCategories;
  421. Property purchaseRateAdditionalDetails : String Index 400 Read FpurchaseRateAdditionalDetails Write SetpurchaseRateAdditionalDetails;
  422. Property purchaseRateType : String Index 408 Read FpurchaseRateType Write SetpurchaseRateType;
  423. Property returnedPaymentFee : String Index 416 Read FreturnedPaymentFee Write SetreturnedPaymentFee;
  424. Property rewardPartner : String Index 424 Read FrewardPartner Write SetrewardPartner;
  425. Property rewardUnit : String Index 432 Read FrewardUnit Write SetrewardUnit;
  426. Property rewards : TCcOfferTyperewardsArray Index 440 Read Frewards Write Setrewards;
  427. Property rewardsExpire : boolean Index 448 Read FrewardsExpire Write SetrewardsExpire;
  428. Property rewardsHaveBlackoutDates : boolean Index 456 Read FrewardsHaveBlackoutDates Write SetrewardsHaveBlackoutDates;
  429. Property statementCopyFee : String Index 464 Read FstatementCopyFee Write SetstatementCopyFee;
  430. Property trackingUrl : String Index 472 Read FtrackingUrl Write SettrackingUrl;
  431. Property travelInsurance : String Index 480 Read FtravelInsurance Write SettravelInsurance;
  432. Property variableRatesLastUpdated : String Index 488 Read FvariableRatesLastUpdated Write SetvariableRatesLastUpdated;
  433. Property variableRatesUpdateFrequency : String Index 496 Read FvariableRatesUpdateFrequency Write SetvariableRatesUpdateFrequency;
  434. end;
  435. TCcOfferClass = Class of TCcOffer;
  436. { --------------------------------------------------------------------
  437. TCcOffers
  438. --------------------------------------------------------------------}
  439. TCcOffers = Class(TGoogleBaseObject)
  440. Private
  441. Fitems : TCcOffersTypeitemsArray;
  442. Fkind : String;
  443. Protected
  444. //Property setters
  445. Procedure Setitems(AIndex : Integer; AValue : TCcOffersTypeitemsArray); virtual;
  446. Procedure Setkind(AIndex : Integer; const AValue : String); virtual;
  447. //2.6.4. bug workaround
  448. {$IFDEF VER2_6}
  449. Procedure SetArrayLength(Const AName : String; ALength : Longint); override;
  450. {$ENDIF VER2_6}
  451. Public
  452. Published
  453. Property items : TCcOffersTypeitemsArray Index 0 Read Fitems Write Setitems;
  454. Property kind : String Index 8 Read Fkind Write Setkind;
  455. end;
  456. TCcOffersClass = Class of TCcOffers;
  457. { --------------------------------------------------------------------
  458. TEventTypeproductsItem
  459. --------------------------------------------------------------------}
  460. TEventTypeproductsItem = Class(TGoogleBaseObject)
  461. Private
  462. FcategoryId : String;
  463. FcategoryName : String;
  464. Fearnings : TMoney;
  465. FnetworkFee : TMoney;
  466. FpublisherFee : TMoney;
  467. Fquantity : String;
  468. Fsku : String;
  469. FskuName : String;
  470. FunitPrice : TMoney;
  471. Protected
  472. //Property setters
  473. Procedure SetcategoryId(AIndex : Integer; const AValue : String); virtual;
  474. Procedure SetcategoryName(AIndex : Integer; const AValue : String); virtual;
  475. Procedure Setearnings(AIndex : Integer; AValue : TMoney); virtual;
  476. Procedure SetnetworkFee(AIndex : Integer; AValue : TMoney); virtual;
  477. Procedure SetpublisherFee(AIndex : Integer; AValue : TMoney); virtual;
  478. Procedure Setquantity(AIndex : Integer; const AValue : String); virtual;
  479. Procedure Setsku(AIndex : Integer; const AValue : String); virtual;
  480. Procedure SetskuName(AIndex : Integer; const AValue : String); virtual;
  481. Procedure SetunitPrice(AIndex : Integer; AValue : TMoney); virtual;
  482. Public
  483. Published
  484. Property categoryId : String Index 0 Read FcategoryId Write SetcategoryId;
  485. Property categoryName : String Index 8 Read FcategoryName Write SetcategoryName;
  486. Property earnings : TMoney Index 16 Read Fearnings Write Setearnings;
  487. Property networkFee : TMoney Index 24 Read FnetworkFee Write SetnetworkFee;
  488. Property publisherFee : TMoney Index 32 Read FpublisherFee Write SetpublisherFee;
  489. Property quantity : String Index 40 Read Fquantity Write Setquantity;
  490. Property sku : String Index 48 Read Fsku Write Setsku;
  491. Property skuName : String Index 56 Read FskuName Write SetskuName;
  492. Property unitPrice : TMoney Index 64 Read FunitPrice Write SetunitPrice;
  493. end;
  494. TEventTypeproductsItemClass = Class of TEventTypeproductsItem;
  495. { --------------------------------------------------------------------
  496. TEvent
  497. --------------------------------------------------------------------}
  498. TEvent = Class(TGoogleBaseObject)
  499. Private
  500. FadvertiserId : String;
  501. FadvertiserName : String;
  502. FchargeId : String;
  503. FchargeType : String;
  504. FcommissionableSales : TMoney;
  505. Fearnings : TMoney;
  506. FeventDate : TDatetime;
  507. Fkind : String;
  508. FmemberId : String;
  509. FmodifyDate : TDatetime;
  510. FnetworkFee : TMoney;
  511. ForderId : String;
  512. Fproducts : TEventTypeproductsArray;
  513. FpublisherFee : TMoney;
  514. FpublisherId : String;
  515. FpublisherName : String;
  516. Fstatus : String;
  517. F_type : String;
  518. Protected
  519. Class Function ExportPropertyName(Const AName : String) : string; override;
  520. //Property setters
  521. Procedure SetadvertiserId(AIndex : Integer; const AValue : String); virtual;
  522. Procedure SetadvertiserName(AIndex : Integer; const AValue : String); virtual;
  523. Procedure SetchargeId(AIndex : Integer; const AValue : String); virtual;
  524. Procedure SetchargeType(AIndex : Integer; const AValue : String); virtual;
  525. Procedure SetcommissionableSales(AIndex : Integer; AValue : TMoney); virtual;
  526. Procedure Setearnings(AIndex : Integer; AValue : TMoney); virtual;
  527. Procedure SeteventDate(AIndex : Integer; AValue : TDatetime); virtual;
  528. Procedure Setkind(AIndex : Integer; const AValue : String); virtual;
  529. Procedure SetmemberId(AIndex : Integer; const AValue : String); virtual;
  530. Procedure SetmodifyDate(AIndex : Integer; AValue : TDatetime); virtual;
  531. Procedure SetnetworkFee(AIndex : Integer; AValue : TMoney); virtual;
  532. Procedure SetorderId(AIndex : Integer; const AValue : String); virtual;
  533. Procedure Setproducts(AIndex : Integer; AValue : TEventTypeproductsArray); virtual;
  534. Procedure SetpublisherFee(AIndex : Integer; AValue : TMoney); virtual;
  535. Procedure SetpublisherId(AIndex : Integer; const AValue : String); virtual;
  536. Procedure SetpublisherName(AIndex : Integer; const AValue : String); virtual;
  537. Procedure Setstatus(AIndex : Integer; const AValue : String); virtual;
  538. Procedure Set_type(AIndex : Integer; const AValue : String); virtual;
  539. //2.6.4. bug workaround
  540. {$IFDEF VER2_6}
  541. Procedure SetArrayLength(Const AName : String; ALength : Longint); override;
  542. {$ENDIF VER2_6}
  543. Public
  544. Published
  545. Property advertiserId : String Index 0 Read FadvertiserId Write SetadvertiserId;
  546. Property advertiserName : String Index 8 Read FadvertiserName Write SetadvertiserName;
  547. Property chargeId : String Index 16 Read FchargeId Write SetchargeId;
  548. Property chargeType : String Index 24 Read FchargeType Write SetchargeType;
  549. Property commissionableSales : TMoney Index 32 Read FcommissionableSales Write SetcommissionableSales;
  550. Property earnings : TMoney Index 40 Read Fearnings Write Setearnings;
  551. Property eventDate : TDatetime Index 48 Read FeventDate Write SeteventDate;
  552. Property kind : String Index 56 Read Fkind Write Setkind;
  553. Property memberId : String Index 64 Read FmemberId Write SetmemberId;
  554. Property modifyDate : TDatetime Index 72 Read FmodifyDate Write SetmodifyDate;
  555. Property networkFee : TMoney Index 80 Read FnetworkFee Write SetnetworkFee;
  556. Property orderId : String Index 88 Read ForderId Write SetorderId;
  557. Property products : TEventTypeproductsArray Index 96 Read Fproducts Write Setproducts;
  558. Property publisherFee : TMoney Index 104 Read FpublisherFee Write SetpublisherFee;
  559. Property publisherId : String Index 112 Read FpublisherId Write SetpublisherId;
  560. Property publisherName : String Index 120 Read FpublisherName Write SetpublisherName;
  561. Property status : String Index 128 Read Fstatus Write Setstatus;
  562. Property _type : String Index 136 Read F_type Write Set_type;
  563. end;
  564. TEventClass = Class of TEvent;
  565. { --------------------------------------------------------------------
  566. TEvents
  567. --------------------------------------------------------------------}
  568. TEvents = Class(TGoogleBaseObject)
  569. Private
  570. Fitems : TEventsTypeitemsArray;
  571. Fkind : String;
  572. FnextPageToken : String;
  573. Protected
  574. //Property setters
  575. Procedure Setitems(AIndex : Integer; AValue : TEventsTypeitemsArray); virtual;
  576. Procedure Setkind(AIndex : Integer; const AValue : String); virtual;
  577. Procedure SetnextPageToken(AIndex : Integer; const AValue : String); virtual;
  578. //2.6.4. bug workaround
  579. {$IFDEF VER2_6}
  580. Procedure SetArrayLength(Const AName : String; ALength : Longint); override;
  581. {$ENDIF VER2_6}
  582. Public
  583. Published
  584. Property items : TEventsTypeitemsArray Index 0 Read Fitems Write Setitems;
  585. Property kind : String Index 8 Read Fkind Write Setkind;
  586. Property nextPageToken : String Index 16 Read FnextPageToken Write SetnextPageToken;
  587. end;
  588. TEventsClass = Class of TEvents;
  589. { --------------------------------------------------------------------
  590. TLinkTypespecialOffers
  591. --------------------------------------------------------------------}
  592. TLinkTypespecialOffers = Class(TGoogleBaseObject)
  593. Private
  594. FfreeGift : boolean;
  595. FfreeShipping : boolean;
  596. FfreeShippingMin : TMoney;
  597. FpercentOff : double;
  598. FpercentOffMin : TMoney;
  599. FpriceCut : TMoney;
  600. FpriceCutMin : TMoney;
  601. FpromotionCodes : TStringArray;
  602. Protected
  603. //Property setters
  604. Procedure SetfreeGift(AIndex : Integer; AValue : boolean); virtual;
  605. Procedure SetfreeShipping(AIndex : Integer; AValue : boolean); virtual;
  606. Procedure SetfreeShippingMin(AIndex : Integer; AValue : TMoney); virtual;
  607. Procedure SetpercentOff(AIndex : Integer; AValue : double); virtual;
  608. Procedure SetpercentOffMin(AIndex : Integer; AValue : TMoney); virtual;
  609. Procedure SetpriceCut(AIndex : Integer; AValue : TMoney); virtual;
  610. Procedure SetpriceCutMin(AIndex : Integer; AValue : TMoney); virtual;
  611. Procedure SetpromotionCodes(AIndex : Integer; AValue : TStringArray); virtual;
  612. //2.6.4. bug workaround
  613. {$IFDEF VER2_6}
  614. Procedure SetArrayLength(Const AName : String; ALength : Longint); override;
  615. {$ENDIF VER2_6}
  616. Public
  617. Published
  618. Property freeGift : boolean Index 0 Read FfreeGift Write SetfreeGift;
  619. Property freeShipping : boolean Index 8 Read FfreeShipping Write SetfreeShipping;
  620. Property freeShippingMin : TMoney Index 16 Read FfreeShippingMin Write SetfreeShippingMin;
  621. Property percentOff : double Index 24 Read FpercentOff Write SetpercentOff;
  622. Property percentOffMin : TMoney Index 32 Read FpercentOffMin Write SetpercentOffMin;
  623. Property priceCut : TMoney Index 40 Read FpriceCut Write SetpriceCut;
  624. Property priceCutMin : TMoney Index 48 Read FpriceCutMin Write SetpriceCutMin;
  625. Property promotionCodes : TStringArray Index 56 Read FpromotionCodes Write SetpromotionCodes;
  626. end;
  627. TLinkTypespecialOffersClass = Class of TLinkTypespecialOffers;
  628. { --------------------------------------------------------------------
  629. TLink
  630. --------------------------------------------------------------------}
  631. TLink = Class(TGoogleBaseObject)
  632. Private
  633. FadvertiserId : String;
  634. Fauthorship : String;
  635. Favailability : String;
  636. FclickTrackingUrl : String;
  637. FcreateDate : TDatetime;
  638. Fdescription : String;
  639. FdestinationUrl : String;
  640. Fduration : String;
  641. FendDate : TDatetime;
  642. FepcNinetyDayAverage : TMoney;
  643. FepcSevenDayAverage : TMoney;
  644. Fid : String;
  645. FimageAltText : String;
  646. FimpressionTrackingUrl : String;
  647. FisActive : boolean;
  648. Fkind : String;
  649. FlinkType : String;
  650. Fname : String;
  651. FpromotionType : String;
  652. FspecialOffers : TLinkTypespecialOffers;
  653. FstartDate : TDatetime;
  654. Protected
  655. //Property setters
  656. Procedure SetadvertiserId(AIndex : Integer; const AValue : String); virtual;
  657. Procedure Setauthorship(AIndex : Integer; const AValue : String); virtual;
  658. Procedure Setavailability(AIndex : Integer; const AValue : String); virtual;
  659. Procedure SetclickTrackingUrl(AIndex : Integer; const AValue : String); virtual;
  660. Procedure SetcreateDate(AIndex : Integer; AValue : TDatetime); virtual;
  661. Procedure Setdescription(AIndex : Integer; const AValue : String); virtual;
  662. Procedure SetdestinationUrl(AIndex : Integer; const AValue : String); virtual;
  663. Procedure Setduration(AIndex : Integer; const AValue : String); virtual;
  664. Procedure SetendDate(AIndex : Integer; AValue : TDatetime); virtual;
  665. Procedure SetepcNinetyDayAverage(AIndex : Integer; AValue : TMoney); virtual;
  666. Procedure SetepcSevenDayAverage(AIndex : Integer; AValue : TMoney); virtual;
  667. Procedure Setid(AIndex : Integer; const AValue : String); virtual;
  668. Procedure SetimageAltText(AIndex : Integer; const AValue : String); virtual;
  669. Procedure SetimpressionTrackingUrl(AIndex : Integer; const AValue : String); virtual;
  670. Procedure SetisActive(AIndex : Integer; AValue : boolean); virtual;
  671. Procedure Setkind(AIndex : Integer; const AValue : String); virtual;
  672. Procedure SetlinkType(AIndex : Integer; const AValue : String); virtual;
  673. Procedure Setname(AIndex : Integer; const AValue : String); virtual;
  674. Procedure SetpromotionType(AIndex : Integer; const AValue : String); virtual;
  675. Procedure SetspecialOffers(AIndex : Integer; AValue : TLinkTypespecialOffers); virtual;
  676. Procedure SetstartDate(AIndex : Integer; AValue : TDatetime); virtual;
  677. Public
  678. Published
  679. Property advertiserId : String Index 0 Read FadvertiserId Write SetadvertiserId;
  680. Property authorship : String Index 8 Read Fauthorship Write Setauthorship;
  681. Property availability : String Index 16 Read Favailability Write Setavailability;
  682. Property clickTrackingUrl : String Index 24 Read FclickTrackingUrl Write SetclickTrackingUrl;
  683. Property createDate : TDatetime Index 32 Read FcreateDate Write SetcreateDate;
  684. Property description : String Index 40 Read Fdescription Write Setdescription;
  685. Property destinationUrl : String Index 48 Read FdestinationUrl Write SetdestinationUrl;
  686. Property duration : String Index 56 Read Fduration Write Setduration;
  687. Property endDate : TDatetime Index 64 Read FendDate Write SetendDate;
  688. Property epcNinetyDayAverage : TMoney Index 72 Read FepcNinetyDayAverage Write SetepcNinetyDayAverage;
  689. Property epcSevenDayAverage : TMoney Index 80 Read FepcSevenDayAverage Write SetepcSevenDayAverage;
  690. Property id : String Index 88 Read Fid Write Setid;
  691. Property imageAltText : String Index 96 Read FimageAltText Write SetimageAltText;
  692. Property impressionTrackingUrl : String Index 104 Read FimpressionTrackingUrl Write SetimpressionTrackingUrl;
  693. Property isActive : boolean Index 112 Read FisActive Write SetisActive;
  694. Property kind : String Index 120 Read Fkind Write Setkind;
  695. Property linkType : String Index 128 Read FlinkType Write SetlinkType;
  696. Property name : String Index 136 Read Fname Write Setname;
  697. Property promotionType : String Index 144 Read FpromotionType Write SetpromotionType;
  698. Property specialOffers : TLinkTypespecialOffers Index 152 Read FspecialOffers Write SetspecialOffers;
  699. Property startDate : TDatetime Index 160 Read FstartDate Write SetstartDate;
  700. end;
  701. TLinkClass = Class of TLink;
  702. { --------------------------------------------------------------------
  703. TLinks
  704. --------------------------------------------------------------------}
  705. TLinks = Class(TGoogleBaseObject)
  706. Private
  707. Fitems : TLinksTypeitemsArray;
  708. Fkind : String;
  709. FnextPageToken : String;
  710. Protected
  711. //Property setters
  712. Procedure Setitems(AIndex : Integer; AValue : TLinksTypeitemsArray); virtual;
  713. Procedure Setkind(AIndex : Integer; const AValue : String); virtual;
  714. Procedure SetnextPageToken(AIndex : Integer; const AValue : String); virtual;
  715. //2.6.4. bug workaround
  716. {$IFDEF VER2_6}
  717. Procedure SetArrayLength(Const AName : String; ALength : Longint); override;
  718. {$ENDIF VER2_6}
  719. Public
  720. Published
  721. Property items : TLinksTypeitemsArray Index 0 Read Fitems Write Setitems;
  722. Property kind : String Index 8 Read Fkind Write Setkind;
  723. Property nextPageToken : String Index 16 Read FnextPageToken Write SetnextPageToken;
  724. end;
  725. TLinksClass = Class of TLinks;
  726. { --------------------------------------------------------------------
  727. TMoney
  728. --------------------------------------------------------------------}
  729. TMoney = Class(TGoogleBaseObject)
  730. Private
  731. Famount : double;
  732. FcurrencyCode : String;
  733. Protected
  734. //Property setters
  735. Procedure Setamount(AIndex : Integer; AValue : double); virtual;
  736. Procedure SetcurrencyCode(AIndex : Integer; const AValue : String); virtual;
  737. Public
  738. Published
  739. Property amount : double Index 0 Read Famount Write Setamount;
  740. Property currencyCode : String Index 8 Read FcurrencyCode Write SetcurrencyCode;
  741. end;
  742. TMoneyClass = Class of TMoney;
  743. { --------------------------------------------------------------------
  744. TPublisher
  745. --------------------------------------------------------------------}
  746. TPublisher = Class(TGoogleBaseObject)
  747. Private
  748. Fclassification : String;
  749. FepcNinetyDayAverage : TMoney;
  750. FepcSevenDayAverage : TMoney;
  751. Fid : String;
  752. Fitem : TPublisher;
  753. FjoinDate : TDatetime;
  754. Fkind : String;
  755. Fname : String;
  756. FpayoutRank : String;
  757. Fsites : TStringArray;
  758. Fstatus : String;
  759. Protected
  760. //Property setters
  761. Procedure Setclassification(AIndex : Integer; const AValue : String); virtual;
  762. Procedure SetepcNinetyDayAverage(AIndex : Integer; AValue : TMoney); virtual;
  763. Procedure SetepcSevenDayAverage(AIndex : Integer; AValue : TMoney); virtual;
  764. Procedure Setid(AIndex : Integer; const AValue : String); virtual;
  765. Procedure Setitem(AIndex : Integer; AValue : TPublisher); virtual;
  766. Procedure SetjoinDate(AIndex : Integer; AValue : TDatetime); virtual;
  767. Procedure Setkind(AIndex : Integer; const AValue : String); virtual;
  768. Procedure Setname(AIndex : Integer; const AValue : String); virtual;
  769. Procedure SetpayoutRank(AIndex : Integer; const AValue : String); virtual;
  770. Procedure Setsites(AIndex : Integer; AValue : TStringArray); virtual;
  771. Procedure Setstatus(AIndex : Integer; const AValue : String); virtual;
  772. //2.6.4. bug workaround
  773. {$IFDEF VER2_6}
  774. Procedure SetArrayLength(Const AName : String; ALength : Longint); override;
  775. {$ENDIF VER2_6}
  776. Public
  777. Published
  778. Property classification : String Index 0 Read Fclassification Write Setclassification;
  779. Property epcNinetyDayAverage : TMoney Index 8 Read FepcNinetyDayAverage Write SetepcNinetyDayAverage;
  780. Property epcSevenDayAverage : TMoney Index 16 Read FepcSevenDayAverage Write SetepcSevenDayAverage;
  781. Property id : String Index 24 Read Fid Write Setid;
  782. Property item : TPublisher Index 32 Read Fitem Write Setitem;
  783. Property joinDate : TDatetime Index 40 Read FjoinDate Write SetjoinDate;
  784. Property kind : String Index 48 Read Fkind Write Setkind;
  785. Property name : String Index 56 Read Fname Write Setname;
  786. Property payoutRank : String Index 64 Read FpayoutRank Write SetpayoutRank;
  787. Property sites : TStringArray Index 72 Read Fsites Write Setsites;
  788. Property status : String Index 80 Read Fstatus Write Setstatus;
  789. end;
  790. TPublisherClass = Class of TPublisher;
  791. { --------------------------------------------------------------------
  792. TPublishers
  793. --------------------------------------------------------------------}
  794. TPublishers = Class(TGoogleBaseObject)
  795. Private
  796. Fitems : TPublishersTypeitemsArray;
  797. Fkind : String;
  798. FnextPageToken : String;
  799. Protected
  800. //Property setters
  801. Procedure Setitems(AIndex : Integer; AValue : TPublishersTypeitemsArray); virtual;
  802. Procedure Setkind(AIndex : Integer; const AValue : String); virtual;
  803. Procedure SetnextPageToken(AIndex : Integer; const AValue : String); virtual;
  804. //2.6.4. bug workaround
  805. {$IFDEF VER2_6}
  806. Procedure SetArrayLength(Const AName : String; ALength : Longint); override;
  807. {$ENDIF VER2_6}
  808. Public
  809. Published
  810. Property items : TPublishersTypeitemsArray Index 0 Read Fitems Write Setitems;
  811. Property kind : String Index 8 Read Fkind Write Setkind;
  812. Property nextPageToken : String Index 16 Read FnextPageToken Write SetnextPageToken;
  813. end;
  814. TPublishersClass = Class of TPublishers;
  815. { --------------------------------------------------------------------
  816. TReport
  817. --------------------------------------------------------------------}
  818. TReport = Class(TGoogleBaseObject)
  819. Private
  820. Fcolumn_names : TStringArray;
  821. Fend_date : String;
  822. Fkind : String;
  823. Fmatching_row_count : String;
  824. Frows : TReportTyperowsArray;
  825. Fstart_date : String;
  826. Ftotals_rows : TReportTypetotals_rowsArray;
  827. F_type : String;
  828. Protected
  829. Class Function ExportPropertyName(Const AName : String) : string; override;
  830. //Property setters
  831. Procedure Setcolumn_names(AIndex : Integer; AValue : TStringArray); virtual;
  832. Procedure Setend_date(AIndex : Integer; const AValue : String); virtual;
  833. Procedure Setkind(AIndex : Integer; const AValue : String); virtual;
  834. Procedure Setmatching_row_count(AIndex : Integer; const AValue : String); virtual;
  835. Procedure Setrows(AIndex : Integer; AValue : TReportTyperowsArray); virtual;
  836. Procedure Setstart_date(AIndex : Integer; const AValue : String); virtual;
  837. Procedure Settotals_rows(AIndex : Integer; AValue : TReportTypetotals_rowsArray); virtual;
  838. Procedure Set_type(AIndex : Integer; const AValue : String); virtual;
  839. //2.6.4. bug workaround
  840. {$IFDEF VER2_6}
  841. Procedure SetArrayLength(Const AName : String; ALength : Longint); override;
  842. {$ENDIF VER2_6}
  843. Public
  844. Published
  845. Property column_names : TStringArray Index 0 Read Fcolumn_names Write Setcolumn_names;
  846. Property end_date : String Index 8 Read Fend_date Write Setend_date;
  847. Property kind : String Index 16 Read Fkind Write Setkind;
  848. Property matching_row_count : String Index 24 Read Fmatching_row_count Write Setmatching_row_count;
  849. Property rows : TReportTyperowsArray Index 32 Read Frows Write Setrows;
  850. Property start_date : String Index 40 Read Fstart_date Write Setstart_date;
  851. Property totals_rows : TReportTypetotals_rowsArray Index 48 Read Ftotals_rows Write Settotals_rows;
  852. Property _type : String Index 56 Read F_type Write Set_type;
  853. end;
  854. TReportClass = Class of TReport;
  855. { --------------------------------------------------------------------
  856. TAdvertisersResource
  857. --------------------------------------------------------------------}
  858. //Optional query Options for TAdvertisersResource, method Get
  859. TAdvertisersGetOptions = Record
  860. advertiserId : String;
  861. end;
  862. //Optional query Options for TAdvertisersResource, method List
  863. TAdvertisersListOptions = Record
  864. advertiserCategory : String;
  865. maxResults : integer;
  866. minNinetyDayEpc : double;
  867. minPayoutRank : integer;
  868. minSevenDayEpc : double;
  869. pageToken : String;
  870. relationshipStatus : String;
  871. end;
  872. TAdvertisersResource = Class(TGoogleResource)
  873. Public
  874. Class Function ResourceName : String; override;
  875. Class Function DefaultAPI : TGoogleAPIClass; override;
  876. Function Get(role: string; roleId: string; AQuery : string = '') : TAdvertiser;
  877. Function Get(role: string; roleId: string; AQuery : TAdvertisersgetOptions) : TAdvertiser;
  878. Function List(role: string; roleId: string; AQuery : string = '') : TAdvertisers;
  879. Function List(role: string; roleId: string; AQuery : TAdvertiserslistOptions) : TAdvertisers;
  880. end;
  881. { --------------------------------------------------------------------
  882. TCcOffersResource
  883. --------------------------------------------------------------------}
  884. //Optional query Options for TCcOffersResource, method List
  885. TCcOffersListOptions = Record
  886. advertiser : String;
  887. projection : String;
  888. end;
  889. TCcOffersResource = Class(TGoogleResource)
  890. Public
  891. Class Function ResourceName : String; override;
  892. Class Function DefaultAPI : TGoogleAPIClass; override;
  893. Function List(publisher: string; AQuery : string = '') : TCcOffers;
  894. Function List(publisher: string; AQuery : TCcOfferslistOptions) : TCcOffers;
  895. end;
  896. { --------------------------------------------------------------------
  897. TEventsResource
  898. --------------------------------------------------------------------}
  899. //Optional query Options for TEventsResource, method List
  900. TEventsListOptions = Record
  901. advertiserId : String;
  902. chargeType : String;
  903. eventDateMax : String;
  904. eventDateMin : String;
  905. linkId : String;
  906. maxResults : integer;
  907. memberId : String;
  908. modifyDateMax : String;
  909. modifyDateMin : String;
  910. orderId : String;
  911. pageToken : String;
  912. productCategory : String;
  913. publisherId : String;
  914. sku : String;
  915. status : String;
  916. _type : String;
  917. end;
  918. TEventsResource = Class(TGoogleResource)
  919. Public
  920. Class Function ResourceName : String; override;
  921. Class Function DefaultAPI : TGoogleAPIClass; override;
  922. Function List(role: string; roleId: string; AQuery : string = '') : TEvents;
  923. Function List(role: string; roleId: string; AQuery : TEventslistOptions) : TEvents;
  924. end;
  925. { --------------------------------------------------------------------
  926. TLinksResource
  927. --------------------------------------------------------------------}
  928. //Optional query Options for TLinksResource, method List
  929. TLinksListOptions = Record
  930. advertiserId : int64;
  931. assetSize : String;
  932. authorship : String;
  933. createDateMax : String;
  934. createDateMin : String;
  935. linkType : String;
  936. maxResults : integer;
  937. pageToken : String;
  938. promotionType : String;
  939. relationshipStatus : String;
  940. searchText : String;
  941. startDateMax : String;
  942. startDateMin : String;
  943. end;
  944. TLinksResource = Class(TGoogleResource)
  945. Public
  946. Class Function ResourceName : String; override;
  947. Class Function DefaultAPI : TGoogleAPIClass; override;
  948. Function Get(linkId: string; role: string; roleId: string) : TLink;
  949. Function Insert(role: string; roleId: string; aLink : TLink) : TLink;
  950. Function List(role: string; roleId: string; AQuery : string = '') : TLinks;
  951. Function List(role: string; roleId: string; AQuery : TLinkslistOptions) : TLinks;
  952. end;
  953. { --------------------------------------------------------------------
  954. TPublishersResource
  955. --------------------------------------------------------------------}
  956. //Optional query Options for TPublishersResource, method Get
  957. TPublishersGetOptions = Record
  958. publisherId : String;
  959. end;
  960. //Optional query Options for TPublishersResource, method List
  961. TPublishersListOptions = Record
  962. maxResults : integer;
  963. minNinetyDayEpc : double;
  964. minPayoutRank : integer;
  965. minSevenDayEpc : double;
  966. pageToken : String;
  967. publisherCategory : String;
  968. relationshipStatus : String;
  969. end;
  970. TPublishersResource = Class(TGoogleResource)
  971. Public
  972. Class Function ResourceName : String; override;
  973. Class Function DefaultAPI : TGoogleAPIClass; override;
  974. Function Get(role: string; roleId: string; AQuery : string = '') : TPublisher;
  975. Function Get(role: string; roleId: string; AQuery : TPublishersgetOptions) : TPublisher;
  976. Function List(role: string; roleId: string; AQuery : string = '') : TPublishers;
  977. Function List(role: string; roleId: string; AQuery : TPublisherslistOptions) : TPublishers;
  978. end;
  979. { --------------------------------------------------------------------
  980. TReportsResource
  981. --------------------------------------------------------------------}
  982. //Optional query Options for TReportsResource, method Get
  983. TReportsGetOptions = Record
  984. advertiserId : String;
  985. calculateTotals : boolean;
  986. endDate : String;
  987. eventType : String;
  988. linkId : String;
  989. maxResults : integer;
  990. orderId : String;
  991. publisherId : String;
  992. startDate : String;
  993. startIndex : integer;
  994. status : String;
  995. end;
  996. TReportsResource = Class(TGoogleResource)
  997. Public
  998. Class Function ResourceName : String; override;
  999. Class Function DefaultAPI : TGoogleAPIClass; override;
  1000. Function Get(reportType: string; role: string; roleId: string; AQuery : string = '') : TReport;
  1001. Function Get(reportType: string; role: string; roleId: string; AQuery : TReportsgetOptions) : TReport;
  1002. end;
  1003. { --------------------------------------------------------------------
  1004. TGanAPI
  1005. --------------------------------------------------------------------}
  1006. TGanAPI = Class(TGoogleAPI)
  1007. Private
  1008. FAdvertisersInstance : TAdvertisersResource;
  1009. FCcOffersInstance : TCcOffersResource;
  1010. FEventsInstance : TEventsResource;
  1011. FLinksInstance : TLinksResource;
  1012. FPublishersInstance : TPublishersResource;
  1013. FReportsInstance : TReportsResource;
  1014. Function GetAdvertisersInstance : TAdvertisersResource;virtual;
  1015. Function GetCcOffersInstance : TCcOffersResource;virtual;
  1016. Function GetEventsInstance : TEventsResource;virtual;
  1017. Function GetLinksInstance : TLinksResource;virtual;
  1018. Function GetPublishersInstance : TPublishersResource;virtual;
  1019. Function GetReportsInstance : TReportsResource;virtual;
  1020. Public
  1021. //Override class functions with API info
  1022. Class Function APIName : String; override;
  1023. Class Function APIVersion : String; override;
  1024. Class Function APIRevision : String; override;
  1025. Class Function APIID : String; override;
  1026. Class Function APITitle : String; override;
  1027. Class Function APIDescription : String; override;
  1028. Class Function APIOwnerDomain : String; override;
  1029. Class Function APIOwnerName : String; override;
  1030. Class Function APIIcon16 : String; override;
  1031. Class Function APIIcon32 : String; override;
  1032. Class Function APIdocumentationLink : String; override;
  1033. Class Function APIrootUrl : string; override;
  1034. Class Function APIbasePath : string;override;
  1035. Class Function APIbaseURL : String;override;
  1036. Class Function APIProtocol : string;override;
  1037. Class Function APIservicePath : string;override;
  1038. Class Function APIbatchPath : String;override;
  1039. Class Function APIAuthScopes : TScopeInfoArray;override;
  1040. Class Function APINeedsAuth : Boolean;override;
  1041. Class Procedure RegisterAPIResources; override;
  1042. //Add create function for resources
  1043. Function CreateAdvertisersResource(AOwner : TComponent) : TAdvertisersResource;virtual;overload;
  1044. Function CreateAdvertisersResource : TAdvertisersResource;virtual;overload;
  1045. Function CreateCcOffersResource(AOwner : TComponent) : TCcOffersResource;virtual;overload;
  1046. Function CreateCcOffersResource : TCcOffersResource;virtual;overload;
  1047. Function CreateEventsResource(AOwner : TComponent) : TEventsResource;virtual;overload;
  1048. Function CreateEventsResource : TEventsResource;virtual;overload;
  1049. Function CreateLinksResource(AOwner : TComponent) : TLinksResource;virtual;overload;
  1050. Function CreateLinksResource : TLinksResource;virtual;overload;
  1051. Function CreatePublishersResource(AOwner : TComponent) : TPublishersResource;virtual;overload;
  1052. Function CreatePublishersResource : TPublishersResource;virtual;overload;
  1053. Function CreateReportsResource(AOwner : TComponent) : TReportsResource;virtual;overload;
  1054. Function CreateReportsResource : TReportsResource;virtual;overload;
  1055. //Add default on-demand instances for resources
  1056. Property AdvertisersResource : TAdvertisersResource Read GetAdvertisersInstance;
  1057. Property CcOffersResource : TCcOffersResource Read GetCcOffersInstance;
  1058. Property EventsResource : TEventsResource Read GetEventsInstance;
  1059. Property LinksResource : TLinksResource Read GetLinksInstance;
  1060. Property PublishersResource : TPublishersResource Read GetPublishersInstance;
  1061. Property ReportsResource : TReportsResource Read GetReportsInstance;
  1062. end;
  1063. implementation
  1064. { --------------------------------------------------------------------
  1065. TAdvertiser
  1066. --------------------------------------------------------------------}
  1067. Procedure TAdvertiser.SetallowPublisherCreatedLinks(AIndex : Integer; AValue : boolean);
  1068. begin
  1069. If (FallowPublisherCreatedLinks=AValue) then exit;
  1070. FallowPublisherCreatedLinks:=AValue;
  1071. MarkPropertyChanged(AIndex);
  1072. end;
  1073. Procedure TAdvertiser.Setcategory(AIndex : Integer; const AValue : String);
  1074. begin
  1075. If (Fcategory=AValue) then exit;
  1076. Fcategory:=AValue;
  1077. MarkPropertyChanged(AIndex);
  1078. end;
  1079. Procedure TAdvertiser.SetcommissionDuration(AIndex : Integer; AValue : integer);
  1080. begin
  1081. If (FcommissionDuration=AValue) then exit;
  1082. FcommissionDuration:=AValue;
  1083. MarkPropertyChanged(AIndex);
  1084. end;
  1085. Procedure TAdvertiser.SetcontactEmail(AIndex : Integer; const AValue : String);
  1086. begin
  1087. If (FcontactEmail=AValue) then exit;
  1088. FcontactEmail:=AValue;
  1089. MarkPropertyChanged(AIndex);
  1090. end;
  1091. Procedure TAdvertiser.SetcontactPhone(AIndex : Integer; const AValue : String);
  1092. begin
  1093. If (FcontactPhone=AValue) then exit;
  1094. FcontactPhone:=AValue;
  1095. MarkPropertyChanged(AIndex);
  1096. end;
  1097. Procedure TAdvertiser.SetdefaultLinkId(AIndex : Integer; const AValue : String);
  1098. begin
  1099. If (FdefaultLinkId=AValue) then exit;
  1100. FdefaultLinkId:=AValue;
  1101. MarkPropertyChanged(AIndex);
  1102. end;
  1103. Procedure TAdvertiser.Setdescription(AIndex : Integer; const AValue : String);
  1104. begin
  1105. If (Fdescription=AValue) then exit;
  1106. Fdescription:=AValue;
  1107. MarkPropertyChanged(AIndex);
  1108. end;
  1109. Procedure TAdvertiser.SetepcNinetyDayAverage(AIndex : Integer; AValue : TMoney);
  1110. begin
  1111. If (FepcNinetyDayAverage=AValue) then exit;
  1112. FepcNinetyDayAverage:=AValue;
  1113. MarkPropertyChanged(AIndex);
  1114. end;
  1115. Procedure TAdvertiser.SetepcSevenDayAverage(AIndex : Integer; AValue : TMoney);
  1116. begin
  1117. If (FepcSevenDayAverage=AValue) then exit;
  1118. FepcSevenDayAverage:=AValue;
  1119. MarkPropertyChanged(AIndex);
  1120. end;
  1121. Procedure TAdvertiser.Setid(AIndex : Integer; const AValue : String);
  1122. begin
  1123. If (Fid=AValue) then exit;
  1124. Fid:=AValue;
  1125. MarkPropertyChanged(AIndex);
  1126. end;
  1127. Procedure TAdvertiser.Setitem(AIndex : Integer; AValue : TAdvertiser);
  1128. begin
  1129. If (Fitem=AValue) then exit;
  1130. Fitem:=AValue;
  1131. MarkPropertyChanged(AIndex);
  1132. end;
  1133. Procedure TAdvertiser.SetjoinDate(AIndex : Integer; AValue : TDatetime);
  1134. begin
  1135. If (FjoinDate=AValue) then exit;
  1136. FjoinDate:=AValue;
  1137. MarkPropertyChanged(AIndex);
  1138. end;
  1139. Procedure TAdvertiser.Setkind(AIndex : Integer; const AValue : String);
  1140. begin
  1141. If (Fkind=AValue) then exit;
  1142. Fkind:=AValue;
  1143. MarkPropertyChanged(AIndex);
  1144. end;
  1145. Procedure TAdvertiser.SetlogoUrl(AIndex : Integer; const AValue : String);
  1146. begin
  1147. If (FlogoUrl=AValue) then exit;
  1148. FlogoUrl:=AValue;
  1149. MarkPropertyChanged(AIndex);
  1150. end;
  1151. Procedure TAdvertiser.SetmerchantCenterIds(AIndex : Integer; AValue : TStringArray);
  1152. begin
  1153. If (FmerchantCenterIds=AValue) then exit;
  1154. FmerchantCenterIds:=AValue;
  1155. MarkPropertyChanged(AIndex);
  1156. end;
  1157. Procedure TAdvertiser.Setname(AIndex : Integer; const AValue : String);
  1158. begin
  1159. If (Fname=AValue) then exit;
  1160. Fname:=AValue;
  1161. MarkPropertyChanged(AIndex);
  1162. end;
  1163. Procedure TAdvertiser.SetpayoutRank(AIndex : Integer; const AValue : String);
  1164. begin
  1165. If (FpayoutRank=AValue) then exit;
  1166. FpayoutRank:=AValue;
  1167. MarkPropertyChanged(AIndex);
  1168. end;
  1169. Procedure TAdvertiser.SetproductFeedsEnabled(AIndex : Integer; AValue : boolean);
  1170. begin
  1171. If (FproductFeedsEnabled=AValue) then exit;
  1172. FproductFeedsEnabled:=AValue;
  1173. MarkPropertyChanged(AIndex);
  1174. end;
  1175. Procedure TAdvertiser.SetredirectDomains(AIndex : Integer; AValue : TStringArray);
  1176. begin
  1177. If (FredirectDomains=AValue) then exit;
  1178. FredirectDomains:=AValue;
  1179. MarkPropertyChanged(AIndex);
  1180. end;
  1181. Procedure TAdvertiser.SetsiteUrl(AIndex : Integer; const AValue : String);
  1182. begin
  1183. If (FsiteUrl=AValue) then exit;
  1184. FsiteUrl:=AValue;
  1185. MarkPropertyChanged(AIndex);
  1186. end;
  1187. Procedure TAdvertiser.Setstatus(AIndex : Integer; const AValue : String);
  1188. begin
  1189. If (Fstatus=AValue) then exit;
  1190. Fstatus:=AValue;
  1191. MarkPropertyChanged(AIndex);
  1192. end;
  1193. //2.6.4. bug workaround
  1194. {$IFDEF VER2_6}
  1195. Procedure TAdvertiser.SetArrayLength(Const AName : String; ALength : Longint);
  1196. begin
  1197. Case AName of
  1198. 'merchantcenterids' : SetLength(FmerchantCenterIds,ALength);
  1199. 'redirectdomains' : SetLength(FredirectDomains,ALength);
  1200. else
  1201. Inherited SetArrayLength(AName,ALength);
  1202. end;
  1203. end;
  1204. {$ENDIF VER2_6}
  1205. { --------------------------------------------------------------------
  1206. TAdvertisers
  1207. --------------------------------------------------------------------}
  1208. Procedure TAdvertisers.Setitems(AIndex : Integer; AValue : TAdvertisersTypeitemsArray);
  1209. begin
  1210. If (Fitems=AValue) then exit;
  1211. Fitems:=AValue;
  1212. MarkPropertyChanged(AIndex);
  1213. end;
  1214. Procedure TAdvertisers.Setkind(AIndex : Integer; const AValue : String);
  1215. begin
  1216. If (Fkind=AValue) then exit;
  1217. Fkind:=AValue;
  1218. MarkPropertyChanged(AIndex);
  1219. end;
  1220. Procedure TAdvertisers.SetnextPageToken(AIndex : Integer; const AValue : String);
  1221. begin
  1222. If (FnextPageToken=AValue) then exit;
  1223. FnextPageToken:=AValue;
  1224. MarkPropertyChanged(AIndex);
  1225. end;
  1226. //2.6.4. bug workaround
  1227. {$IFDEF VER2_6}
  1228. Procedure TAdvertisers.SetArrayLength(Const AName : String; ALength : Longint);
  1229. begin
  1230. Case AName of
  1231. 'items' : SetLength(Fitems,ALength);
  1232. else
  1233. Inherited SetArrayLength(AName,ALength);
  1234. end;
  1235. end;
  1236. {$ENDIF VER2_6}
  1237. { --------------------------------------------------------------------
  1238. TCcOfferTypebonusRewardsItem
  1239. --------------------------------------------------------------------}
  1240. Procedure TCcOfferTypebonusRewardsItem.Setamount(AIndex : Integer; AValue : double);
  1241. begin
  1242. If (Famount=AValue) then exit;
  1243. Famount:=AValue;
  1244. MarkPropertyChanged(AIndex);
  1245. end;
  1246. Procedure TCcOfferTypebonusRewardsItem.Setdetails(AIndex : Integer; const AValue : String);
  1247. begin
  1248. If (Fdetails=AValue) then exit;
  1249. Fdetails:=AValue;
  1250. MarkPropertyChanged(AIndex);
  1251. end;
  1252. { --------------------------------------------------------------------
  1253. TCcOfferTypedefaultFeesItem
  1254. --------------------------------------------------------------------}
  1255. Procedure TCcOfferTypedefaultFeesItem.Setcategory(AIndex : Integer; const AValue : String);
  1256. begin
  1257. If (Fcategory=AValue) then exit;
  1258. Fcategory:=AValue;
  1259. MarkPropertyChanged(AIndex);
  1260. end;
  1261. Procedure TCcOfferTypedefaultFeesItem.SetmaxRate(AIndex : Integer; AValue : double);
  1262. begin
  1263. If (FmaxRate=AValue) then exit;
  1264. FmaxRate:=AValue;
  1265. MarkPropertyChanged(AIndex);
  1266. end;
  1267. Procedure TCcOfferTypedefaultFeesItem.SetminRate(AIndex : Integer; AValue : double);
  1268. begin
  1269. If (FminRate=AValue) then exit;
  1270. FminRate:=AValue;
  1271. MarkPropertyChanged(AIndex);
  1272. end;
  1273. Procedure TCcOfferTypedefaultFeesItem.SetrateType(AIndex : Integer; const AValue : String);
  1274. begin
  1275. If (FrateType=AValue) then exit;
  1276. FrateType:=AValue;
  1277. MarkPropertyChanged(AIndex);
  1278. end;
  1279. { --------------------------------------------------------------------
  1280. TCcOfferTyperewardsItem
  1281. --------------------------------------------------------------------}
  1282. Procedure TCcOfferTyperewardsItem.SetadditionalDetails(AIndex : Integer; const AValue : String);
  1283. begin
  1284. If (FadditionalDetails=AValue) then exit;
  1285. FadditionalDetails:=AValue;
  1286. MarkPropertyChanged(AIndex);
  1287. end;
  1288. Procedure TCcOfferTyperewardsItem.Setamount(AIndex : Integer; AValue : double);
  1289. begin
  1290. If (Famount=AValue) then exit;
  1291. Famount:=AValue;
  1292. MarkPropertyChanged(AIndex);
  1293. end;
  1294. Procedure TCcOfferTyperewardsItem.Setcategory(AIndex : Integer; const AValue : String);
  1295. begin
  1296. If (Fcategory=AValue) then exit;
  1297. Fcategory:=AValue;
  1298. MarkPropertyChanged(AIndex);
  1299. end;
  1300. Procedure TCcOfferTyperewardsItem.SetexpirationMonths(AIndex : Integer; AValue : double);
  1301. begin
  1302. If (FexpirationMonths=AValue) then exit;
  1303. FexpirationMonths:=AValue;
  1304. MarkPropertyChanged(AIndex);
  1305. end;
  1306. Procedure TCcOfferTyperewardsItem.SetmaxRewardTier(AIndex : Integer; AValue : double);
  1307. begin
  1308. If (FmaxRewardTier=AValue) then exit;
  1309. FmaxRewardTier:=AValue;
  1310. MarkPropertyChanged(AIndex);
  1311. end;
  1312. Procedure TCcOfferTyperewardsItem.SetminRewardTier(AIndex : Integer; AValue : double);
  1313. begin
  1314. If (FminRewardTier=AValue) then exit;
  1315. FminRewardTier:=AValue;
  1316. MarkPropertyChanged(AIndex);
  1317. end;
  1318. { --------------------------------------------------------------------
  1319. TCcOffer
  1320. --------------------------------------------------------------------}
  1321. Procedure TCcOffer.SetadditionalCardBenefits(AIndex : Integer; AValue : TStringArray);
  1322. begin
  1323. If (FadditionalCardBenefits=AValue) then exit;
  1324. FadditionalCardBenefits:=AValue;
  1325. MarkPropertyChanged(AIndex);
  1326. end;
  1327. Procedure TCcOffer.SetadditionalCardHolderFee(AIndex : Integer; const AValue : String);
  1328. begin
  1329. If (FadditionalCardHolderFee=AValue) then exit;
  1330. FadditionalCardHolderFee:=AValue;
  1331. MarkPropertyChanged(AIndex);
  1332. end;
  1333. Procedure TCcOffer.SetageMinimum(AIndex : Integer; AValue : double);
  1334. begin
  1335. If (FageMinimum=AValue) then exit;
  1336. FageMinimum:=AValue;
  1337. MarkPropertyChanged(AIndex);
  1338. end;
  1339. Procedure TCcOffer.SetageMinimumDetails(AIndex : Integer; const AValue : String);
  1340. begin
  1341. If (FageMinimumDetails=AValue) then exit;
  1342. FageMinimumDetails:=AValue;
  1343. MarkPropertyChanged(AIndex);
  1344. end;
  1345. Procedure TCcOffer.SetannualFee(AIndex : Integer; AValue : double);
  1346. begin
  1347. If (FannualFee=AValue) then exit;
  1348. FannualFee:=AValue;
  1349. MarkPropertyChanged(AIndex);
  1350. end;
  1351. Procedure TCcOffer.SetannualFeeDisplay(AIndex : Integer; const AValue : String);
  1352. begin
  1353. If (FannualFeeDisplay=AValue) then exit;
  1354. FannualFeeDisplay:=AValue;
  1355. MarkPropertyChanged(AIndex);
  1356. end;
  1357. Procedure TCcOffer.SetannualRewardMaximum(AIndex : Integer; AValue : double);
  1358. begin
  1359. If (FannualRewardMaximum=AValue) then exit;
  1360. FannualRewardMaximum:=AValue;
  1361. MarkPropertyChanged(AIndex);
  1362. end;
  1363. Procedure TCcOffer.SetapprovedCategories(AIndex : Integer; AValue : TStringArray);
  1364. begin
  1365. If (FapprovedCategories=AValue) then exit;
  1366. FapprovedCategories:=AValue;
  1367. MarkPropertyChanged(AIndex);
  1368. end;
  1369. Procedure TCcOffer.SetaprDisplay(AIndex : Integer; const AValue : String);
  1370. begin
  1371. If (FaprDisplay=AValue) then exit;
  1372. FaprDisplay:=AValue;
  1373. MarkPropertyChanged(AIndex);
  1374. end;
  1375. Procedure TCcOffer.SetbalanceComputationMethod(AIndex : Integer; const AValue : String);
  1376. begin
  1377. If (FbalanceComputationMethod=AValue) then exit;
  1378. FbalanceComputationMethod:=AValue;
  1379. MarkPropertyChanged(AIndex);
  1380. end;
  1381. Procedure TCcOffer.SetbalanceTransferTerms(AIndex : Integer; const AValue : String);
  1382. begin
  1383. If (FbalanceTransferTerms=AValue) then exit;
  1384. FbalanceTransferTerms:=AValue;
  1385. MarkPropertyChanged(AIndex);
  1386. end;
  1387. Procedure TCcOffer.SetbonusRewards(AIndex : Integer; AValue : TCcOfferTypebonusRewardsArray);
  1388. begin
  1389. If (FbonusRewards=AValue) then exit;
  1390. FbonusRewards:=AValue;
  1391. MarkPropertyChanged(AIndex);
  1392. end;
  1393. Procedure TCcOffer.SetcarRentalInsurance(AIndex : Integer; const AValue : String);
  1394. begin
  1395. If (FcarRentalInsurance=AValue) then exit;
  1396. FcarRentalInsurance:=AValue;
  1397. MarkPropertyChanged(AIndex);
  1398. end;
  1399. Procedure TCcOffer.SetcardBenefits(AIndex : Integer; AValue : TStringArray);
  1400. begin
  1401. If (FcardBenefits=AValue) then exit;
  1402. FcardBenefits:=AValue;
  1403. MarkPropertyChanged(AIndex);
  1404. end;
  1405. Procedure TCcOffer.SetcardName(AIndex : Integer; const AValue : String);
  1406. begin
  1407. If (FcardName=AValue) then exit;
  1408. FcardName:=AValue;
  1409. MarkPropertyChanged(AIndex);
  1410. end;
  1411. Procedure TCcOffer.SetcardType(AIndex : Integer; const AValue : String);
  1412. begin
  1413. If (FcardType=AValue) then exit;
  1414. FcardType:=AValue;
  1415. MarkPropertyChanged(AIndex);
  1416. end;
  1417. Procedure TCcOffer.SetcashAdvanceTerms(AIndex : Integer; const AValue : String);
  1418. begin
  1419. If (FcashAdvanceTerms=AValue) then exit;
  1420. FcashAdvanceTerms:=AValue;
  1421. MarkPropertyChanged(AIndex);
  1422. end;
  1423. Procedure TCcOffer.SetcreditLimitMax(AIndex : Integer; AValue : double);
  1424. begin
  1425. If (FcreditLimitMax=AValue) then exit;
  1426. FcreditLimitMax:=AValue;
  1427. MarkPropertyChanged(AIndex);
  1428. end;
  1429. Procedure TCcOffer.SetcreditLimitMin(AIndex : Integer; AValue : double);
  1430. begin
  1431. If (FcreditLimitMin=AValue) then exit;
  1432. FcreditLimitMin:=AValue;
  1433. MarkPropertyChanged(AIndex);
  1434. end;
  1435. Procedure TCcOffer.SetcreditRatingDisplay(AIndex : Integer; const AValue : String);
  1436. begin
  1437. If (FcreditRatingDisplay=AValue) then exit;
  1438. FcreditRatingDisplay:=AValue;
  1439. MarkPropertyChanged(AIndex);
  1440. end;
  1441. Procedure TCcOffer.SetdefaultFees(AIndex : Integer; AValue : TCcOfferTypedefaultFeesArray);
  1442. begin
  1443. If (FdefaultFees=AValue) then exit;
  1444. FdefaultFees:=AValue;
  1445. MarkPropertyChanged(AIndex);
  1446. end;
  1447. Procedure TCcOffer.Setdisclaimer(AIndex : Integer; const AValue : String);
  1448. begin
  1449. If (Fdisclaimer=AValue) then exit;
  1450. Fdisclaimer:=AValue;
  1451. MarkPropertyChanged(AIndex);
  1452. end;
  1453. Procedure TCcOffer.SetemergencyInsurance(AIndex : Integer; const AValue : String);
  1454. begin
  1455. If (FemergencyInsurance=AValue) then exit;
  1456. FemergencyInsurance:=AValue;
  1457. MarkPropertyChanged(AIndex);
  1458. end;
  1459. Procedure TCcOffer.SetexistingCustomerOnly(AIndex : Integer; AValue : boolean);
  1460. begin
  1461. If (FexistingCustomerOnly=AValue) then exit;
  1462. FexistingCustomerOnly:=AValue;
  1463. MarkPropertyChanged(AIndex);
  1464. end;
  1465. Procedure TCcOffer.SetextendedWarranty(AIndex : Integer; const AValue : String);
  1466. begin
  1467. If (FextendedWarranty=AValue) then exit;
  1468. FextendedWarranty:=AValue;
  1469. MarkPropertyChanged(AIndex);
  1470. end;
  1471. Procedure TCcOffer.SetfirstYearAnnualFee(AIndex : Integer; AValue : double);
  1472. begin
  1473. If (FfirstYearAnnualFee=AValue) then exit;
  1474. FfirstYearAnnualFee:=AValue;
  1475. MarkPropertyChanged(AIndex);
  1476. end;
  1477. Procedure TCcOffer.SetflightAccidentInsurance(AIndex : Integer; const AValue : String);
  1478. begin
  1479. If (FflightAccidentInsurance=AValue) then exit;
  1480. FflightAccidentInsurance:=AValue;
  1481. MarkPropertyChanged(AIndex);
  1482. end;
  1483. Procedure TCcOffer.SetforeignCurrencyTransactionFee(AIndex : Integer; const AValue : String);
  1484. begin
  1485. If (FforeignCurrencyTransactionFee=AValue) then exit;
  1486. FforeignCurrencyTransactionFee:=AValue;
  1487. MarkPropertyChanged(AIndex);
  1488. end;
  1489. Procedure TCcOffer.SetfraudLiability(AIndex : Integer; const AValue : String);
  1490. begin
  1491. If (FfraudLiability=AValue) then exit;
  1492. FfraudLiability:=AValue;
  1493. MarkPropertyChanged(AIndex);
  1494. end;
  1495. Procedure TCcOffer.SetgracePeriodDisplay(AIndex : Integer; const AValue : String);
  1496. begin
  1497. If (FgracePeriodDisplay=AValue) then exit;
  1498. FgracePeriodDisplay:=AValue;
  1499. MarkPropertyChanged(AIndex);
  1500. end;
  1501. Procedure TCcOffer.SetimageUrl(AIndex : Integer; const AValue : String);
  1502. begin
  1503. If (FimageUrl=AValue) then exit;
  1504. FimageUrl:=AValue;
  1505. MarkPropertyChanged(AIndex);
  1506. end;
  1507. Procedure TCcOffer.SetinitialSetupAndProcessingFee(AIndex : Integer; const AValue : String);
  1508. begin
  1509. If (FinitialSetupAndProcessingFee=AValue) then exit;
  1510. FinitialSetupAndProcessingFee:=AValue;
  1511. MarkPropertyChanged(AIndex);
  1512. end;
  1513. Procedure TCcOffer.SetintroBalanceTransferTerms(AIndex : Integer; const AValue : String);
  1514. begin
  1515. If (FintroBalanceTransferTerms=AValue) then exit;
  1516. FintroBalanceTransferTerms:=AValue;
  1517. MarkPropertyChanged(AIndex);
  1518. end;
  1519. Procedure TCcOffer.SetintroCashAdvanceTerms(AIndex : Integer; const AValue : String);
  1520. begin
  1521. If (FintroCashAdvanceTerms=AValue) then exit;
  1522. FintroCashAdvanceTerms:=AValue;
  1523. MarkPropertyChanged(AIndex);
  1524. end;
  1525. Procedure TCcOffer.SetintroPurchaseTerms(AIndex : Integer; const AValue : String);
  1526. begin
  1527. If (FintroPurchaseTerms=AValue) then exit;
  1528. FintroPurchaseTerms:=AValue;
  1529. MarkPropertyChanged(AIndex);
  1530. end;
  1531. Procedure TCcOffer.Setissuer(AIndex : Integer; const AValue : String);
  1532. begin
  1533. If (Fissuer=AValue) then exit;
  1534. Fissuer:=AValue;
  1535. MarkPropertyChanged(AIndex);
  1536. end;
  1537. Procedure TCcOffer.SetissuerId(AIndex : Integer; const AValue : String);
  1538. begin
  1539. If (FissuerId=AValue) then exit;
  1540. FissuerId:=AValue;
  1541. MarkPropertyChanged(AIndex);
  1542. end;
  1543. Procedure TCcOffer.SetissuerWebsite(AIndex : Integer; const AValue : String);
  1544. begin
  1545. If (FissuerWebsite=AValue) then exit;
  1546. FissuerWebsite:=AValue;
  1547. MarkPropertyChanged(AIndex);
  1548. end;
  1549. Procedure TCcOffer.Setkind(AIndex : Integer; const AValue : String);
  1550. begin
  1551. If (Fkind=AValue) then exit;
  1552. Fkind:=AValue;
  1553. MarkPropertyChanged(AIndex);
  1554. end;
  1555. Procedure TCcOffer.SetlandingPageUrl(AIndex : Integer; const AValue : String);
  1556. begin
  1557. If (FlandingPageUrl=AValue) then exit;
  1558. FlandingPageUrl:=AValue;
  1559. MarkPropertyChanged(AIndex);
  1560. end;
  1561. Procedure TCcOffer.SetlatePaymentFee(AIndex : Integer; const AValue : String);
  1562. begin
  1563. If (FlatePaymentFee=AValue) then exit;
  1564. FlatePaymentFee:=AValue;
  1565. MarkPropertyChanged(AIndex);
  1566. end;
  1567. Procedure TCcOffer.SetluggageInsurance(AIndex : Integer; const AValue : String);
  1568. begin
  1569. If (FluggageInsurance=AValue) then exit;
  1570. FluggageInsurance:=AValue;
  1571. MarkPropertyChanged(AIndex);
  1572. end;
  1573. Procedure TCcOffer.SetmaxPurchaseRate(AIndex : Integer; AValue : double);
  1574. begin
  1575. If (FmaxPurchaseRate=AValue) then exit;
  1576. FmaxPurchaseRate:=AValue;
  1577. MarkPropertyChanged(AIndex);
  1578. end;
  1579. Procedure TCcOffer.SetminPurchaseRate(AIndex : Integer; AValue : double);
  1580. begin
  1581. If (FminPurchaseRate=AValue) then exit;
  1582. FminPurchaseRate:=AValue;
  1583. MarkPropertyChanged(AIndex);
  1584. end;
  1585. Procedure TCcOffer.SetminimumFinanceCharge(AIndex : Integer; const AValue : String);
  1586. begin
  1587. If (FminimumFinanceCharge=AValue) then exit;
  1588. FminimumFinanceCharge:=AValue;
  1589. MarkPropertyChanged(AIndex);
  1590. end;
  1591. Procedure TCcOffer.Setnetwork(AIndex : Integer; const AValue : String);
  1592. begin
  1593. If (Fnetwork=AValue) then exit;
  1594. Fnetwork:=AValue;
  1595. MarkPropertyChanged(AIndex);
  1596. end;
  1597. Procedure TCcOffer.SetofferId(AIndex : Integer; const AValue : String);
  1598. begin
  1599. If (FofferId=AValue) then exit;
  1600. FofferId:=AValue;
  1601. MarkPropertyChanged(AIndex);
  1602. end;
  1603. Procedure TCcOffer.SetoffersImmediateCashReward(AIndex : Integer; AValue : boolean);
  1604. begin
  1605. If (FoffersImmediateCashReward=AValue) then exit;
  1606. FoffersImmediateCashReward:=AValue;
  1607. MarkPropertyChanged(AIndex);
  1608. end;
  1609. Procedure TCcOffer.SetoverLimitFee(AIndex : Integer; const AValue : String);
  1610. begin
  1611. If (FoverLimitFee=AValue) then exit;
  1612. FoverLimitFee:=AValue;
  1613. MarkPropertyChanged(AIndex);
  1614. end;
  1615. Procedure TCcOffer.SetprohibitedCategories(AIndex : Integer; AValue : TStringArray);
  1616. begin
  1617. If (FprohibitedCategories=AValue) then exit;
  1618. FprohibitedCategories:=AValue;
  1619. MarkPropertyChanged(AIndex);
  1620. end;
  1621. Procedure TCcOffer.SetpurchaseRateAdditionalDetails(AIndex : Integer; const AValue : String);
  1622. begin
  1623. If (FpurchaseRateAdditionalDetails=AValue) then exit;
  1624. FpurchaseRateAdditionalDetails:=AValue;
  1625. MarkPropertyChanged(AIndex);
  1626. end;
  1627. Procedure TCcOffer.SetpurchaseRateType(AIndex : Integer; const AValue : String);
  1628. begin
  1629. If (FpurchaseRateType=AValue) then exit;
  1630. FpurchaseRateType:=AValue;
  1631. MarkPropertyChanged(AIndex);
  1632. end;
  1633. Procedure TCcOffer.SetreturnedPaymentFee(AIndex : Integer; const AValue : String);
  1634. begin
  1635. If (FreturnedPaymentFee=AValue) then exit;
  1636. FreturnedPaymentFee:=AValue;
  1637. MarkPropertyChanged(AIndex);
  1638. end;
  1639. Procedure TCcOffer.SetrewardPartner(AIndex : Integer; const AValue : String);
  1640. begin
  1641. If (FrewardPartner=AValue) then exit;
  1642. FrewardPartner:=AValue;
  1643. MarkPropertyChanged(AIndex);
  1644. end;
  1645. Procedure TCcOffer.SetrewardUnit(AIndex : Integer; const AValue : String);
  1646. begin
  1647. If (FrewardUnit=AValue) then exit;
  1648. FrewardUnit:=AValue;
  1649. MarkPropertyChanged(AIndex);
  1650. end;
  1651. Procedure TCcOffer.Setrewards(AIndex : Integer; AValue : TCcOfferTyperewardsArray);
  1652. begin
  1653. If (Frewards=AValue) then exit;
  1654. Frewards:=AValue;
  1655. MarkPropertyChanged(AIndex);
  1656. end;
  1657. Procedure TCcOffer.SetrewardsExpire(AIndex : Integer; AValue : boolean);
  1658. begin
  1659. If (FrewardsExpire=AValue) then exit;
  1660. FrewardsExpire:=AValue;
  1661. MarkPropertyChanged(AIndex);
  1662. end;
  1663. Procedure TCcOffer.SetrewardsHaveBlackoutDates(AIndex : Integer; AValue : boolean);
  1664. begin
  1665. If (FrewardsHaveBlackoutDates=AValue) then exit;
  1666. FrewardsHaveBlackoutDates:=AValue;
  1667. MarkPropertyChanged(AIndex);
  1668. end;
  1669. Procedure TCcOffer.SetstatementCopyFee(AIndex : Integer; const AValue : String);
  1670. begin
  1671. If (FstatementCopyFee=AValue) then exit;
  1672. FstatementCopyFee:=AValue;
  1673. MarkPropertyChanged(AIndex);
  1674. end;
  1675. Procedure TCcOffer.SettrackingUrl(AIndex : Integer; const AValue : String);
  1676. begin
  1677. If (FtrackingUrl=AValue) then exit;
  1678. FtrackingUrl:=AValue;
  1679. MarkPropertyChanged(AIndex);
  1680. end;
  1681. Procedure TCcOffer.SettravelInsurance(AIndex : Integer; const AValue : String);
  1682. begin
  1683. If (FtravelInsurance=AValue) then exit;
  1684. FtravelInsurance:=AValue;
  1685. MarkPropertyChanged(AIndex);
  1686. end;
  1687. Procedure TCcOffer.SetvariableRatesLastUpdated(AIndex : Integer; const AValue : String);
  1688. begin
  1689. If (FvariableRatesLastUpdated=AValue) then exit;
  1690. FvariableRatesLastUpdated:=AValue;
  1691. MarkPropertyChanged(AIndex);
  1692. end;
  1693. Procedure TCcOffer.SetvariableRatesUpdateFrequency(AIndex : Integer; const AValue : String);
  1694. begin
  1695. If (FvariableRatesUpdateFrequency=AValue) then exit;
  1696. FvariableRatesUpdateFrequency:=AValue;
  1697. MarkPropertyChanged(AIndex);
  1698. end;
  1699. //2.6.4. bug workaround
  1700. {$IFDEF VER2_6}
  1701. Procedure TCcOffer.SetArrayLength(Const AName : String; ALength : Longint);
  1702. begin
  1703. Case AName of
  1704. 'additionalcardbenefits' : SetLength(FadditionalCardBenefits,ALength);
  1705. 'approvedcategories' : SetLength(FapprovedCategories,ALength);
  1706. 'bonusrewards' : SetLength(FbonusRewards,ALength);
  1707. 'cardbenefits' : SetLength(FcardBenefits,ALength);
  1708. 'defaultfees' : SetLength(FdefaultFees,ALength);
  1709. 'prohibitedcategories' : SetLength(FprohibitedCategories,ALength);
  1710. 'rewards' : SetLength(Frewards,ALength);
  1711. else
  1712. Inherited SetArrayLength(AName,ALength);
  1713. end;
  1714. end;
  1715. {$ENDIF VER2_6}
  1716. { --------------------------------------------------------------------
  1717. TCcOffers
  1718. --------------------------------------------------------------------}
  1719. Procedure TCcOffers.Setitems(AIndex : Integer; AValue : TCcOffersTypeitemsArray);
  1720. begin
  1721. If (Fitems=AValue) then exit;
  1722. Fitems:=AValue;
  1723. MarkPropertyChanged(AIndex);
  1724. end;
  1725. Procedure TCcOffers.Setkind(AIndex : Integer; const AValue : String);
  1726. begin
  1727. If (Fkind=AValue) then exit;
  1728. Fkind:=AValue;
  1729. MarkPropertyChanged(AIndex);
  1730. end;
  1731. //2.6.4. bug workaround
  1732. {$IFDEF VER2_6}
  1733. Procedure TCcOffers.SetArrayLength(Const AName : String; ALength : Longint);
  1734. begin
  1735. Case AName of
  1736. 'items' : SetLength(Fitems,ALength);
  1737. else
  1738. Inherited SetArrayLength(AName,ALength);
  1739. end;
  1740. end;
  1741. {$ENDIF VER2_6}
  1742. { --------------------------------------------------------------------
  1743. TEventTypeproductsItem
  1744. --------------------------------------------------------------------}
  1745. Procedure TEventTypeproductsItem.SetcategoryId(AIndex : Integer; const AValue : String);
  1746. begin
  1747. If (FcategoryId=AValue) then exit;
  1748. FcategoryId:=AValue;
  1749. MarkPropertyChanged(AIndex);
  1750. end;
  1751. Procedure TEventTypeproductsItem.SetcategoryName(AIndex : Integer; const AValue : String);
  1752. begin
  1753. If (FcategoryName=AValue) then exit;
  1754. FcategoryName:=AValue;
  1755. MarkPropertyChanged(AIndex);
  1756. end;
  1757. Procedure TEventTypeproductsItem.Setearnings(AIndex : Integer; AValue : TMoney);
  1758. begin
  1759. If (Fearnings=AValue) then exit;
  1760. Fearnings:=AValue;
  1761. MarkPropertyChanged(AIndex);
  1762. end;
  1763. Procedure TEventTypeproductsItem.SetnetworkFee(AIndex : Integer; AValue : TMoney);
  1764. begin
  1765. If (FnetworkFee=AValue) then exit;
  1766. FnetworkFee:=AValue;
  1767. MarkPropertyChanged(AIndex);
  1768. end;
  1769. Procedure TEventTypeproductsItem.SetpublisherFee(AIndex : Integer; AValue : TMoney);
  1770. begin
  1771. If (FpublisherFee=AValue) then exit;
  1772. FpublisherFee:=AValue;
  1773. MarkPropertyChanged(AIndex);
  1774. end;
  1775. Procedure TEventTypeproductsItem.Setquantity(AIndex : Integer; const AValue : String);
  1776. begin
  1777. If (Fquantity=AValue) then exit;
  1778. Fquantity:=AValue;
  1779. MarkPropertyChanged(AIndex);
  1780. end;
  1781. Procedure TEventTypeproductsItem.Setsku(AIndex : Integer; const AValue : String);
  1782. begin
  1783. If (Fsku=AValue) then exit;
  1784. Fsku:=AValue;
  1785. MarkPropertyChanged(AIndex);
  1786. end;
  1787. Procedure TEventTypeproductsItem.SetskuName(AIndex : Integer; const AValue : String);
  1788. begin
  1789. If (FskuName=AValue) then exit;
  1790. FskuName:=AValue;
  1791. MarkPropertyChanged(AIndex);
  1792. end;
  1793. Procedure TEventTypeproductsItem.SetunitPrice(AIndex : Integer; AValue : TMoney);
  1794. begin
  1795. If (FunitPrice=AValue) then exit;
  1796. FunitPrice:=AValue;
  1797. MarkPropertyChanged(AIndex);
  1798. end;
  1799. { --------------------------------------------------------------------
  1800. TEvent
  1801. --------------------------------------------------------------------}
  1802. Procedure TEvent.SetadvertiserId(AIndex : Integer; const AValue : String);
  1803. begin
  1804. If (FadvertiserId=AValue) then exit;
  1805. FadvertiserId:=AValue;
  1806. MarkPropertyChanged(AIndex);
  1807. end;
  1808. Procedure TEvent.SetadvertiserName(AIndex : Integer; const AValue : String);
  1809. begin
  1810. If (FadvertiserName=AValue) then exit;
  1811. FadvertiserName:=AValue;
  1812. MarkPropertyChanged(AIndex);
  1813. end;
  1814. Procedure TEvent.SetchargeId(AIndex : Integer; const AValue : String);
  1815. begin
  1816. If (FchargeId=AValue) then exit;
  1817. FchargeId:=AValue;
  1818. MarkPropertyChanged(AIndex);
  1819. end;
  1820. Procedure TEvent.SetchargeType(AIndex : Integer; const AValue : String);
  1821. begin
  1822. If (FchargeType=AValue) then exit;
  1823. FchargeType:=AValue;
  1824. MarkPropertyChanged(AIndex);
  1825. end;
  1826. Procedure TEvent.SetcommissionableSales(AIndex : Integer; AValue : TMoney);
  1827. begin
  1828. If (FcommissionableSales=AValue) then exit;
  1829. FcommissionableSales:=AValue;
  1830. MarkPropertyChanged(AIndex);
  1831. end;
  1832. Procedure TEvent.Setearnings(AIndex : Integer; AValue : TMoney);
  1833. begin
  1834. If (Fearnings=AValue) then exit;
  1835. Fearnings:=AValue;
  1836. MarkPropertyChanged(AIndex);
  1837. end;
  1838. Procedure TEvent.SeteventDate(AIndex : Integer; AValue : TDatetime);
  1839. begin
  1840. If (FeventDate=AValue) then exit;
  1841. FeventDate:=AValue;
  1842. MarkPropertyChanged(AIndex);
  1843. end;
  1844. Procedure TEvent.Setkind(AIndex : Integer; const AValue : String);
  1845. begin
  1846. If (Fkind=AValue) then exit;
  1847. Fkind:=AValue;
  1848. MarkPropertyChanged(AIndex);
  1849. end;
  1850. Procedure TEvent.SetmemberId(AIndex : Integer; const AValue : String);
  1851. begin
  1852. If (FmemberId=AValue) then exit;
  1853. FmemberId:=AValue;
  1854. MarkPropertyChanged(AIndex);
  1855. end;
  1856. Procedure TEvent.SetmodifyDate(AIndex : Integer; AValue : TDatetime);
  1857. begin
  1858. If (FmodifyDate=AValue) then exit;
  1859. FmodifyDate:=AValue;
  1860. MarkPropertyChanged(AIndex);
  1861. end;
  1862. Procedure TEvent.SetnetworkFee(AIndex : Integer; AValue : TMoney);
  1863. begin
  1864. If (FnetworkFee=AValue) then exit;
  1865. FnetworkFee:=AValue;
  1866. MarkPropertyChanged(AIndex);
  1867. end;
  1868. Procedure TEvent.SetorderId(AIndex : Integer; const AValue : String);
  1869. begin
  1870. If (ForderId=AValue) then exit;
  1871. ForderId:=AValue;
  1872. MarkPropertyChanged(AIndex);
  1873. end;
  1874. Procedure TEvent.Setproducts(AIndex : Integer; AValue : TEventTypeproductsArray);
  1875. begin
  1876. If (Fproducts=AValue) then exit;
  1877. Fproducts:=AValue;
  1878. MarkPropertyChanged(AIndex);
  1879. end;
  1880. Procedure TEvent.SetpublisherFee(AIndex : Integer; AValue : TMoney);
  1881. begin
  1882. If (FpublisherFee=AValue) then exit;
  1883. FpublisherFee:=AValue;
  1884. MarkPropertyChanged(AIndex);
  1885. end;
  1886. Procedure TEvent.SetpublisherId(AIndex : Integer; const AValue : String);
  1887. begin
  1888. If (FpublisherId=AValue) then exit;
  1889. FpublisherId:=AValue;
  1890. MarkPropertyChanged(AIndex);
  1891. end;
  1892. Procedure TEvent.SetpublisherName(AIndex : Integer; const AValue : String);
  1893. begin
  1894. If (FpublisherName=AValue) then exit;
  1895. FpublisherName:=AValue;
  1896. MarkPropertyChanged(AIndex);
  1897. end;
  1898. Procedure TEvent.Setstatus(AIndex : Integer; const AValue : String);
  1899. begin
  1900. If (Fstatus=AValue) then exit;
  1901. Fstatus:=AValue;
  1902. MarkPropertyChanged(AIndex);
  1903. end;
  1904. Procedure TEvent.Set_type(AIndex : Integer; const AValue : String);
  1905. begin
  1906. If (F_type=AValue) then exit;
  1907. F_type:=AValue;
  1908. MarkPropertyChanged(AIndex);
  1909. end;
  1910. Class Function TEvent.ExportPropertyName(Const AName : String) :String;
  1911. begin
  1912. Case AName of
  1913. '_type' : Result:='type';
  1914. else
  1915. Result:=Inherited ExportPropertyName(AName);
  1916. end;
  1917. end;
  1918. //2.6.4. bug workaround
  1919. {$IFDEF VER2_6}
  1920. Procedure TEvent.SetArrayLength(Const AName : String; ALength : Longint);
  1921. begin
  1922. Case AName of
  1923. 'products' : SetLength(Fproducts,ALength);
  1924. else
  1925. Inherited SetArrayLength(AName,ALength);
  1926. end;
  1927. end;
  1928. {$ENDIF VER2_6}
  1929. { --------------------------------------------------------------------
  1930. TEvents
  1931. --------------------------------------------------------------------}
  1932. Procedure TEvents.Setitems(AIndex : Integer; AValue : TEventsTypeitemsArray);
  1933. begin
  1934. If (Fitems=AValue) then exit;
  1935. Fitems:=AValue;
  1936. MarkPropertyChanged(AIndex);
  1937. end;
  1938. Procedure TEvents.Setkind(AIndex : Integer; const AValue : String);
  1939. begin
  1940. If (Fkind=AValue) then exit;
  1941. Fkind:=AValue;
  1942. MarkPropertyChanged(AIndex);
  1943. end;
  1944. Procedure TEvents.SetnextPageToken(AIndex : Integer; const AValue : String);
  1945. begin
  1946. If (FnextPageToken=AValue) then exit;
  1947. FnextPageToken:=AValue;
  1948. MarkPropertyChanged(AIndex);
  1949. end;
  1950. //2.6.4. bug workaround
  1951. {$IFDEF VER2_6}
  1952. Procedure TEvents.SetArrayLength(Const AName : String; ALength : Longint);
  1953. begin
  1954. Case AName of
  1955. 'items' : SetLength(Fitems,ALength);
  1956. else
  1957. Inherited SetArrayLength(AName,ALength);
  1958. end;
  1959. end;
  1960. {$ENDIF VER2_6}
  1961. { --------------------------------------------------------------------
  1962. TLinkTypespecialOffers
  1963. --------------------------------------------------------------------}
  1964. Procedure TLinkTypespecialOffers.SetfreeGift(AIndex : Integer; AValue : boolean);
  1965. begin
  1966. If (FfreeGift=AValue) then exit;
  1967. FfreeGift:=AValue;
  1968. MarkPropertyChanged(AIndex);
  1969. end;
  1970. Procedure TLinkTypespecialOffers.SetfreeShipping(AIndex : Integer; AValue : boolean);
  1971. begin
  1972. If (FfreeShipping=AValue) then exit;
  1973. FfreeShipping:=AValue;
  1974. MarkPropertyChanged(AIndex);
  1975. end;
  1976. Procedure TLinkTypespecialOffers.SetfreeShippingMin(AIndex : Integer; AValue : TMoney);
  1977. begin
  1978. If (FfreeShippingMin=AValue) then exit;
  1979. FfreeShippingMin:=AValue;
  1980. MarkPropertyChanged(AIndex);
  1981. end;
  1982. Procedure TLinkTypespecialOffers.SetpercentOff(AIndex : Integer; AValue : double);
  1983. begin
  1984. If (FpercentOff=AValue) then exit;
  1985. FpercentOff:=AValue;
  1986. MarkPropertyChanged(AIndex);
  1987. end;
  1988. Procedure TLinkTypespecialOffers.SetpercentOffMin(AIndex : Integer; AValue : TMoney);
  1989. begin
  1990. If (FpercentOffMin=AValue) then exit;
  1991. FpercentOffMin:=AValue;
  1992. MarkPropertyChanged(AIndex);
  1993. end;
  1994. Procedure TLinkTypespecialOffers.SetpriceCut(AIndex : Integer; AValue : TMoney);
  1995. begin
  1996. If (FpriceCut=AValue) then exit;
  1997. FpriceCut:=AValue;
  1998. MarkPropertyChanged(AIndex);
  1999. end;
  2000. Procedure TLinkTypespecialOffers.SetpriceCutMin(AIndex : Integer; AValue : TMoney);
  2001. begin
  2002. If (FpriceCutMin=AValue) then exit;
  2003. FpriceCutMin:=AValue;
  2004. MarkPropertyChanged(AIndex);
  2005. end;
  2006. Procedure TLinkTypespecialOffers.SetpromotionCodes(AIndex : Integer; AValue : TStringArray);
  2007. begin
  2008. If (FpromotionCodes=AValue) then exit;
  2009. FpromotionCodes:=AValue;
  2010. MarkPropertyChanged(AIndex);
  2011. end;
  2012. //2.6.4. bug workaround
  2013. {$IFDEF VER2_6}
  2014. Procedure TLinkTypespecialOffers.SetArrayLength(Const AName : String; ALength : Longint);
  2015. begin
  2016. Case AName of
  2017. 'promotioncodes' : SetLength(FpromotionCodes,ALength);
  2018. else
  2019. Inherited SetArrayLength(AName,ALength);
  2020. end;
  2021. end;
  2022. {$ENDIF VER2_6}
  2023. { --------------------------------------------------------------------
  2024. TLink
  2025. --------------------------------------------------------------------}
  2026. Procedure TLink.SetadvertiserId(AIndex : Integer; const AValue : String);
  2027. begin
  2028. If (FadvertiserId=AValue) then exit;
  2029. FadvertiserId:=AValue;
  2030. MarkPropertyChanged(AIndex);
  2031. end;
  2032. Procedure TLink.Setauthorship(AIndex : Integer; const AValue : String);
  2033. begin
  2034. If (Fauthorship=AValue) then exit;
  2035. Fauthorship:=AValue;
  2036. MarkPropertyChanged(AIndex);
  2037. end;
  2038. Procedure TLink.Setavailability(AIndex : Integer; const AValue : String);
  2039. begin
  2040. If (Favailability=AValue) then exit;
  2041. Favailability:=AValue;
  2042. MarkPropertyChanged(AIndex);
  2043. end;
  2044. Procedure TLink.SetclickTrackingUrl(AIndex : Integer; const AValue : String);
  2045. begin
  2046. If (FclickTrackingUrl=AValue) then exit;
  2047. FclickTrackingUrl:=AValue;
  2048. MarkPropertyChanged(AIndex);
  2049. end;
  2050. Procedure TLink.SetcreateDate(AIndex : Integer; AValue : TDatetime);
  2051. begin
  2052. If (FcreateDate=AValue) then exit;
  2053. FcreateDate:=AValue;
  2054. MarkPropertyChanged(AIndex);
  2055. end;
  2056. Procedure TLink.Setdescription(AIndex : Integer; const AValue : String);
  2057. begin
  2058. If (Fdescription=AValue) then exit;
  2059. Fdescription:=AValue;
  2060. MarkPropertyChanged(AIndex);
  2061. end;
  2062. Procedure TLink.SetdestinationUrl(AIndex : Integer; const AValue : String);
  2063. begin
  2064. If (FdestinationUrl=AValue) then exit;
  2065. FdestinationUrl:=AValue;
  2066. MarkPropertyChanged(AIndex);
  2067. end;
  2068. Procedure TLink.Setduration(AIndex : Integer; const AValue : String);
  2069. begin
  2070. If (Fduration=AValue) then exit;
  2071. Fduration:=AValue;
  2072. MarkPropertyChanged(AIndex);
  2073. end;
  2074. Procedure TLink.SetendDate(AIndex : Integer; AValue : TDatetime);
  2075. begin
  2076. If (FendDate=AValue) then exit;
  2077. FendDate:=AValue;
  2078. MarkPropertyChanged(AIndex);
  2079. end;
  2080. Procedure TLink.SetepcNinetyDayAverage(AIndex : Integer; AValue : TMoney);
  2081. begin
  2082. If (FepcNinetyDayAverage=AValue) then exit;
  2083. FepcNinetyDayAverage:=AValue;
  2084. MarkPropertyChanged(AIndex);
  2085. end;
  2086. Procedure TLink.SetepcSevenDayAverage(AIndex : Integer; AValue : TMoney);
  2087. begin
  2088. If (FepcSevenDayAverage=AValue) then exit;
  2089. FepcSevenDayAverage:=AValue;
  2090. MarkPropertyChanged(AIndex);
  2091. end;
  2092. Procedure TLink.Setid(AIndex : Integer; const AValue : String);
  2093. begin
  2094. If (Fid=AValue) then exit;
  2095. Fid:=AValue;
  2096. MarkPropertyChanged(AIndex);
  2097. end;
  2098. Procedure TLink.SetimageAltText(AIndex : Integer; const AValue : String);
  2099. begin
  2100. If (FimageAltText=AValue) then exit;
  2101. FimageAltText:=AValue;
  2102. MarkPropertyChanged(AIndex);
  2103. end;
  2104. Procedure TLink.SetimpressionTrackingUrl(AIndex : Integer; const AValue : String);
  2105. begin
  2106. If (FimpressionTrackingUrl=AValue) then exit;
  2107. FimpressionTrackingUrl:=AValue;
  2108. MarkPropertyChanged(AIndex);
  2109. end;
  2110. Procedure TLink.SetisActive(AIndex : Integer; AValue : boolean);
  2111. begin
  2112. If (FisActive=AValue) then exit;
  2113. FisActive:=AValue;
  2114. MarkPropertyChanged(AIndex);
  2115. end;
  2116. Procedure TLink.Setkind(AIndex : Integer; const AValue : String);
  2117. begin
  2118. If (Fkind=AValue) then exit;
  2119. Fkind:=AValue;
  2120. MarkPropertyChanged(AIndex);
  2121. end;
  2122. Procedure TLink.SetlinkType(AIndex : Integer; const AValue : String);
  2123. begin
  2124. If (FlinkType=AValue) then exit;
  2125. FlinkType:=AValue;
  2126. MarkPropertyChanged(AIndex);
  2127. end;
  2128. Procedure TLink.Setname(AIndex : Integer; const AValue : String);
  2129. begin
  2130. If (Fname=AValue) then exit;
  2131. Fname:=AValue;
  2132. MarkPropertyChanged(AIndex);
  2133. end;
  2134. Procedure TLink.SetpromotionType(AIndex : Integer; const AValue : String);
  2135. begin
  2136. If (FpromotionType=AValue) then exit;
  2137. FpromotionType:=AValue;
  2138. MarkPropertyChanged(AIndex);
  2139. end;
  2140. Procedure TLink.SetspecialOffers(AIndex : Integer; AValue : TLinkTypespecialOffers);
  2141. begin
  2142. If (FspecialOffers=AValue) then exit;
  2143. FspecialOffers:=AValue;
  2144. MarkPropertyChanged(AIndex);
  2145. end;
  2146. Procedure TLink.SetstartDate(AIndex : Integer; AValue : TDatetime);
  2147. begin
  2148. If (FstartDate=AValue) then exit;
  2149. FstartDate:=AValue;
  2150. MarkPropertyChanged(AIndex);
  2151. end;
  2152. { --------------------------------------------------------------------
  2153. TLinks
  2154. --------------------------------------------------------------------}
  2155. Procedure TLinks.Setitems(AIndex : Integer; AValue : TLinksTypeitemsArray);
  2156. begin
  2157. If (Fitems=AValue) then exit;
  2158. Fitems:=AValue;
  2159. MarkPropertyChanged(AIndex);
  2160. end;
  2161. Procedure TLinks.Setkind(AIndex : Integer; const AValue : String);
  2162. begin
  2163. If (Fkind=AValue) then exit;
  2164. Fkind:=AValue;
  2165. MarkPropertyChanged(AIndex);
  2166. end;
  2167. Procedure TLinks.SetnextPageToken(AIndex : Integer; const AValue : String);
  2168. begin
  2169. If (FnextPageToken=AValue) then exit;
  2170. FnextPageToken:=AValue;
  2171. MarkPropertyChanged(AIndex);
  2172. end;
  2173. //2.6.4. bug workaround
  2174. {$IFDEF VER2_6}
  2175. Procedure TLinks.SetArrayLength(Const AName : String; ALength : Longint);
  2176. begin
  2177. Case AName of
  2178. 'items' : SetLength(Fitems,ALength);
  2179. else
  2180. Inherited SetArrayLength(AName,ALength);
  2181. end;
  2182. end;
  2183. {$ENDIF VER2_6}
  2184. { --------------------------------------------------------------------
  2185. TMoney
  2186. --------------------------------------------------------------------}
  2187. Procedure TMoney.Setamount(AIndex : Integer; AValue : double);
  2188. begin
  2189. If (Famount=AValue) then exit;
  2190. Famount:=AValue;
  2191. MarkPropertyChanged(AIndex);
  2192. end;
  2193. Procedure TMoney.SetcurrencyCode(AIndex : Integer; const AValue : String);
  2194. begin
  2195. If (FcurrencyCode=AValue) then exit;
  2196. FcurrencyCode:=AValue;
  2197. MarkPropertyChanged(AIndex);
  2198. end;
  2199. { --------------------------------------------------------------------
  2200. TPublisher
  2201. --------------------------------------------------------------------}
  2202. Procedure TPublisher.Setclassification(AIndex : Integer; const AValue : String);
  2203. begin
  2204. If (Fclassification=AValue) then exit;
  2205. Fclassification:=AValue;
  2206. MarkPropertyChanged(AIndex);
  2207. end;
  2208. Procedure TPublisher.SetepcNinetyDayAverage(AIndex : Integer; AValue : TMoney);
  2209. begin
  2210. If (FepcNinetyDayAverage=AValue) then exit;
  2211. FepcNinetyDayAverage:=AValue;
  2212. MarkPropertyChanged(AIndex);
  2213. end;
  2214. Procedure TPublisher.SetepcSevenDayAverage(AIndex : Integer; AValue : TMoney);
  2215. begin
  2216. If (FepcSevenDayAverage=AValue) then exit;
  2217. FepcSevenDayAverage:=AValue;
  2218. MarkPropertyChanged(AIndex);
  2219. end;
  2220. Procedure TPublisher.Setid(AIndex : Integer; const AValue : String);
  2221. begin
  2222. If (Fid=AValue) then exit;
  2223. Fid:=AValue;
  2224. MarkPropertyChanged(AIndex);
  2225. end;
  2226. Procedure TPublisher.Setitem(AIndex : Integer; AValue : TPublisher);
  2227. begin
  2228. If (Fitem=AValue) then exit;
  2229. Fitem:=AValue;
  2230. MarkPropertyChanged(AIndex);
  2231. end;
  2232. Procedure TPublisher.SetjoinDate(AIndex : Integer; AValue : TDatetime);
  2233. begin
  2234. If (FjoinDate=AValue) then exit;
  2235. FjoinDate:=AValue;
  2236. MarkPropertyChanged(AIndex);
  2237. end;
  2238. Procedure TPublisher.Setkind(AIndex : Integer; const AValue : String);
  2239. begin
  2240. If (Fkind=AValue) then exit;
  2241. Fkind:=AValue;
  2242. MarkPropertyChanged(AIndex);
  2243. end;
  2244. Procedure TPublisher.Setname(AIndex : Integer; const AValue : String);
  2245. begin
  2246. If (Fname=AValue) then exit;
  2247. Fname:=AValue;
  2248. MarkPropertyChanged(AIndex);
  2249. end;
  2250. Procedure TPublisher.SetpayoutRank(AIndex : Integer; const AValue : String);
  2251. begin
  2252. If (FpayoutRank=AValue) then exit;
  2253. FpayoutRank:=AValue;
  2254. MarkPropertyChanged(AIndex);
  2255. end;
  2256. Procedure TPublisher.Setsites(AIndex : Integer; AValue : TStringArray);
  2257. begin
  2258. If (Fsites=AValue) then exit;
  2259. Fsites:=AValue;
  2260. MarkPropertyChanged(AIndex);
  2261. end;
  2262. Procedure TPublisher.Setstatus(AIndex : Integer; const AValue : String);
  2263. begin
  2264. If (Fstatus=AValue) then exit;
  2265. Fstatus:=AValue;
  2266. MarkPropertyChanged(AIndex);
  2267. end;
  2268. //2.6.4. bug workaround
  2269. {$IFDEF VER2_6}
  2270. Procedure TPublisher.SetArrayLength(Const AName : String; ALength : Longint);
  2271. begin
  2272. Case AName of
  2273. 'sites' : SetLength(Fsites,ALength);
  2274. else
  2275. Inherited SetArrayLength(AName,ALength);
  2276. end;
  2277. end;
  2278. {$ENDIF VER2_6}
  2279. { --------------------------------------------------------------------
  2280. TPublishers
  2281. --------------------------------------------------------------------}
  2282. Procedure TPublishers.Setitems(AIndex : Integer; AValue : TPublishersTypeitemsArray);
  2283. begin
  2284. If (Fitems=AValue) then exit;
  2285. Fitems:=AValue;
  2286. MarkPropertyChanged(AIndex);
  2287. end;
  2288. Procedure TPublishers.Setkind(AIndex : Integer; const AValue : String);
  2289. begin
  2290. If (Fkind=AValue) then exit;
  2291. Fkind:=AValue;
  2292. MarkPropertyChanged(AIndex);
  2293. end;
  2294. Procedure TPublishers.SetnextPageToken(AIndex : Integer; const AValue : String);
  2295. begin
  2296. If (FnextPageToken=AValue) then exit;
  2297. FnextPageToken:=AValue;
  2298. MarkPropertyChanged(AIndex);
  2299. end;
  2300. //2.6.4. bug workaround
  2301. {$IFDEF VER2_6}
  2302. Procedure TPublishers.SetArrayLength(Const AName : String; ALength : Longint);
  2303. begin
  2304. Case AName of
  2305. 'items' : SetLength(Fitems,ALength);
  2306. else
  2307. Inherited SetArrayLength(AName,ALength);
  2308. end;
  2309. end;
  2310. {$ENDIF VER2_6}
  2311. { --------------------------------------------------------------------
  2312. TReport
  2313. --------------------------------------------------------------------}
  2314. Procedure TReport.Setcolumn_names(AIndex : Integer; AValue : TStringArray);
  2315. begin
  2316. If (Fcolumn_names=AValue) then exit;
  2317. Fcolumn_names:=AValue;
  2318. MarkPropertyChanged(AIndex);
  2319. end;
  2320. Procedure TReport.Setend_date(AIndex : Integer; const AValue : String);
  2321. begin
  2322. If (Fend_date=AValue) then exit;
  2323. Fend_date:=AValue;
  2324. MarkPropertyChanged(AIndex);
  2325. end;
  2326. Procedure TReport.Setkind(AIndex : Integer; const AValue : String);
  2327. begin
  2328. If (Fkind=AValue) then exit;
  2329. Fkind:=AValue;
  2330. MarkPropertyChanged(AIndex);
  2331. end;
  2332. Procedure TReport.Setmatching_row_count(AIndex : Integer; const AValue : String);
  2333. begin
  2334. If (Fmatching_row_count=AValue) then exit;
  2335. Fmatching_row_count:=AValue;
  2336. MarkPropertyChanged(AIndex);
  2337. end;
  2338. Procedure TReport.Setrows(AIndex : Integer; AValue : TReportTyperowsArray);
  2339. begin
  2340. If (Frows=AValue) then exit;
  2341. Frows:=AValue;
  2342. MarkPropertyChanged(AIndex);
  2343. end;
  2344. Procedure TReport.Setstart_date(AIndex : Integer; const AValue : String);
  2345. begin
  2346. If (Fstart_date=AValue) then exit;
  2347. Fstart_date:=AValue;
  2348. MarkPropertyChanged(AIndex);
  2349. end;
  2350. Procedure TReport.Settotals_rows(AIndex : Integer; AValue : TReportTypetotals_rowsArray);
  2351. begin
  2352. If (Ftotals_rows=AValue) then exit;
  2353. Ftotals_rows:=AValue;
  2354. MarkPropertyChanged(AIndex);
  2355. end;
  2356. Procedure TReport.Set_type(AIndex : Integer; const AValue : String);
  2357. begin
  2358. If (F_type=AValue) then exit;
  2359. F_type:=AValue;
  2360. MarkPropertyChanged(AIndex);
  2361. end;
  2362. Class Function TReport.ExportPropertyName(Const AName : String) :String;
  2363. begin
  2364. Case AName of
  2365. '_type' : Result:='type';
  2366. else
  2367. Result:=Inherited ExportPropertyName(AName);
  2368. end;
  2369. end;
  2370. //2.6.4. bug workaround
  2371. {$IFDEF VER2_6}
  2372. Procedure TReport.SetArrayLength(Const AName : String; ALength : Longint);
  2373. begin
  2374. Case AName of
  2375. 'column_names' : SetLength(Fcolumn_names,ALength);
  2376. 'rows' : SetLength(Frows,ALength);
  2377. 'totals_rows' : SetLength(Ftotals_rows,ALength);
  2378. else
  2379. Inherited SetArrayLength(AName,ALength);
  2380. end;
  2381. end;
  2382. {$ENDIF VER2_6}
  2383. { --------------------------------------------------------------------
  2384. TAdvertisersResource
  2385. --------------------------------------------------------------------}
  2386. Class Function TAdvertisersResource.ResourceName : String;
  2387. begin
  2388. Result:='advertisers';
  2389. end;
  2390. Class Function TAdvertisersResource.DefaultAPI : TGoogleAPIClass;
  2391. begin
  2392. Result:=TganAPI;
  2393. end;
  2394. Function TAdvertisersResource.Get(role: string; roleId: string; AQuery : string = '') : TAdvertiser;
  2395. Const
  2396. _HTTPMethod = 'GET';
  2397. _Path = '{role}/{roleId}/advertiser';
  2398. _Methodid = 'gan.advertisers.get';
  2399. Var
  2400. _P : String;
  2401. begin
  2402. _P:=SubstitutePath(_Path,['role',role,'roleId',roleId]);
  2403. Result:=ServiceCall(_HTTPMethod,_P,AQuery,Nil,TAdvertiser) as TAdvertiser;
  2404. end;
  2405. Function TAdvertisersResource.Get(role: string; roleId: string; AQuery : TAdvertisersgetOptions) : TAdvertiser;
  2406. Var
  2407. _Q : String;
  2408. begin
  2409. _Q:='';
  2410. AddToQuery(_Q,'advertiserId',AQuery.advertiserId);
  2411. Result:=Get(role,roleId,_Q);
  2412. end;
  2413. Function TAdvertisersResource.List(role: string; roleId: string; AQuery : string = '') : TAdvertisers;
  2414. Const
  2415. _HTTPMethod = 'GET';
  2416. _Path = '{role}/{roleId}/advertisers';
  2417. _Methodid = 'gan.advertisers.list';
  2418. Var
  2419. _P : String;
  2420. begin
  2421. _P:=SubstitutePath(_Path,['role',role,'roleId',roleId]);
  2422. Result:=ServiceCall(_HTTPMethod,_P,AQuery,Nil,TAdvertisers) as TAdvertisers;
  2423. end;
  2424. Function TAdvertisersResource.List(role: string; roleId: string; AQuery : TAdvertiserslistOptions) : TAdvertisers;
  2425. Var
  2426. _Q : String;
  2427. begin
  2428. _Q:='';
  2429. AddToQuery(_Q,'advertiserCategory',AQuery.advertiserCategory);
  2430. AddToQuery(_Q,'maxResults',AQuery.maxResults);
  2431. AddToQuery(_Q,'minNinetyDayEpc',AQuery.minNinetyDayEpc);
  2432. AddToQuery(_Q,'minPayoutRank',AQuery.minPayoutRank);
  2433. AddToQuery(_Q,'minSevenDayEpc',AQuery.minSevenDayEpc);
  2434. AddToQuery(_Q,'pageToken',AQuery.pageToken);
  2435. AddToQuery(_Q,'relationshipStatus',AQuery.relationshipStatus);
  2436. Result:=List(role,roleId,_Q);
  2437. end;
  2438. { --------------------------------------------------------------------
  2439. TCcOffersResource
  2440. --------------------------------------------------------------------}
  2441. Class Function TCcOffersResource.ResourceName : String;
  2442. begin
  2443. Result:='ccOffers';
  2444. end;
  2445. Class Function TCcOffersResource.DefaultAPI : TGoogleAPIClass;
  2446. begin
  2447. Result:=TganAPI;
  2448. end;
  2449. Function TCcOffersResource.List(publisher: string; AQuery : string = '') : TCcOffers;
  2450. Const
  2451. _HTTPMethod = 'GET';
  2452. _Path = 'publishers/{publisher}/ccOffers';
  2453. _Methodid = 'gan.ccOffers.list';
  2454. Var
  2455. _P : String;
  2456. begin
  2457. _P:=SubstitutePath(_Path,['publisher',publisher]);
  2458. Result:=ServiceCall(_HTTPMethod,_P,AQuery,Nil,TCcOffers) as TCcOffers;
  2459. end;
  2460. Function TCcOffersResource.List(publisher: string; AQuery : TCcOfferslistOptions) : TCcOffers;
  2461. Var
  2462. _Q : String;
  2463. begin
  2464. _Q:='';
  2465. AddToQuery(_Q,'advertiser',AQuery.advertiser);
  2466. AddToQuery(_Q,'projection',AQuery.projection);
  2467. Result:=List(publisher,_Q);
  2468. end;
  2469. { --------------------------------------------------------------------
  2470. TEventsResource
  2471. --------------------------------------------------------------------}
  2472. Class Function TEventsResource.ResourceName : String;
  2473. begin
  2474. Result:='events';
  2475. end;
  2476. Class Function TEventsResource.DefaultAPI : TGoogleAPIClass;
  2477. begin
  2478. Result:=TganAPI;
  2479. end;
  2480. Function TEventsResource.List(role: string; roleId: string; AQuery : string = '') : TEvents;
  2481. Const
  2482. _HTTPMethod = 'GET';
  2483. _Path = '{role}/{roleId}/events';
  2484. _Methodid = 'gan.events.list';
  2485. Var
  2486. _P : String;
  2487. begin
  2488. _P:=SubstitutePath(_Path,['role',role,'roleId',roleId]);
  2489. Result:=ServiceCall(_HTTPMethod,_P,AQuery,Nil,TEvents) as TEvents;
  2490. end;
  2491. Function TEventsResource.List(role: string; roleId: string; AQuery : TEventslistOptions) : TEvents;
  2492. Var
  2493. _Q : String;
  2494. begin
  2495. _Q:='';
  2496. AddToQuery(_Q,'advertiserId',AQuery.advertiserId);
  2497. AddToQuery(_Q,'chargeType',AQuery.chargeType);
  2498. AddToQuery(_Q,'eventDateMax',AQuery.eventDateMax);
  2499. AddToQuery(_Q,'eventDateMin',AQuery.eventDateMin);
  2500. AddToQuery(_Q,'linkId',AQuery.linkId);
  2501. AddToQuery(_Q,'maxResults',AQuery.maxResults);
  2502. AddToQuery(_Q,'memberId',AQuery.memberId);
  2503. AddToQuery(_Q,'modifyDateMax',AQuery.modifyDateMax);
  2504. AddToQuery(_Q,'modifyDateMin',AQuery.modifyDateMin);
  2505. AddToQuery(_Q,'orderId',AQuery.orderId);
  2506. AddToQuery(_Q,'pageToken',AQuery.pageToken);
  2507. AddToQuery(_Q,'productCategory',AQuery.productCategory);
  2508. AddToQuery(_Q,'publisherId',AQuery.publisherId);
  2509. AddToQuery(_Q,'sku',AQuery.sku);
  2510. AddToQuery(_Q,'status',AQuery.status);
  2511. AddToQuery(_Q,'type',AQuery._type);
  2512. Result:=List(role,roleId,_Q);
  2513. end;
  2514. { --------------------------------------------------------------------
  2515. TLinksResource
  2516. --------------------------------------------------------------------}
  2517. Class Function TLinksResource.ResourceName : String;
  2518. begin
  2519. Result:='links';
  2520. end;
  2521. Class Function TLinksResource.DefaultAPI : TGoogleAPIClass;
  2522. begin
  2523. Result:=TganAPI;
  2524. end;
  2525. Function TLinksResource.Get(linkId: string; role: string; roleId: string) : TLink;
  2526. Const
  2527. _HTTPMethod = 'GET';
  2528. _Path = '{role}/{roleId}/link/{linkId}';
  2529. _Methodid = 'gan.links.get';
  2530. Var
  2531. _P : String;
  2532. begin
  2533. _P:=SubstitutePath(_Path,['linkId',linkId,'role',role,'roleId',roleId]);
  2534. Result:=ServiceCall(_HTTPMethod,_P,'',Nil,TLink) as TLink;
  2535. end;
  2536. Function TLinksResource.Insert(role: string; roleId: string; aLink : TLink) : TLink;
  2537. Const
  2538. _HTTPMethod = 'POST';
  2539. _Path = '{role}/{roleId}/link';
  2540. _Methodid = 'gan.links.insert';
  2541. Var
  2542. _P : String;
  2543. begin
  2544. _P:=SubstitutePath(_Path,['role',role,'roleId',roleId]);
  2545. Result:=ServiceCall(_HTTPMethod,_P,'',aLink,TLink) as TLink;
  2546. end;
  2547. Function TLinksResource.List(role: string; roleId: string; AQuery : string = '') : TLinks;
  2548. Const
  2549. _HTTPMethod = 'GET';
  2550. _Path = '{role}/{roleId}/links';
  2551. _Methodid = 'gan.links.list';
  2552. Var
  2553. _P : String;
  2554. begin
  2555. _P:=SubstitutePath(_Path,['role',role,'roleId',roleId]);
  2556. Result:=ServiceCall(_HTTPMethod,_P,AQuery,Nil,TLinks) as TLinks;
  2557. end;
  2558. Function TLinksResource.List(role: string; roleId: string; AQuery : TLinkslistOptions) : TLinks;
  2559. Var
  2560. _Q : String;
  2561. begin
  2562. _Q:='';
  2563. AddToQuery(_Q,'advertiserId',AQuery.advertiserId);
  2564. AddToQuery(_Q,'assetSize',AQuery.assetSize);
  2565. AddToQuery(_Q,'authorship',AQuery.authorship);
  2566. AddToQuery(_Q,'createDateMax',AQuery.createDateMax);
  2567. AddToQuery(_Q,'createDateMin',AQuery.createDateMin);
  2568. AddToQuery(_Q,'linkType',AQuery.linkType);
  2569. AddToQuery(_Q,'maxResults',AQuery.maxResults);
  2570. AddToQuery(_Q,'pageToken',AQuery.pageToken);
  2571. AddToQuery(_Q,'promotionType',AQuery.promotionType);
  2572. AddToQuery(_Q,'relationshipStatus',AQuery.relationshipStatus);
  2573. AddToQuery(_Q,'searchText',AQuery.searchText);
  2574. AddToQuery(_Q,'startDateMax',AQuery.startDateMax);
  2575. AddToQuery(_Q,'startDateMin',AQuery.startDateMin);
  2576. Result:=List(role,roleId,_Q);
  2577. end;
  2578. { --------------------------------------------------------------------
  2579. TPublishersResource
  2580. --------------------------------------------------------------------}
  2581. Class Function TPublishersResource.ResourceName : String;
  2582. begin
  2583. Result:='publishers';
  2584. end;
  2585. Class Function TPublishersResource.DefaultAPI : TGoogleAPIClass;
  2586. begin
  2587. Result:=TganAPI;
  2588. end;
  2589. Function TPublishersResource.Get(role: string; roleId: string; AQuery : string = '') : TPublisher;
  2590. Const
  2591. _HTTPMethod = 'GET';
  2592. _Path = '{role}/{roleId}/publisher';
  2593. _Methodid = 'gan.publishers.get';
  2594. Var
  2595. _P : String;
  2596. begin
  2597. _P:=SubstitutePath(_Path,['role',role,'roleId',roleId]);
  2598. Result:=ServiceCall(_HTTPMethod,_P,AQuery,Nil,TPublisher) as TPublisher;
  2599. end;
  2600. Function TPublishersResource.Get(role: string; roleId: string; AQuery : TPublishersgetOptions) : TPublisher;
  2601. Var
  2602. _Q : String;
  2603. begin
  2604. _Q:='';
  2605. AddToQuery(_Q,'publisherId',AQuery.publisherId);
  2606. Result:=Get(role,roleId,_Q);
  2607. end;
  2608. Function TPublishersResource.List(role: string; roleId: string; AQuery : string = '') : TPublishers;
  2609. Const
  2610. _HTTPMethod = 'GET';
  2611. _Path = '{role}/{roleId}/publishers';
  2612. _Methodid = 'gan.publishers.list';
  2613. Var
  2614. _P : String;
  2615. begin
  2616. _P:=SubstitutePath(_Path,['role',role,'roleId',roleId]);
  2617. Result:=ServiceCall(_HTTPMethod,_P,AQuery,Nil,TPublishers) as TPublishers;
  2618. end;
  2619. Function TPublishersResource.List(role: string; roleId: string; AQuery : TPublisherslistOptions) : TPublishers;
  2620. Var
  2621. _Q : String;
  2622. begin
  2623. _Q:='';
  2624. AddToQuery(_Q,'maxResults',AQuery.maxResults);
  2625. AddToQuery(_Q,'minNinetyDayEpc',AQuery.minNinetyDayEpc);
  2626. AddToQuery(_Q,'minPayoutRank',AQuery.minPayoutRank);
  2627. AddToQuery(_Q,'minSevenDayEpc',AQuery.minSevenDayEpc);
  2628. AddToQuery(_Q,'pageToken',AQuery.pageToken);
  2629. AddToQuery(_Q,'publisherCategory',AQuery.publisherCategory);
  2630. AddToQuery(_Q,'relationshipStatus',AQuery.relationshipStatus);
  2631. Result:=List(role,roleId,_Q);
  2632. end;
  2633. { --------------------------------------------------------------------
  2634. TReportsResource
  2635. --------------------------------------------------------------------}
  2636. Class Function TReportsResource.ResourceName : String;
  2637. begin
  2638. Result:='reports';
  2639. end;
  2640. Class Function TReportsResource.DefaultAPI : TGoogleAPIClass;
  2641. begin
  2642. Result:=TganAPI;
  2643. end;
  2644. Function TReportsResource.Get(reportType: string; role: string; roleId: string; AQuery : string = '') : TReport;
  2645. Const
  2646. _HTTPMethod = 'GET';
  2647. _Path = '{role}/{roleId}/report/{reportType}';
  2648. _Methodid = 'gan.reports.get';
  2649. Var
  2650. _P : String;
  2651. begin
  2652. _P:=SubstitutePath(_Path,['reportType',reportType,'role',role,'roleId',roleId]);
  2653. Result:=ServiceCall(_HTTPMethod,_P,AQuery,Nil,TReport) as TReport;
  2654. end;
  2655. Function TReportsResource.Get(reportType: string; role: string; roleId: string; AQuery : TReportsgetOptions) : TReport;
  2656. Var
  2657. _Q : String;
  2658. begin
  2659. _Q:='';
  2660. AddToQuery(_Q,'advertiserId',AQuery.advertiserId);
  2661. AddToQuery(_Q,'calculateTotals',AQuery.calculateTotals);
  2662. AddToQuery(_Q,'endDate',AQuery.endDate);
  2663. AddToQuery(_Q,'eventType',AQuery.eventType);
  2664. AddToQuery(_Q,'linkId',AQuery.linkId);
  2665. AddToQuery(_Q,'maxResults',AQuery.maxResults);
  2666. AddToQuery(_Q,'orderId',AQuery.orderId);
  2667. AddToQuery(_Q,'publisherId',AQuery.publisherId);
  2668. AddToQuery(_Q,'startDate',AQuery.startDate);
  2669. AddToQuery(_Q,'startIndex',AQuery.startIndex);
  2670. AddToQuery(_Q,'status',AQuery.status);
  2671. Result:=Get(reportType,role,roleId,_Q);
  2672. end;
  2673. { --------------------------------------------------------------------
  2674. TGanAPI
  2675. --------------------------------------------------------------------}
  2676. Class Function TGanAPI.APIName : String;
  2677. begin
  2678. Result:='gan';
  2679. end;
  2680. Class Function TGanAPI.APIVersion : String;
  2681. begin
  2682. Result:='v1beta1';
  2683. end;
  2684. Class Function TGanAPI.APIRevision : String;
  2685. begin
  2686. Result:='20130205';
  2687. end;
  2688. Class Function TGanAPI.APIID : String;
  2689. begin
  2690. Result:='gan:v1beta1';
  2691. end;
  2692. Class Function TGanAPI.APITitle : String;
  2693. begin
  2694. Result:='Google Affiliate Network API';
  2695. end;
  2696. Class Function TGanAPI.APIDescription : String;
  2697. begin
  2698. Result:='Lets you have programmatic access to your Google Affiliate Network data.';
  2699. end;
  2700. Class Function TGanAPI.APIOwnerDomain : String;
  2701. begin
  2702. Result:='google.com';
  2703. end;
  2704. Class Function TGanAPI.APIOwnerName : String;
  2705. begin
  2706. Result:='Google';
  2707. end;
  2708. Class Function TGanAPI.APIIcon16 : String;
  2709. begin
  2710. Result:='http://www.google.com/images/icons/product/affiliatenetwork-16.png';
  2711. end;
  2712. Class Function TGanAPI.APIIcon32 : String;
  2713. begin
  2714. Result:='http://www.google.com/images/icons/product/affiliatenetwork-32.png';
  2715. end;
  2716. Class Function TGanAPI.APIdocumentationLink : String;
  2717. begin
  2718. Result:='https://developers.google.com/affiliate-network/';
  2719. end;
  2720. Class Function TGanAPI.APIrootUrl : string;
  2721. begin
  2722. Result:='https://www.googleapis.com:443/';
  2723. end;
  2724. Class Function TGanAPI.APIbasePath : string;
  2725. begin
  2726. Result:='/gan/v1beta1/';
  2727. end;
  2728. Class Function TGanAPI.APIbaseURL : String;
  2729. begin
  2730. Result:='https://www.googleapis.com:443/gan/v1beta1/';
  2731. end;
  2732. Class Function TGanAPI.APIProtocol : string;
  2733. begin
  2734. Result:='rest';
  2735. end;
  2736. Class Function TGanAPI.APIservicePath : string;
  2737. begin
  2738. Result:='gan/v1beta1/';
  2739. end;
  2740. Class Function TGanAPI.APIbatchPath : String;
  2741. begin
  2742. Result:='batch';
  2743. end;
  2744. Class Function TGanAPI.APIAuthScopes : TScopeInfoArray;
  2745. begin
  2746. SetLength(Result,0);
  2747. end;
  2748. Class Function TGanAPI.APINeedsAuth : Boolean;
  2749. begin
  2750. Result:=False;
  2751. end;
  2752. Class Procedure TGanAPI.RegisterAPIResources;
  2753. begin
  2754. TAdvertiser.RegisterObject;
  2755. TAdvertisers.RegisterObject;
  2756. TCcOfferTypebonusRewardsItem.RegisterObject;
  2757. TCcOfferTypedefaultFeesItem.RegisterObject;
  2758. TCcOfferTyperewardsItem.RegisterObject;
  2759. TCcOffer.RegisterObject;
  2760. TCcOffers.RegisterObject;
  2761. TEventTypeproductsItem.RegisterObject;
  2762. TEvent.RegisterObject;
  2763. TEvents.RegisterObject;
  2764. TLinkTypespecialOffers.RegisterObject;
  2765. TLink.RegisterObject;
  2766. TLinks.RegisterObject;
  2767. TMoney.RegisterObject;
  2768. TPublisher.RegisterObject;
  2769. TPublishers.RegisterObject;
  2770. TReport.RegisterObject;
  2771. end;
  2772. Function TGanAPI.GetAdvertisersInstance : TAdvertisersResource;
  2773. begin
  2774. if (FAdvertisersInstance=Nil) then
  2775. FAdvertisersInstance:=CreateAdvertisersResource;
  2776. Result:=FAdvertisersInstance;
  2777. end;
  2778. Function TGanAPI.CreateAdvertisersResource : TAdvertisersResource;
  2779. begin
  2780. Result:=CreateAdvertisersResource(Self);
  2781. end;
  2782. Function TGanAPI.CreateAdvertisersResource(AOwner : TComponent) : TAdvertisersResource;
  2783. begin
  2784. Result:=TAdvertisersResource.Create(AOwner);
  2785. Result.API:=Self.API;
  2786. end;
  2787. Function TGanAPI.GetCcOffersInstance : TCcOffersResource;
  2788. begin
  2789. if (FCcOffersInstance=Nil) then
  2790. FCcOffersInstance:=CreateCcOffersResource;
  2791. Result:=FCcOffersInstance;
  2792. end;
  2793. Function TGanAPI.CreateCcOffersResource : TCcOffersResource;
  2794. begin
  2795. Result:=CreateCcOffersResource(Self);
  2796. end;
  2797. Function TGanAPI.CreateCcOffersResource(AOwner : TComponent) : TCcOffersResource;
  2798. begin
  2799. Result:=TCcOffersResource.Create(AOwner);
  2800. Result.API:=Self.API;
  2801. end;
  2802. Function TGanAPI.GetEventsInstance : TEventsResource;
  2803. begin
  2804. if (FEventsInstance=Nil) then
  2805. FEventsInstance:=CreateEventsResource;
  2806. Result:=FEventsInstance;
  2807. end;
  2808. Function TGanAPI.CreateEventsResource : TEventsResource;
  2809. begin
  2810. Result:=CreateEventsResource(Self);
  2811. end;
  2812. Function TGanAPI.CreateEventsResource(AOwner : TComponent) : TEventsResource;
  2813. begin
  2814. Result:=TEventsResource.Create(AOwner);
  2815. Result.API:=Self.API;
  2816. end;
  2817. Function TGanAPI.GetLinksInstance : TLinksResource;
  2818. begin
  2819. if (FLinksInstance=Nil) then
  2820. FLinksInstance:=CreateLinksResource;
  2821. Result:=FLinksInstance;
  2822. end;
  2823. Function TGanAPI.CreateLinksResource : TLinksResource;
  2824. begin
  2825. Result:=CreateLinksResource(Self);
  2826. end;
  2827. Function TGanAPI.CreateLinksResource(AOwner : TComponent) : TLinksResource;
  2828. begin
  2829. Result:=TLinksResource.Create(AOwner);
  2830. Result.API:=Self.API;
  2831. end;
  2832. Function TGanAPI.GetPublishersInstance : TPublishersResource;
  2833. begin
  2834. if (FPublishersInstance=Nil) then
  2835. FPublishersInstance:=CreatePublishersResource;
  2836. Result:=FPublishersInstance;
  2837. end;
  2838. Function TGanAPI.CreatePublishersResource : TPublishersResource;
  2839. begin
  2840. Result:=CreatePublishersResource(Self);
  2841. end;
  2842. Function TGanAPI.CreatePublishersResource(AOwner : TComponent) : TPublishersResource;
  2843. begin
  2844. Result:=TPublishersResource.Create(AOwner);
  2845. Result.API:=Self.API;
  2846. end;
  2847. Function TGanAPI.GetReportsInstance : TReportsResource;
  2848. begin
  2849. if (FReportsInstance=Nil) then
  2850. FReportsInstance:=CreateReportsResource;
  2851. Result:=FReportsInstance;
  2852. end;
  2853. Function TGanAPI.CreateReportsResource : TReportsResource;
  2854. begin
  2855. Result:=CreateReportsResource(Self);
  2856. end;
  2857. Function TGanAPI.CreateReportsResource(AOwner : TComponent) : TReportsResource;
  2858. begin
  2859. Result:=TReportsResource.Create(AOwner);
  2860. Result.API:=Self.API;
  2861. end;
  2862. initialization
  2863. TGanAPI.RegisterAPI;
  2864. end.