Dysmsapi.php 139 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450145114521453145414551456145714581459146014611462146314641465146614671468146914701471147214731474147514761477147814791480148114821483148414851486148714881489149014911492149314941495149614971498149915001501150215031504150515061507150815091510151115121513151415151516151715181519152015211522152315241525152615271528152915301531153215331534153515361537153815391540154115421543154415451546154715481549155015511552155315541555155615571558155915601561156215631564156515661567156815691570157115721573157415751576157715781579158015811582158315841585158615871588158915901591159215931594159515961597159815991600160116021603160416051606160716081609161016111612161316141615161616171618161916201621162216231624162516261627162816291630163116321633163416351636163716381639164016411642164316441645164616471648164916501651165216531654165516561657165816591660166116621663166416651666166716681669167016711672167316741675167616771678167916801681168216831684168516861687168816891690169116921693169416951696169716981699170017011702170317041705170617071708170917101711171217131714171517161717171817191720172117221723172417251726172717281729173017311732173317341735173617371738173917401741174217431744174517461747174817491750175117521753175417551756175717581759176017611762176317641765176617671768176917701771177217731774177517761777177817791780178117821783178417851786178717881789179017911792179317941795179617971798179918001801180218031804180518061807180818091810181118121813181418151816181718181819182018211822182318241825182618271828182918301831183218331834183518361837183818391840184118421843184418451846184718481849185018511852185318541855185618571858185918601861186218631864186518661867186818691870187118721873187418751876187718781879188018811882188318841885188618871888188918901891189218931894189518961897189818991900190119021903190419051906190719081909191019111912191319141915191619171918191919201921192219231924192519261927192819291930193119321933193419351936193719381939194019411942194319441945194619471948194919501951195219531954195519561957195819591960196119621963196419651966196719681969197019711972197319741975197619771978197919801981198219831984198519861987198819891990199119921993199419951996199719981999200020012002200320042005200620072008200920102011201220132014201520162017201820192020202120222023202420252026202720282029203020312032203320342035203620372038203920402041204220432044204520462047204820492050205120522053205420552056205720582059206020612062206320642065206620672068206920702071207220732074207520762077207820792080208120822083208420852086208720882089209020912092209320942095209620972098209921002101210221032104210521062107210821092110211121122113211421152116211721182119212021212122212321242125212621272128212921302131213221332134213521362137213821392140214121422143214421452146214721482149215021512152215321542155215621572158215921602161216221632164216521662167216821692170217121722173217421752176217721782179218021812182218321842185218621872188218921902191219221932194219521962197219821992200220122022203220422052206220722082209221022112212221322142215221622172218221922202221222222232224222522262227222822292230223122322233223422352236223722382239224022412242224322442245224622472248224922502251225222532254225522562257225822592260226122622263226422652266226722682269227022712272227322742275227622772278227922802281228222832284228522862287228822892290229122922293229422952296229722982299230023012302230323042305230623072308230923102311231223132314231523162317231823192320232123222323232423252326232723282329233023312332233323342335233623372338233923402341234223432344234523462347234823492350235123522353235423552356235723582359236023612362236323642365236623672368236923702371237223732374237523762377237823792380238123822383238423852386238723882389239023912392239323942395239623972398239924002401240224032404240524062407240824092410241124122413241424152416241724182419242024212422242324242425242624272428242924302431243224332434243524362437243824392440244124422443244424452446244724482449245024512452245324542455245624572458245924602461246224632464246524662467246824692470247124722473247424752476247724782479248024812482248324842485248624872488248924902491249224932494249524962497249824992500250125022503250425052506250725082509251025112512251325142515251625172518251925202521252225232524252525262527252825292530253125322533253425352536253725382539254025412542254325442545254625472548254925502551255225532554255525562557255825592560256125622563256425652566256725682569257025712572257325742575257625772578257925802581258225832584258525862587258825892590259125922593259425952596259725982599260026012602260326042605260626072608260926102611261226132614261526162617261826192620262126222623262426252626262726282629263026312632263326342635263626372638263926402641264226432644264526462647264826492650265126522653265426552656265726582659266026612662266326642665266626672668266926702671267226732674267526762677267826792680268126822683268426852686268726882689269026912692269326942695269626972698269927002701270227032704270527062707270827092710271127122713271427152716271727182719272027212722272327242725272627272728272927302731273227332734273527362737273827392740274127422743274427452746274727482749275027512752275327542755275627572758275927602761276227632764276527662767276827692770277127722773277427752776277727782779278027812782278327842785278627872788278927902791279227932794279527962797279827992800280128022803280428052806280728082809281028112812281328142815281628172818281928202821282228232824282528262827282828292830283128322833283428352836283728382839284028412842284328442845284628472848284928502851285228532854285528562857285828592860286128622863286428652866286728682869287028712872287328742875287628772878287928802881288228832884288528862887288828892890289128922893289428952896289728982899290029012902290329042905290629072908290929102911291229132914291529162917291829192920292129222923292429252926292729282929293029312932293329342935293629372938293929402941294229432944294529462947294829492950295129522953295429552956295729582959296029612962296329642965296629672968296929702971297229732974297529762977297829792980298129822983298429852986298729882989299029912992299329942995299629972998299930003001300230033004300530063007300830093010301130123013301430153016301730183019302030213022302330243025302630273028302930303031303230333034303530363037303830393040304130423043304430453046304730483049
  1. <?php
  2. // This file is auto-generated, don't edit it. Thanks.
  3. namespace AlibabaCloud\SDK\Dysmsapi\V20170525;
  4. use AlibabaCloud\Endpoint\Endpoint;
  5. use AlibabaCloud\OpenApiUtil\OpenApiUtilClient;
  6. use AlibabaCloud\SDK\Dysmsapi\V20170525\Models\AddShortUrlRequest;
  7. use AlibabaCloud\SDK\Dysmsapi\V20170525\Models\AddShortUrlResponse;
  8. use AlibabaCloud\SDK\Dysmsapi\V20170525\Models\AddSmsSignRequest;
  9. use AlibabaCloud\SDK\Dysmsapi\V20170525\Models\AddSmsSignResponse;
  10. use AlibabaCloud\SDK\Dysmsapi\V20170525\Models\AddSmsTemplateRequest;
  11. use AlibabaCloud\SDK\Dysmsapi\V20170525\Models\AddSmsTemplateResponse;
  12. use AlibabaCloud\SDK\Dysmsapi\V20170525\Models\CheckMobilesCardSupportRequest;
  13. use AlibabaCloud\SDK\Dysmsapi\V20170525\Models\CheckMobilesCardSupportResponse;
  14. use AlibabaCloud\SDK\Dysmsapi\V20170525\Models\ConversionDataIntlRequest;
  15. use AlibabaCloud\SDK\Dysmsapi\V20170525\Models\ConversionDataIntlResponse;
  16. use AlibabaCloud\SDK\Dysmsapi\V20170525\Models\CreateCardSmsTemplateRequest;
  17. use AlibabaCloud\SDK\Dysmsapi\V20170525\Models\CreateCardSmsTemplateResponse;
  18. use AlibabaCloud\SDK\Dysmsapi\V20170525\Models\CreateCardSmsTemplateShrinkRequest;
  19. use AlibabaCloud\SDK\Dysmsapi\V20170525\Models\CreateSmartShortUrlRequest;
  20. use AlibabaCloud\SDK\Dysmsapi\V20170525\Models\CreateSmartShortUrlResponse;
  21. use AlibabaCloud\SDK\Dysmsapi\V20170525\Models\CreateSmsSignRequest;
  22. use AlibabaCloud\SDK\Dysmsapi\V20170525\Models\CreateSmsSignResponse;
  23. use AlibabaCloud\SDK\Dysmsapi\V20170525\Models\CreateSmsSignShrinkRequest;
  24. use AlibabaCloud\SDK\Dysmsapi\V20170525\Models\CreateSmsTemplateRequest;
  25. use AlibabaCloud\SDK\Dysmsapi\V20170525\Models\CreateSmsTemplateResponse;
  26. use AlibabaCloud\SDK\Dysmsapi\V20170525\Models\CreateSmsTemplateShrinkRequest;
  27. use AlibabaCloud\SDK\Dysmsapi\V20170525\Models\DeleteShortUrlRequest;
  28. use AlibabaCloud\SDK\Dysmsapi\V20170525\Models\DeleteShortUrlResponse;
  29. use AlibabaCloud\SDK\Dysmsapi\V20170525\Models\DeleteSmsSignRequest;
  30. use AlibabaCloud\SDK\Dysmsapi\V20170525\Models\DeleteSmsSignResponse;
  31. use AlibabaCloud\SDK\Dysmsapi\V20170525\Models\DeleteSmsTemplateRequest;
  32. use AlibabaCloud\SDK\Dysmsapi\V20170525\Models\DeleteSmsTemplateResponse;
  33. use AlibabaCloud\SDK\Dysmsapi\V20170525\Models\GetCardSmsLinkRequest;
  34. use AlibabaCloud\SDK\Dysmsapi\V20170525\Models\GetCardSmsLinkResponse;
  35. use AlibabaCloud\SDK\Dysmsapi\V20170525\Models\GetMediaResourceIdRequest;
  36. use AlibabaCloud\SDK\Dysmsapi\V20170525\Models\GetMediaResourceIdResponse;
  37. use AlibabaCloud\SDK\Dysmsapi\V20170525\Models\GetOSSInfoForCardTemplateResponse;
  38. use AlibabaCloud\SDK\Dysmsapi\V20170525\Models\GetOSSInfoForUploadFileRequest;
  39. use AlibabaCloud\SDK\Dysmsapi\V20170525\Models\GetOSSInfoForUploadFileResponse;
  40. use AlibabaCloud\SDK\Dysmsapi\V20170525\Models\GetSmsSignRequest;
  41. use AlibabaCloud\SDK\Dysmsapi\V20170525\Models\GetSmsSignResponse;
  42. use AlibabaCloud\SDK\Dysmsapi\V20170525\Models\GetSmsTemplateRequest;
  43. use AlibabaCloud\SDK\Dysmsapi\V20170525\Models\GetSmsTemplateResponse;
  44. use AlibabaCloud\SDK\Dysmsapi\V20170525\Models\ListTagResourcesRequest;
  45. use AlibabaCloud\SDK\Dysmsapi\V20170525\Models\ListTagResourcesResponse;
  46. use AlibabaCloud\SDK\Dysmsapi\V20170525\Models\ModifySmsSignRequest;
  47. use AlibabaCloud\SDK\Dysmsapi\V20170525\Models\ModifySmsSignResponse;
  48. use AlibabaCloud\SDK\Dysmsapi\V20170525\Models\ModifySmsTemplateRequest;
  49. use AlibabaCloud\SDK\Dysmsapi\V20170525\Models\ModifySmsTemplateResponse;
  50. use AlibabaCloud\SDK\Dysmsapi\V20170525\Models\QueryCardSmsTemplateReportRequest;
  51. use AlibabaCloud\SDK\Dysmsapi\V20170525\Models\QueryCardSmsTemplateReportResponse;
  52. use AlibabaCloud\SDK\Dysmsapi\V20170525\Models\QueryCardSmsTemplateRequest;
  53. use AlibabaCloud\SDK\Dysmsapi\V20170525\Models\QueryCardSmsTemplateResponse;
  54. use AlibabaCloud\SDK\Dysmsapi\V20170525\Models\QueryMobilesCardSupportRequest;
  55. use AlibabaCloud\SDK\Dysmsapi\V20170525\Models\QueryMobilesCardSupportResponse;
  56. use AlibabaCloud\SDK\Dysmsapi\V20170525\Models\QueryMobilesCardSupportShrinkRequest;
  57. use AlibabaCloud\SDK\Dysmsapi\V20170525\Models\QueryPageSmartShortUrlLogRequest;
  58. use AlibabaCloud\SDK\Dysmsapi\V20170525\Models\QueryPageSmartShortUrlLogResponse;
  59. use AlibabaCloud\SDK\Dysmsapi\V20170525\Models\QuerySendDetailsRequest;
  60. use AlibabaCloud\SDK\Dysmsapi\V20170525\Models\QuerySendDetailsResponse;
  61. use AlibabaCloud\SDK\Dysmsapi\V20170525\Models\QuerySendStatisticsRequest;
  62. use AlibabaCloud\SDK\Dysmsapi\V20170525\Models\QuerySendStatisticsResponse;
  63. use AlibabaCloud\SDK\Dysmsapi\V20170525\Models\QueryShortUrlRequest;
  64. use AlibabaCloud\SDK\Dysmsapi\V20170525\Models\QueryShortUrlResponse;
  65. use AlibabaCloud\SDK\Dysmsapi\V20170525\Models\QuerySmsSignListRequest;
  66. use AlibabaCloud\SDK\Dysmsapi\V20170525\Models\QuerySmsSignListResponse;
  67. use AlibabaCloud\SDK\Dysmsapi\V20170525\Models\QuerySmsSignRequest;
  68. use AlibabaCloud\SDK\Dysmsapi\V20170525\Models\QuerySmsSignResponse;
  69. use AlibabaCloud\SDK\Dysmsapi\V20170525\Models\QuerySmsTemplateListRequest;
  70. use AlibabaCloud\SDK\Dysmsapi\V20170525\Models\QuerySmsTemplateListResponse;
  71. use AlibabaCloud\SDK\Dysmsapi\V20170525\Models\QuerySmsTemplateRequest;
  72. use AlibabaCloud\SDK\Dysmsapi\V20170525\Models\QuerySmsTemplateResponse;
  73. use AlibabaCloud\SDK\Dysmsapi\V20170525\Models\SendBatchCardSmsRequest;
  74. use AlibabaCloud\SDK\Dysmsapi\V20170525\Models\SendBatchCardSmsResponse;
  75. use AlibabaCloud\SDK\Dysmsapi\V20170525\Models\SendBatchSmsRequest;
  76. use AlibabaCloud\SDK\Dysmsapi\V20170525\Models\SendBatchSmsResponse;
  77. use AlibabaCloud\SDK\Dysmsapi\V20170525\Models\SendCardSmsRequest;
  78. use AlibabaCloud\SDK\Dysmsapi\V20170525\Models\SendCardSmsResponse;
  79. use AlibabaCloud\SDK\Dysmsapi\V20170525\Models\SendSmsRequest;
  80. use AlibabaCloud\SDK\Dysmsapi\V20170525\Models\SendSmsResponse;
  81. use AlibabaCloud\SDK\Dysmsapi\V20170525\Models\SmsConversionIntlRequest;
  82. use AlibabaCloud\SDK\Dysmsapi\V20170525\Models\SmsConversionIntlResponse;
  83. use AlibabaCloud\SDK\Dysmsapi\V20170525\Models\TagResourcesRequest;
  84. use AlibabaCloud\SDK\Dysmsapi\V20170525\Models\TagResourcesResponse;
  85. use AlibabaCloud\SDK\Dysmsapi\V20170525\Models\UntagResourcesRequest;
  86. use AlibabaCloud\SDK\Dysmsapi\V20170525\Models\UntagResourcesResponse;
  87. use AlibabaCloud\SDK\Dysmsapi\V20170525\Models\UpdateSmsSignRequest;
  88. use AlibabaCloud\SDK\Dysmsapi\V20170525\Models\UpdateSmsSignResponse;
  89. use AlibabaCloud\SDK\Dysmsapi\V20170525\Models\UpdateSmsSignShrinkRequest;
  90. use AlibabaCloud\SDK\Dysmsapi\V20170525\Models\UpdateSmsTemplateRequest;
  91. use AlibabaCloud\SDK\Dysmsapi\V20170525\Models\UpdateSmsTemplateResponse;
  92. use AlibabaCloud\SDK\Dysmsapi\V20170525\Models\UpdateSmsTemplateShrinkRequest;
  93. use AlibabaCloud\Tea\Utils\Utils;
  94. use AlibabaCloud\Tea\Utils\Utils\RuntimeOptions;
  95. use Darabonba\OpenApi\Models\OpenApiRequest;
  96. use Darabonba\OpenApi\Models\Params;
  97. use Darabonba\OpenApi\OpenApiClient;
  98. class Dysmsapi extends OpenApiClient
  99. {
  100. public function __construct($config)
  101. {
  102. parent::__construct($config);
  103. $this->_endpointRule = 'central';
  104. $this->_endpointMap = [
  105. 'ap-southeast-1' => 'dysmsapi.ap-southeast-1.aliyuncs.com',
  106. 'ap-southeast-5' => 'dysmsapi.ap-southeast-5.aliyuncs.com',
  107. 'cn-beijing' => 'dysmsapi-proxy.cn-beijing.aliyuncs.com',
  108. 'cn-hongkong' => 'dysmsapi-xman.cn-hongkong.aliyuncs.com',
  109. 'eu-central-1' => 'dysmsapi.eu-central-1.aliyuncs.com',
  110. 'us-east-1' => 'dysmsapi.us-east-1.aliyuncs.com',
  111. ];
  112. $this->checkConfig($config);
  113. $this->_endpoint = $this->getEndpoint('dysmsapi', $this->_regionId, $this->_endpointRule, $this->_network, $this->_suffix, $this->_endpointMap, $this->_endpoint);
  114. }
  115. /**
  116. * @param string $productId
  117. * @param string $regionId
  118. * @param string $endpointRule
  119. * @param string $network
  120. * @param string $suffix
  121. * @param string[] $endpointMap
  122. * @param string $endpoint
  123. *
  124. * @return string
  125. */
  126. public function getEndpoint($productId, $regionId, $endpointRule, $network, $suffix, $endpointMap, $endpoint)
  127. {
  128. if (!Utils::empty_($endpoint)) {
  129. return $endpoint;
  130. }
  131. if (!Utils::isUnset($endpointMap) && !Utils::empty_(@$endpointMap[$regionId])) {
  132. return @$endpointMap[$regionId];
  133. }
  134. return Endpoint::getEndpointRules($productId, $regionId, $endpointRule, $network, $suffix);
  135. }
  136. /**
  137. * @summary Creates a short URL.
  138. * *
  139. * @description * Before you call this operation, you must register the primary domain name of the source URL in the Short Message Service (SMS) console. After the domain name is registered, you can call this operation to create a short URL. For more information, see [Domain name registration](https://help.aliyun.com/document_detail/302325.html#title-mau-zdh-hd0).
  140. * * You can create up to 3,000 short URLs within a natural day.
  141. * * After a short URL is generated, a security review is required. Generally, the review takes 10 minutes to 2 hours to complete. Before the security review is passed, the short URL cannot be directly accessed.
  142. * *
  143. * @param AddShortUrlRequest $request AddShortUrlRequest
  144. * @param RuntimeOptions $runtime runtime options for this request RuntimeOptions
  145. *
  146. * @return AddShortUrlResponse AddShortUrlResponse
  147. */
  148. public function addShortUrlWithOptions($request, $runtime)
  149. {
  150. Utils::validateModel($request);
  151. $query = [];
  152. if (!Utils::isUnset($request->ownerId)) {
  153. $query['OwnerId'] = $request->ownerId;
  154. }
  155. if (!Utils::isUnset($request->resourceOwnerAccount)) {
  156. $query['ResourceOwnerAccount'] = $request->resourceOwnerAccount;
  157. }
  158. if (!Utils::isUnset($request->resourceOwnerId)) {
  159. $query['ResourceOwnerId'] = $request->resourceOwnerId;
  160. }
  161. $body = [];
  162. if (!Utils::isUnset($request->effectiveDays)) {
  163. $body['EffectiveDays'] = $request->effectiveDays;
  164. }
  165. if (!Utils::isUnset($request->shortUrlName)) {
  166. $body['ShortUrlName'] = $request->shortUrlName;
  167. }
  168. if (!Utils::isUnset($request->sourceUrl)) {
  169. $body['SourceUrl'] = $request->sourceUrl;
  170. }
  171. $req = new OpenApiRequest([
  172. 'query' => OpenApiUtilClient::query($query),
  173. 'body' => OpenApiUtilClient::parseToMap($body),
  174. ]);
  175. $params = new Params([
  176. 'action' => 'AddShortUrl',
  177. 'version' => '2017-05-25',
  178. 'protocol' => 'HTTPS',
  179. 'pathname' => '/',
  180. 'method' => 'POST',
  181. 'authType' => 'AK',
  182. 'style' => 'RPC',
  183. 'reqBodyType' => 'formData',
  184. 'bodyType' => 'json',
  185. ]);
  186. return AddShortUrlResponse::fromMap($this->callApi($params, $req, $runtime));
  187. }
  188. /**
  189. * @summary Creates a short URL.
  190. * *
  191. * @description * Before you call this operation, you must register the primary domain name of the source URL in the Short Message Service (SMS) console. After the domain name is registered, you can call this operation to create a short URL. For more information, see [Domain name registration](https://help.aliyun.com/document_detail/302325.html#title-mau-zdh-hd0).
  192. * * You can create up to 3,000 short URLs within a natural day.
  193. * * After a short URL is generated, a security review is required. Generally, the review takes 10 minutes to 2 hours to complete. Before the security review is passed, the short URL cannot be directly accessed.
  194. * *
  195. * @param AddShortUrlRequest $request AddShortUrlRequest
  196. *
  197. * @return AddShortUrlResponse AddShortUrlResponse
  198. */
  199. public function addShortUrl($request)
  200. {
  201. $runtime = new RuntimeOptions([]);
  202. return $this->addShortUrlWithOptions($request, $runtime);
  203. }
  204. /**
  205. * @summary Creates a signature.
  206. * *
  207. * @description You can call the AddSmsSign operation or use the [Short Message Service (SMS) console](https://dysms.console.aliyun.com/dysms.htm#/overview) to create an SMS signature. The signature must comply with the [SMS signature specifications](https://help.aliyun.com/document_detail/108076.html). You can call the QuerySmsSign operation or use the SMS console to query the review status of the signature.
  208. * For more information, see [Usage notes](https://help.aliyun.com/document_detail/55324.html).
  209. * ### QPS limit
  210. * You can call this operation only once per second. If the number of calls per second exceeds the limit, throttling is triggered. As a result, your business may be affected. We recommend that you take note of the limit when you call this operation.
  211. * >
  212. * * You cannot cancel the review of a signature.
  213. * * Individual users can create only one verification code signature, and can create only one general-purpose signature within a natural day. If you need to apply for multiple signatures, we recommend that you upgrade your account to an enterprise user.
  214. * * If you need to use the same signature for messages sent to recipients both in and outside the Chinese mainland, the signature must be a general-purpose signature.
  215. * * If you apply for a signature or message template, you must specify the signature scenario or template type. You must also provide the information of your services, such as a website URL, a domain name with an ICP filing, an application download URL, or the name of your WeChat official account or mini program. For sign-in scenarios, you must also provide an account and password for tests. A detailed description can improve the review efficiency of signatures and templates.
  216. * * An SMS signature must undergo a thorough review process before it can be approved for use.
  217. * *
  218. * @param AddSmsSignRequest $request AddSmsSignRequest
  219. * @param RuntimeOptions $runtime runtime options for this request RuntimeOptions
  220. *
  221. * @return AddSmsSignResponse AddSmsSignResponse
  222. */
  223. public function addSmsSignWithOptions($request, $runtime)
  224. {
  225. Utils::validateModel($request);
  226. $query = [];
  227. if (!Utils::isUnset($request->ownerId)) {
  228. $query['OwnerId'] = $request->ownerId;
  229. }
  230. if (!Utils::isUnset($request->remark)) {
  231. $query['Remark'] = $request->remark;
  232. }
  233. if (!Utils::isUnset($request->resourceOwnerAccount)) {
  234. $query['ResourceOwnerAccount'] = $request->resourceOwnerAccount;
  235. }
  236. if (!Utils::isUnset($request->resourceOwnerId)) {
  237. $query['ResourceOwnerId'] = $request->resourceOwnerId;
  238. }
  239. if (!Utils::isUnset($request->signName)) {
  240. $query['SignName'] = $request->signName;
  241. }
  242. if (!Utils::isUnset($request->signSource)) {
  243. $query['SignSource'] = $request->signSource;
  244. }
  245. if (!Utils::isUnset($request->signType)) {
  246. $query['SignType'] = $request->signType;
  247. }
  248. $body = [];
  249. if (!Utils::isUnset($request->signFileList)) {
  250. $body['SignFileList'] = $request->signFileList;
  251. }
  252. $req = new OpenApiRequest([
  253. 'query' => OpenApiUtilClient::query($query),
  254. 'body' => OpenApiUtilClient::parseToMap($body),
  255. ]);
  256. $params = new Params([
  257. 'action' => 'AddSmsSign',
  258. 'version' => '2017-05-25',
  259. 'protocol' => 'HTTPS',
  260. 'pathname' => '/',
  261. 'method' => 'POST',
  262. 'authType' => 'AK',
  263. 'style' => 'RPC',
  264. 'reqBodyType' => 'formData',
  265. 'bodyType' => 'json',
  266. ]);
  267. return AddSmsSignResponse::fromMap($this->callApi($params, $req, $runtime));
  268. }
  269. /**
  270. * @summary Creates a signature.
  271. * *
  272. * @description You can call the AddSmsSign operation or use the [Short Message Service (SMS) console](https://dysms.console.aliyun.com/dysms.htm#/overview) to create an SMS signature. The signature must comply with the [SMS signature specifications](https://help.aliyun.com/document_detail/108076.html). You can call the QuerySmsSign operation or use the SMS console to query the review status of the signature.
  273. * For more information, see [Usage notes](https://help.aliyun.com/document_detail/55324.html).
  274. * ### QPS limit
  275. * You can call this operation only once per second. If the number of calls per second exceeds the limit, throttling is triggered. As a result, your business may be affected. We recommend that you take note of the limit when you call this operation.
  276. * >
  277. * * You cannot cancel the review of a signature.
  278. * * Individual users can create only one verification code signature, and can create only one general-purpose signature within a natural day. If you need to apply for multiple signatures, we recommend that you upgrade your account to an enterprise user.
  279. * * If you need to use the same signature for messages sent to recipients both in and outside the Chinese mainland, the signature must be a general-purpose signature.
  280. * * If you apply for a signature or message template, you must specify the signature scenario or template type. You must also provide the information of your services, such as a website URL, a domain name with an ICP filing, an application download URL, or the name of your WeChat official account or mini program. For sign-in scenarios, you must also provide an account and password for tests. A detailed description can improve the review efficiency of signatures and templates.
  281. * * An SMS signature must undergo a thorough review process before it can be approved for use.
  282. * *
  283. * @param AddSmsSignRequest $request AddSmsSignRequest
  284. *
  285. * @return AddSmsSignResponse AddSmsSignResponse
  286. */
  287. public function addSmsSign($request)
  288. {
  289. $runtime = new RuntimeOptions([]);
  290. return $this->addSmsSignWithOptions($request, $runtime);
  291. }
  292. /**
  293. * @summary Creates a message template.
  294. * *
  295. * @description You can call the operation or use the [Alibaba Cloud SMS console](https://dysms.console.aliyun.com/dysms.htm#/overview) to apply for a message template. The template must comply with the [message template specifications](https://help.aliyun.com/document_detail/108253.html). You can call the [QuerySmsTemplate](https://help.aliyun.com/document_detail/419289.html) operation or use the Alibaba Cloud SMS console to check whether the message template is approved.
  296. * >
  297. * * Message templates pending approval can be withdrawn. You can withdraw a message template pending approval on the Message Templates tab in the [Alibaba Cloud SMS console](https://dysms.console.aliyun.com/dysms.htm#/overview).
  298. * * Message templates that have been approved can be deleted, and cannot be modified. You can delete a message template pending approval on the Message Templates tab in the [Alibaba Cloud SMS console](https://dysms.console.aliyun.com/dysms.htm#/overview).
  299. * * If you call the AddSmsTemplate operation, you can apply for a maximum of 100 message templates in a calendar day. After you apply for a message template, we recommend that you wait for at least 30 seconds before you apply for another one. If you use the Alibaba Cloud SMS console, you can apply for an unlimited number of message templates.
  300. * * Messages sent to the Chinese mainland and messages sent to countries or regions outside the Chinese mainland use separate message templates. Create message templates based on your needs.
  301. * * If you apply for a signature or message template, you must specify the signature scenario or template type. You must also provide the information of your services, such as a website URL, a domain name with an ICP filing, an application download URL, or the name of your WeChat official account or mini program. For sign-in scenarios, you must also provide an account and password for tests. A detailed description can improve the review efficiency of signatures and templates.
  302. * * A signature must undergo a thorough review process before it can be approved for use. For more information, see [Usage notes](https://help.aliyun.com/document_detail/55324.html).
  303. * ### QPS limits
  304. * You can call this operation up to 1,000 times per second per account. If the number of calls per second exceeds the limit, throttling is triggered. As a result, your business may be affected. We recommend that you take note of the limit when you call this operation.
  305. * *
  306. * @param AddSmsTemplateRequest $request AddSmsTemplateRequest
  307. * @param RuntimeOptions $runtime runtime options for this request RuntimeOptions
  308. *
  309. * @return AddSmsTemplateResponse AddSmsTemplateResponse
  310. */
  311. public function addSmsTemplateWithOptions($request, $runtime)
  312. {
  313. Utils::validateModel($request);
  314. $query = [];
  315. if (!Utils::isUnset($request->ownerId)) {
  316. $query['OwnerId'] = $request->ownerId;
  317. }
  318. if (!Utils::isUnset($request->remark)) {
  319. $query['Remark'] = $request->remark;
  320. }
  321. if (!Utils::isUnset($request->resourceOwnerAccount)) {
  322. $query['ResourceOwnerAccount'] = $request->resourceOwnerAccount;
  323. }
  324. if (!Utils::isUnset($request->resourceOwnerId)) {
  325. $query['ResourceOwnerId'] = $request->resourceOwnerId;
  326. }
  327. if (!Utils::isUnset($request->templateContent)) {
  328. $query['TemplateContent'] = $request->templateContent;
  329. }
  330. if (!Utils::isUnset($request->templateName)) {
  331. $query['TemplateName'] = $request->templateName;
  332. }
  333. if (!Utils::isUnset($request->templateType)) {
  334. $query['TemplateType'] = $request->templateType;
  335. }
  336. $req = new OpenApiRequest([
  337. 'query' => OpenApiUtilClient::query($query),
  338. ]);
  339. $params = new Params([
  340. 'action' => 'AddSmsTemplate',
  341. 'version' => '2017-05-25',
  342. 'protocol' => 'HTTPS',
  343. 'pathname' => '/',
  344. 'method' => 'POST',
  345. 'authType' => 'AK',
  346. 'style' => 'RPC',
  347. 'reqBodyType' => 'formData',
  348. 'bodyType' => 'json',
  349. ]);
  350. return AddSmsTemplateResponse::fromMap($this->callApi($params, $req, $runtime));
  351. }
  352. /**
  353. * @summary Creates a message template.
  354. * *
  355. * @description You can call the operation or use the [Alibaba Cloud SMS console](https://dysms.console.aliyun.com/dysms.htm#/overview) to apply for a message template. The template must comply with the [message template specifications](https://help.aliyun.com/document_detail/108253.html). You can call the [QuerySmsTemplate](https://help.aliyun.com/document_detail/419289.html) operation or use the Alibaba Cloud SMS console to check whether the message template is approved.
  356. * >
  357. * * Message templates pending approval can be withdrawn. You can withdraw a message template pending approval on the Message Templates tab in the [Alibaba Cloud SMS console](https://dysms.console.aliyun.com/dysms.htm#/overview).
  358. * * Message templates that have been approved can be deleted, and cannot be modified. You can delete a message template pending approval on the Message Templates tab in the [Alibaba Cloud SMS console](https://dysms.console.aliyun.com/dysms.htm#/overview).
  359. * * If you call the AddSmsTemplate operation, you can apply for a maximum of 100 message templates in a calendar day. After you apply for a message template, we recommend that you wait for at least 30 seconds before you apply for another one. If you use the Alibaba Cloud SMS console, you can apply for an unlimited number of message templates.
  360. * * Messages sent to the Chinese mainland and messages sent to countries or regions outside the Chinese mainland use separate message templates. Create message templates based on your needs.
  361. * * If you apply for a signature or message template, you must specify the signature scenario or template type. You must also provide the information of your services, such as a website URL, a domain name with an ICP filing, an application download URL, or the name of your WeChat official account or mini program. For sign-in scenarios, you must also provide an account and password for tests. A detailed description can improve the review efficiency of signatures and templates.
  362. * * A signature must undergo a thorough review process before it can be approved for use. For more information, see [Usage notes](https://help.aliyun.com/document_detail/55324.html).
  363. * ### QPS limits
  364. * You can call this operation up to 1,000 times per second per account. If the number of calls per second exceeds the limit, throttling is triggered. As a result, your business may be affected. We recommend that you take note of the limit when you call this operation.
  365. * *
  366. * @param AddSmsTemplateRequest $request AddSmsTemplateRequest
  367. *
  368. * @return AddSmsTemplateResponse AddSmsTemplateResponse
  369. */
  370. public function addSmsTemplate($request)
  371. {
  372. $runtime = new RuntimeOptions([]);
  373. return $this->addSmsTemplateWithOptions($request, $runtime);
  374. }
  375. /**
  376. * @summary Checks whether a mobile phone number can receive card messages.
  377. * *
  378. * @description ### QPS limit
  379. * You can call this operation up to 2,000 times per second per account. If the number of the calls per second exceeds the limit, throttling is triggered. As a result, your business may be affected. We recommend that you take note of the limit when you call this operation.
  380. * *
  381. * @param CheckMobilesCardSupportRequest $request CheckMobilesCardSupportRequest
  382. * @param RuntimeOptions $runtime runtime options for this request RuntimeOptions
  383. *
  384. * @return CheckMobilesCardSupportResponse CheckMobilesCardSupportResponse
  385. */
  386. public function checkMobilesCardSupportWithOptions($request, $runtime)
  387. {
  388. Utils::validateModel($request);
  389. $query = [];
  390. if (!Utils::isUnset($request->mobiles)) {
  391. $query['Mobiles'] = $request->mobiles;
  392. }
  393. if (!Utils::isUnset($request->templateCode)) {
  394. $query['TemplateCode'] = $request->templateCode;
  395. }
  396. $req = new OpenApiRequest([
  397. 'query' => OpenApiUtilClient::query($query),
  398. ]);
  399. $params = new Params([
  400. 'action' => 'CheckMobilesCardSupport',
  401. 'version' => '2017-05-25',
  402. 'protocol' => 'HTTPS',
  403. 'pathname' => '/',
  404. 'method' => 'POST',
  405. 'authType' => 'AK',
  406. 'style' => 'RPC',
  407. 'reqBodyType' => 'formData',
  408. 'bodyType' => 'json',
  409. ]);
  410. return CheckMobilesCardSupportResponse::fromMap($this->callApi($params, $req, $runtime));
  411. }
  412. /**
  413. * @summary Checks whether a mobile phone number can receive card messages.
  414. * *
  415. * @description ### QPS limit
  416. * You can call this operation up to 2,000 times per second per account. If the number of the calls per second exceeds the limit, throttling is triggered. As a result, your business may be affected. We recommend that you take note of the limit when you call this operation.
  417. * *
  418. * @param CheckMobilesCardSupportRequest $request CheckMobilesCardSupportRequest
  419. *
  420. * @return CheckMobilesCardSupportResponse CheckMobilesCardSupportResponse
  421. */
  422. public function checkMobilesCardSupport($request)
  423. {
  424. $runtime = new RuntimeOptions([]);
  425. return $this->checkMobilesCardSupportWithOptions($request, $runtime);
  426. }
  427. /**
  428. * @summary Sends conversion rate information to Alibaba Cloud SMS.
  429. * *
  430. * @param ConversionDataIntlRequest $request ConversionDataIntlRequest
  431. * @param RuntimeOptions $runtime runtime options for this request RuntimeOptions
  432. *
  433. * @return ConversionDataIntlResponse ConversionDataIntlResponse
  434. */
  435. public function conversionDataIntlWithOptions($request, $runtime)
  436. {
  437. Utils::validateModel($request);
  438. $query = [];
  439. if (!Utils::isUnset($request->conversionRate)) {
  440. $query['ConversionRate'] = $request->conversionRate;
  441. }
  442. if (!Utils::isUnset($request->ownerId)) {
  443. $query['OwnerId'] = $request->ownerId;
  444. }
  445. if (!Utils::isUnset($request->reportTime)) {
  446. $query['ReportTime'] = $request->reportTime;
  447. }
  448. if (!Utils::isUnset($request->resourceOwnerAccount)) {
  449. $query['ResourceOwnerAccount'] = $request->resourceOwnerAccount;
  450. }
  451. if (!Utils::isUnset($request->resourceOwnerId)) {
  452. $query['ResourceOwnerId'] = $request->resourceOwnerId;
  453. }
  454. $req = new OpenApiRequest([
  455. 'query' => OpenApiUtilClient::query($query),
  456. ]);
  457. $params = new Params([
  458. 'action' => 'ConversionDataIntl',
  459. 'version' => '2017-05-25',
  460. 'protocol' => 'HTTPS',
  461. 'pathname' => '/',
  462. 'method' => 'POST',
  463. 'authType' => 'AK',
  464. 'style' => 'RPC',
  465. 'reqBodyType' => 'formData',
  466. 'bodyType' => 'json',
  467. ]);
  468. return ConversionDataIntlResponse::fromMap($this->callApi($params, $req, $runtime));
  469. }
  470. /**
  471. * @summary Sends conversion rate information to Alibaba Cloud SMS.
  472. * *
  473. * @param ConversionDataIntlRequest $request ConversionDataIntlRequest
  474. *
  475. * @return ConversionDataIntlResponse ConversionDataIntlResponse
  476. */
  477. public function conversionDataIntl($request)
  478. {
  479. $runtime = new RuntimeOptions([]);
  480. return $this->conversionDataIntlWithOptions($request, $runtime);
  481. }
  482. /**
  483. * @summary Creates a card message template.
  484. * *
  485. * @description * The CreateCardSmsTemplate operation saves the card message template information, submits it to the mobile phone manufacturer for approval, and returns the message template ID.
  486. * * If the type of the message template is not supported or events that are not supported by the mobile phone manufacturer are specified, the template is not submitted. For more information, see [Supported message templates](https://help.aliyun.com/document_detail/434611.html).
  487. * * For information about sample card message templates, see [Sample card message templates](https://help.aliyun.com/document_detail/435361.html).
  488. * ### QPS limit
  489. * You can call this operation up to 300 times per second per account. If the number of the calls per second exceeds the limit, throttling is triggered. As a result, your business may be affected. We recommend that you take note of the limit when you call this operation.
  490. * *
  491. * @param CreateCardSmsTemplateRequest $tmpReq CreateCardSmsTemplateRequest
  492. * @param RuntimeOptions $runtime runtime options for this request RuntimeOptions
  493. *
  494. * @return CreateCardSmsTemplateResponse CreateCardSmsTemplateResponse
  495. */
  496. public function createCardSmsTemplateWithOptions($tmpReq, $runtime)
  497. {
  498. Utils::validateModel($tmpReq);
  499. $request = new CreateCardSmsTemplateShrinkRequest([]);
  500. OpenApiUtilClient::convert($tmpReq, $request);
  501. if (!Utils::isUnset($tmpReq->template)) {
  502. $request->templateShrink = OpenApiUtilClient::arrayToStringWithSpecifiedStyle($tmpReq->template, 'Template', 'json');
  503. }
  504. $query = [];
  505. if (!Utils::isUnset($request->factorys)) {
  506. $query['Factorys'] = $request->factorys;
  507. }
  508. if (!Utils::isUnset($request->memo)) {
  509. $query['Memo'] = $request->memo;
  510. }
  511. if (!Utils::isUnset($request->templateShrink)) {
  512. $query['Template'] = $request->templateShrink;
  513. }
  514. if (!Utils::isUnset($request->templateName)) {
  515. $query['TemplateName'] = $request->templateName;
  516. }
  517. $req = new OpenApiRequest([
  518. 'query' => OpenApiUtilClient::query($query),
  519. ]);
  520. $params = new Params([
  521. 'action' => 'CreateCardSmsTemplate',
  522. 'version' => '2017-05-25',
  523. 'protocol' => 'HTTPS',
  524. 'pathname' => '/',
  525. 'method' => 'POST',
  526. 'authType' => 'AK',
  527. 'style' => 'RPC',
  528. 'reqBodyType' => 'formData',
  529. 'bodyType' => 'json',
  530. ]);
  531. return CreateCardSmsTemplateResponse::fromMap($this->callApi($params, $req, $runtime));
  532. }
  533. /**
  534. * @summary Creates a card message template.
  535. * *
  536. * @description * The CreateCardSmsTemplate operation saves the card message template information, submits it to the mobile phone manufacturer for approval, and returns the message template ID.
  537. * * If the type of the message template is not supported or events that are not supported by the mobile phone manufacturer are specified, the template is not submitted. For more information, see [Supported message templates](https://help.aliyun.com/document_detail/434611.html).
  538. * * For information about sample card message templates, see [Sample card message templates](https://help.aliyun.com/document_detail/435361.html).
  539. * ### QPS limit
  540. * You can call this operation up to 300 times per second per account. If the number of the calls per second exceeds the limit, throttling is triggered. As a result, your business may be affected. We recommend that you take note of the limit when you call this operation.
  541. * *
  542. * @param CreateCardSmsTemplateRequest $request CreateCardSmsTemplateRequest
  543. *
  544. * @return CreateCardSmsTemplateResponse CreateCardSmsTemplateResponse
  545. */
  546. public function createCardSmsTemplate($request)
  547. {
  548. $runtime = new RuntimeOptions([]);
  549. return $this->createCardSmsTemplateWithOptions($request, $runtime);
  550. }
  551. /**
  552. * @summary 创建短链
  553. * *
  554. * @param CreateSmartShortUrlRequest $request CreateSmartShortUrlRequest
  555. * @param RuntimeOptions $runtime runtime options for this request RuntimeOptions
  556. *
  557. * @return CreateSmartShortUrlResponse CreateSmartShortUrlResponse
  558. */
  559. public function createSmartShortUrlWithOptions($request, $runtime)
  560. {
  561. Utils::validateModel($request);
  562. $query = [];
  563. if (!Utils::isUnset($request->outId)) {
  564. $query['OutId'] = $request->outId;
  565. }
  566. if (!Utils::isUnset($request->ownerId)) {
  567. $query['OwnerId'] = $request->ownerId;
  568. }
  569. if (!Utils::isUnset($request->phoneNumbers)) {
  570. $query['PhoneNumbers'] = $request->phoneNumbers;
  571. }
  572. if (!Utils::isUnset($request->resourceOwnerAccount)) {
  573. $query['ResourceOwnerAccount'] = $request->resourceOwnerAccount;
  574. }
  575. if (!Utils::isUnset($request->resourceOwnerId)) {
  576. $query['ResourceOwnerId'] = $request->resourceOwnerId;
  577. }
  578. if (!Utils::isUnset($request->sourceUrl)) {
  579. $query['SourceUrl'] = $request->sourceUrl;
  580. }
  581. $req = new OpenApiRequest([
  582. 'query' => OpenApiUtilClient::query($query),
  583. ]);
  584. $params = new Params([
  585. 'action' => 'CreateSmartShortUrl',
  586. 'version' => '2017-05-25',
  587. 'protocol' => 'HTTPS',
  588. 'pathname' => '/',
  589. 'method' => 'POST',
  590. 'authType' => 'AK',
  591. 'style' => 'RPC',
  592. 'reqBodyType' => 'formData',
  593. 'bodyType' => 'json',
  594. ]);
  595. return CreateSmartShortUrlResponse::fromMap($this->callApi($params, $req, $runtime));
  596. }
  597. /**
  598. * @summary 创建短链
  599. * *
  600. * @param CreateSmartShortUrlRequest $request CreateSmartShortUrlRequest
  601. *
  602. * @return CreateSmartShortUrlResponse CreateSmartShortUrlResponse
  603. */
  604. public function createSmartShortUrl($request)
  605. {
  606. $runtime = new RuntimeOptions([]);
  607. return $this->createSmartShortUrlWithOptions($request, $runtime);
  608. }
  609. /**
  610. * @summary 创建短信签名
  611. * *
  612. * @param CreateSmsSignRequest $tmpReq CreateSmsSignRequest
  613. * @param RuntimeOptions $runtime runtime options for this request RuntimeOptions
  614. *
  615. * @return CreateSmsSignResponse CreateSmsSignResponse
  616. */
  617. public function createSmsSignWithOptions($tmpReq, $runtime)
  618. {
  619. Utils::validateModel($tmpReq);
  620. $request = new CreateSmsSignShrinkRequest([]);
  621. OpenApiUtilClient::convert($tmpReq, $request);
  622. if (!Utils::isUnset($tmpReq->moreData)) {
  623. $request->moreDataShrink = OpenApiUtilClient::arrayToStringWithSpecifiedStyle($tmpReq->moreData, 'MoreData', 'json');
  624. }
  625. $query = [];
  626. if (!Utils::isUnset($request->applySceneContent)) {
  627. $query['ApplySceneContent'] = $request->applySceneContent;
  628. }
  629. if (!Utils::isUnset($request->moreDataShrink)) {
  630. $query['MoreData'] = $request->moreDataShrink;
  631. }
  632. if (!Utils::isUnset($request->ownerId)) {
  633. $query['OwnerId'] = $request->ownerId;
  634. }
  635. if (!Utils::isUnset($request->qualificationId)) {
  636. $query['QualificationId'] = $request->qualificationId;
  637. }
  638. if (!Utils::isUnset($request->remark)) {
  639. $query['Remark'] = $request->remark;
  640. }
  641. if (!Utils::isUnset($request->resourceOwnerAccount)) {
  642. $query['ResourceOwnerAccount'] = $request->resourceOwnerAccount;
  643. }
  644. if (!Utils::isUnset($request->resourceOwnerId)) {
  645. $query['ResourceOwnerId'] = $request->resourceOwnerId;
  646. }
  647. if (!Utils::isUnset($request->signName)) {
  648. $query['SignName'] = $request->signName;
  649. }
  650. if (!Utils::isUnset($request->signSource)) {
  651. $query['SignSource'] = $request->signSource;
  652. }
  653. if (!Utils::isUnset($request->signType)) {
  654. $query['SignType'] = $request->signType;
  655. }
  656. if (!Utils::isUnset($request->thirdParty)) {
  657. $query['ThirdParty'] = $request->thirdParty;
  658. }
  659. $req = new OpenApiRequest([
  660. 'query' => OpenApiUtilClient::query($query),
  661. ]);
  662. $params = new Params([
  663. 'action' => 'CreateSmsSign',
  664. 'version' => '2017-05-25',
  665. 'protocol' => 'HTTPS',
  666. 'pathname' => '/',
  667. 'method' => 'POST',
  668. 'authType' => 'AK',
  669. 'style' => 'RPC',
  670. 'reqBodyType' => 'formData',
  671. 'bodyType' => 'json',
  672. ]);
  673. return CreateSmsSignResponse::fromMap($this->callApi($params, $req, $runtime));
  674. }
  675. /**
  676. * @summary 创建短信签名
  677. * *
  678. * @param CreateSmsSignRequest $request CreateSmsSignRequest
  679. *
  680. * @return CreateSmsSignResponse CreateSmsSignResponse
  681. */
  682. public function createSmsSign($request)
  683. {
  684. $runtime = new RuntimeOptions([]);
  685. return $this->createSmsSignWithOptions($request, $runtime);
  686. }
  687. /**
  688. * @summary 创建短信模板
  689. * *
  690. * @param CreateSmsTemplateRequest $tmpReq CreateSmsTemplateRequest
  691. * @param RuntimeOptions $runtime runtime options for this request RuntimeOptions
  692. *
  693. * @return CreateSmsTemplateResponse CreateSmsTemplateResponse
  694. */
  695. public function createSmsTemplateWithOptions($tmpReq, $runtime)
  696. {
  697. Utils::validateModel($tmpReq);
  698. $request = new CreateSmsTemplateShrinkRequest([]);
  699. OpenApiUtilClient::convert($tmpReq, $request);
  700. if (!Utils::isUnset($tmpReq->moreData)) {
  701. $request->moreDataShrink = OpenApiUtilClient::arrayToStringWithSpecifiedStyle($tmpReq->moreData, 'MoreData', 'json');
  702. }
  703. $query = [];
  704. if (!Utils::isUnset($request->applySceneContent)) {
  705. $query['ApplySceneContent'] = $request->applySceneContent;
  706. }
  707. if (!Utils::isUnset($request->intlType)) {
  708. $query['IntlType'] = $request->intlType;
  709. }
  710. if (!Utils::isUnset($request->moreDataShrink)) {
  711. $query['MoreData'] = $request->moreDataShrink;
  712. }
  713. if (!Utils::isUnset($request->ownerId)) {
  714. $query['OwnerId'] = $request->ownerId;
  715. }
  716. if (!Utils::isUnset($request->relatedSignName)) {
  717. $query['RelatedSignName'] = $request->relatedSignName;
  718. }
  719. if (!Utils::isUnset($request->remark)) {
  720. $query['Remark'] = $request->remark;
  721. }
  722. if (!Utils::isUnset($request->resourceOwnerAccount)) {
  723. $query['ResourceOwnerAccount'] = $request->resourceOwnerAccount;
  724. }
  725. if (!Utils::isUnset($request->resourceOwnerId)) {
  726. $query['ResourceOwnerId'] = $request->resourceOwnerId;
  727. }
  728. if (!Utils::isUnset($request->templateContent)) {
  729. $query['TemplateContent'] = $request->templateContent;
  730. }
  731. if (!Utils::isUnset($request->templateName)) {
  732. $query['TemplateName'] = $request->templateName;
  733. }
  734. if (!Utils::isUnset($request->templateRule)) {
  735. $query['TemplateRule'] = $request->templateRule;
  736. }
  737. if (!Utils::isUnset($request->templateType)) {
  738. $query['TemplateType'] = $request->templateType;
  739. }
  740. $req = new OpenApiRequest([
  741. 'query' => OpenApiUtilClient::query($query),
  742. ]);
  743. $params = new Params([
  744. 'action' => 'CreateSmsTemplate',
  745. 'version' => '2017-05-25',
  746. 'protocol' => 'HTTPS',
  747. 'pathname' => '/',
  748. 'method' => 'POST',
  749. 'authType' => 'AK',
  750. 'style' => 'RPC',
  751. 'reqBodyType' => 'formData',
  752. 'bodyType' => 'json',
  753. ]);
  754. return CreateSmsTemplateResponse::fromMap($this->callApi($params, $req, $runtime));
  755. }
  756. /**
  757. * @summary 创建短信模板
  758. * *
  759. * @param CreateSmsTemplateRequest $request CreateSmsTemplateRequest
  760. *
  761. * @return CreateSmsTemplateResponse CreateSmsTemplateResponse
  762. */
  763. public function createSmsTemplate($request)
  764. {
  765. $runtime = new RuntimeOptions([]);
  766. return $this->createSmsTemplateWithOptions($request, $runtime);
  767. }
  768. /**
  769. * @summary Deletes a short URL. After you delete a short URL, it cannot be changed to its original state.
  770. * *
  771. * @description ### QPS limits
  772. * You can call this operation up to 100 times per second per account. If the number of the calls per second exceeds the limit, throttling is triggered. As a result, your business may be affected. We recommend that you take note of the limit when you call this operation.
  773. * *
  774. * @param DeleteShortUrlRequest $request DeleteShortUrlRequest
  775. * @param RuntimeOptions $runtime runtime options for this request RuntimeOptions
  776. *
  777. * @return DeleteShortUrlResponse DeleteShortUrlResponse
  778. */
  779. public function deleteShortUrlWithOptions($request, $runtime)
  780. {
  781. Utils::validateModel($request);
  782. $query = [];
  783. if (!Utils::isUnset($request->ownerId)) {
  784. $query['OwnerId'] = $request->ownerId;
  785. }
  786. if (!Utils::isUnset($request->resourceOwnerAccount)) {
  787. $query['ResourceOwnerAccount'] = $request->resourceOwnerAccount;
  788. }
  789. if (!Utils::isUnset($request->resourceOwnerId)) {
  790. $query['ResourceOwnerId'] = $request->resourceOwnerId;
  791. }
  792. $body = [];
  793. if (!Utils::isUnset($request->sourceUrl)) {
  794. $body['SourceUrl'] = $request->sourceUrl;
  795. }
  796. $req = new OpenApiRequest([
  797. 'query' => OpenApiUtilClient::query($query),
  798. 'body' => OpenApiUtilClient::parseToMap($body),
  799. ]);
  800. $params = new Params([
  801. 'action' => 'DeleteShortUrl',
  802. 'version' => '2017-05-25',
  803. 'protocol' => 'HTTPS',
  804. 'pathname' => '/',
  805. 'method' => 'POST',
  806. 'authType' => 'AK',
  807. 'style' => 'RPC',
  808. 'reqBodyType' => 'formData',
  809. 'bodyType' => 'json',
  810. ]);
  811. return DeleteShortUrlResponse::fromMap($this->callApi($params, $req, $runtime));
  812. }
  813. /**
  814. * @summary Deletes a short URL. After you delete a short URL, it cannot be changed to its original state.
  815. * *
  816. * @description ### QPS limits
  817. * You can call this operation up to 100 times per second per account. If the number of the calls per second exceeds the limit, throttling is triggered. As a result, your business may be affected. We recommend that you take note of the limit when you call this operation.
  818. * *
  819. * @param DeleteShortUrlRequest $request DeleteShortUrlRequest
  820. *
  821. * @return DeleteShortUrlResponse DeleteShortUrlResponse
  822. */
  823. public function deleteShortUrl($request)
  824. {
  825. $runtime = new RuntimeOptions([]);
  826. return $this->deleteShortUrlWithOptions($request, $runtime);
  827. }
  828. /**
  829. * @summary Deletes a signature.
  830. * *
  831. * @description * You cannot delete a signature that has not been approved.
  832. * * After you delete a signature, you cannot recover it. Proceed with caution.
  833. * ### QPS limits
  834. * You can call this operation up to 1,000 times per second per account. If the number of the calls per second exceeds the limit, throttling is triggered. As a result, your business may be affected. We recommend that you take note of the limit when you call this operation.
  835. * *
  836. * @param DeleteSmsSignRequest $request DeleteSmsSignRequest
  837. * @param RuntimeOptions $runtime runtime options for this request RuntimeOptions
  838. *
  839. * @return DeleteSmsSignResponse DeleteSmsSignResponse
  840. */
  841. public function deleteSmsSignWithOptions($request, $runtime)
  842. {
  843. Utils::validateModel($request);
  844. $query = [];
  845. if (!Utils::isUnset($request->ownerId)) {
  846. $query['OwnerId'] = $request->ownerId;
  847. }
  848. if (!Utils::isUnset($request->resourceOwnerAccount)) {
  849. $query['ResourceOwnerAccount'] = $request->resourceOwnerAccount;
  850. }
  851. if (!Utils::isUnset($request->resourceOwnerId)) {
  852. $query['ResourceOwnerId'] = $request->resourceOwnerId;
  853. }
  854. if (!Utils::isUnset($request->signName)) {
  855. $query['SignName'] = $request->signName;
  856. }
  857. $req = new OpenApiRequest([
  858. 'query' => OpenApiUtilClient::query($query),
  859. ]);
  860. $params = new Params([
  861. 'action' => 'DeleteSmsSign',
  862. 'version' => '2017-05-25',
  863. 'protocol' => 'HTTPS',
  864. 'pathname' => '/',
  865. 'method' => 'POST',
  866. 'authType' => 'AK',
  867. 'style' => 'RPC',
  868. 'reqBodyType' => 'formData',
  869. 'bodyType' => 'json',
  870. ]);
  871. return DeleteSmsSignResponse::fromMap($this->callApi($params, $req, $runtime));
  872. }
  873. /**
  874. * @summary Deletes a signature.
  875. * *
  876. * @description * You cannot delete a signature that has not been approved.
  877. * * After you delete a signature, you cannot recover it. Proceed with caution.
  878. * ### QPS limits
  879. * You can call this operation up to 1,000 times per second per account. If the number of the calls per second exceeds the limit, throttling is triggered. As a result, your business may be affected. We recommend that you take note of the limit when you call this operation.
  880. * *
  881. * @param DeleteSmsSignRequest $request DeleteSmsSignRequest
  882. *
  883. * @return DeleteSmsSignResponse DeleteSmsSignResponse
  884. */
  885. public function deleteSmsSign($request)
  886. {
  887. $runtime = new RuntimeOptions([]);
  888. return $this->deleteSmsSignWithOptions($request, $runtime);
  889. }
  890. /**
  891. * @summary Deletes a message template.
  892. * *
  893. * @description * Message templates pending approval can be withdrawn. You can delete a message template pending approval on the Message Templates tab in the [Alibaba Cloud SMS console](https://dysms.console.aliyun.com/dysms.htm#/overview).
  894. * * Message templates that have been approved can be deleted, and cannot be modified. You can delete a message template pending approval on the Message Templates tab in the [Alibaba Cloud SMS console](https://dysms.console.aliyun.com/dysms.htm#/overview).
  895. * * You cannot recover deleted message templates. Proceed with caution.
  896. * ### QPS limits
  897. * You can call this operation up to 1,000 times per second per account. If the number of calls per second exceeds the limit, throttling is triggered. As a result, your business may be affected. We recommend that you take note of the limit when you call this operation.
  898. * *
  899. * @param DeleteSmsTemplateRequest $request DeleteSmsTemplateRequest
  900. * @param RuntimeOptions $runtime runtime options for this request RuntimeOptions
  901. *
  902. * @return DeleteSmsTemplateResponse DeleteSmsTemplateResponse
  903. */
  904. public function deleteSmsTemplateWithOptions($request, $runtime)
  905. {
  906. Utils::validateModel($request);
  907. $query = [];
  908. if (!Utils::isUnset($request->ownerId)) {
  909. $query['OwnerId'] = $request->ownerId;
  910. }
  911. if (!Utils::isUnset($request->resourceOwnerAccount)) {
  912. $query['ResourceOwnerAccount'] = $request->resourceOwnerAccount;
  913. }
  914. if (!Utils::isUnset($request->resourceOwnerId)) {
  915. $query['ResourceOwnerId'] = $request->resourceOwnerId;
  916. }
  917. if (!Utils::isUnset($request->templateCode)) {
  918. $query['TemplateCode'] = $request->templateCode;
  919. }
  920. $req = new OpenApiRequest([
  921. 'query' => OpenApiUtilClient::query($query),
  922. ]);
  923. $params = new Params([
  924. 'action' => 'DeleteSmsTemplate',
  925. 'version' => '2017-05-25',
  926. 'protocol' => 'HTTPS',
  927. 'pathname' => '/',
  928. 'method' => 'POST',
  929. 'authType' => 'AK',
  930. 'style' => 'RPC',
  931. 'reqBodyType' => 'formData',
  932. 'bodyType' => 'json',
  933. ]);
  934. return DeleteSmsTemplateResponse::fromMap($this->callApi($params, $req, $runtime));
  935. }
  936. /**
  937. * @summary Deletes a message template.
  938. * *
  939. * @description * Message templates pending approval can be withdrawn. You can delete a message template pending approval on the Message Templates tab in the [Alibaba Cloud SMS console](https://dysms.console.aliyun.com/dysms.htm#/overview).
  940. * * Message templates that have been approved can be deleted, and cannot be modified. You can delete a message template pending approval on the Message Templates tab in the [Alibaba Cloud SMS console](https://dysms.console.aliyun.com/dysms.htm#/overview).
  941. * * You cannot recover deleted message templates. Proceed with caution.
  942. * ### QPS limits
  943. * You can call this operation up to 1,000 times per second per account. If the number of calls per second exceeds the limit, throttling is triggered. As a result, your business may be affected. We recommend that you take note of the limit when you call this operation.
  944. * *
  945. * @param DeleteSmsTemplateRequest $request DeleteSmsTemplateRequest
  946. *
  947. * @return DeleteSmsTemplateResponse DeleteSmsTemplateResponse
  948. */
  949. public function deleteSmsTemplate($request)
  950. {
  951. $runtime = new RuntimeOptions([]);
  952. return $this->deleteSmsTemplateWithOptions($request, $runtime);
  953. }
  954. /**
  955. * @summary Queries the short URLs of a card messages template.
  956. * *
  957. * @description ### QPS limit
  958. * You can call this operation up to 1,000 times per second per account. If the number of the calls per second exceeds the limit, throttling is triggered. As a result, your business may be affected. We recommend that you take note of the limit when you call this operation.
  959. * *
  960. * @param GetCardSmsLinkRequest $request GetCardSmsLinkRequest
  961. * @param RuntimeOptions $runtime runtime options for this request RuntimeOptions
  962. *
  963. * @return GetCardSmsLinkResponse GetCardSmsLinkResponse
  964. */
  965. public function getCardSmsLinkWithOptions($request, $runtime)
  966. {
  967. Utils::validateModel($request);
  968. $query = [];
  969. if (!Utils::isUnset($request->cardCodeType)) {
  970. $query['CardCodeType'] = $request->cardCodeType;
  971. }
  972. if (!Utils::isUnset($request->cardLinkType)) {
  973. $query['CardLinkType'] = $request->cardLinkType;
  974. }
  975. if (!Utils::isUnset($request->cardTemplateCode)) {
  976. $query['CardTemplateCode'] = $request->cardTemplateCode;
  977. }
  978. if (!Utils::isUnset($request->cardTemplateParamJson)) {
  979. $query['CardTemplateParamJson'] = $request->cardTemplateParamJson;
  980. }
  981. if (!Utils::isUnset($request->customShortCodeJson)) {
  982. $query['CustomShortCodeJson'] = $request->customShortCodeJson;
  983. }
  984. if (!Utils::isUnset($request->domain)) {
  985. $query['Domain'] = $request->domain;
  986. }
  987. if (!Utils::isUnset($request->outId)) {
  988. $query['OutId'] = $request->outId;
  989. }
  990. if (!Utils::isUnset($request->phoneNumberJson)) {
  991. $query['PhoneNumberJson'] = $request->phoneNumberJson;
  992. }
  993. if (!Utils::isUnset($request->signNameJson)) {
  994. $query['SignNameJson'] = $request->signNameJson;
  995. }
  996. $req = new OpenApiRequest([
  997. 'query' => OpenApiUtilClient::query($query),
  998. ]);
  999. $params = new Params([
  1000. 'action' => 'GetCardSmsLink',
  1001. 'version' => '2017-05-25',
  1002. 'protocol' => 'HTTPS',
  1003. 'pathname' => '/',
  1004. 'method' => 'POST',
  1005. 'authType' => 'AK',
  1006. 'style' => 'RPC',
  1007. 'reqBodyType' => 'formData',
  1008. 'bodyType' => 'json',
  1009. ]);
  1010. return GetCardSmsLinkResponse::fromMap($this->callApi($params, $req, $runtime));
  1011. }
  1012. /**
  1013. * @summary Queries the short URLs of a card messages template.
  1014. * *
  1015. * @description ### QPS limit
  1016. * You can call this operation up to 1,000 times per second per account. If the number of the calls per second exceeds the limit, throttling is triggered. As a result, your business may be affected. We recommend that you take note of the limit when you call this operation.
  1017. * *
  1018. * @param GetCardSmsLinkRequest $request GetCardSmsLinkRequest
  1019. *
  1020. * @return GetCardSmsLinkResponse GetCardSmsLinkResponse
  1021. */
  1022. public function getCardSmsLink($request)
  1023. {
  1024. $runtime = new RuntimeOptions([]);
  1025. return $this->getCardSmsLinkWithOptions($request, $runtime);
  1026. }
  1027. /**
  1028. * @summary Converts a resource uploaded to the specified Object Storage Service (OSS) bucket for unified management. Then, a resource ID is returned. You can manage the resource based on the ID.
  1029. * *
  1030. * @description ### QPS limit
  1031. * You can call this operation up to 300 times per second per account. If the number of the calls per second exceeds the limit, throttling is triggered. As a result, your business may be affected. We recommend that you take note of the limit when you call this operation.
  1032. * *
  1033. * @param GetMediaResourceIdRequest $request GetMediaResourceIdRequest
  1034. * @param RuntimeOptions $runtime runtime options for this request RuntimeOptions
  1035. *
  1036. * @return GetMediaResourceIdResponse GetMediaResourceIdResponse
  1037. */
  1038. public function getMediaResourceIdWithOptions($request, $runtime)
  1039. {
  1040. Utils::validateModel($request);
  1041. $query = [];
  1042. if (!Utils::isUnset($request->extendInfo)) {
  1043. $query['ExtendInfo'] = $request->extendInfo;
  1044. }
  1045. if (!Utils::isUnset($request->fileSize)) {
  1046. $query['FileSize'] = $request->fileSize;
  1047. }
  1048. if (!Utils::isUnset($request->memo)) {
  1049. $query['Memo'] = $request->memo;
  1050. }
  1051. if (!Utils::isUnset($request->ossKey)) {
  1052. $query['OssKey'] = $request->ossKey;
  1053. }
  1054. if (!Utils::isUnset($request->resourceType)) {
  1055. $query['ResourceType'] = $request->resourceType;
  1056. }
  1057. $req = new OpenApiRequest([
  1058. 'query' => OpenApiUtilClient::query($query),
  1059. ]);
  1060. $params = new Params([
  1061. 'action' => 'GetMediaResourceId',
  1062. 'version' => '2017-05-25',
  1063. 'protocol' => 'HTTPS',
  1064. 'pathname' => '/',
  1065. 'method' => 'POST',
  1066. 'authType' => 'AK',
  1067. 'style' => 'RPC',
  1068. 'reqBodyType' => 'formData',
  1069. 'bodyType' => 'json',
  1070. ]);
  1071. return GetMediaResourceIdResponse::fromMap($this->callApi($params, $req, $runtime));
  1072. }
  1073. /**
  1074. * @summary Converts a resource uploaded to the specified Object Storage Service (OSS) bucket for unified management. Then, a resource ID is returned. You can manage the resource based on the ID.
  1075. * *
  1076. * @description ### QPS limit
  1077. * You can call this operation up to 300 times per second per account. If the number of the calls per second exceeds the limit, throttling is triggered. As a result, your business may be affected. We recommend that you take note of the limit when you call this operation.
  1078. * *
  1079. * @param GetMediaResourceIdRequest $request GetMediaResourceIdRequest
  1080. *
  1081. * @return GetMediaResourceIdResponse GetMediaResourceIdResponse
  1082. */
  1083. public function getMediaResourceId($request)
  1084. {
  1085. $runtime = new RuntimeOptions([]);
  1086. return $this->getMediaResourceIdWithOptions($request, $runtime);
  1087. }
  1088. /**
  1089. * @summary Queries the OSS configuration information about card messages.
  1090. * *
  1091. * @description Resources such as images and videos used for card message templates can be uploaded to Object Storage Service (OSS) buckets for storage. For more information, see [Upload files to OSS](https://help.aliyun.com/document_detail/437303.html).
  1092. * ### QPS limit
  1093. * You can call this operation up to 300 times per second per account. If the number of the calls per second exceeds the limit, throttling is triggered. As a result, your business may be affected. We recommend that you take note of the limit when you call this operation.
  1094. * *
  1095. * @param RuntimeOptions $runtime runtime options for this request RuntimeOptions
  1096. *
  1097. * @return GetOSSInfoForCardTemplateResponse GetOSSInfoForCardTemplateResponse
  1098. */
  1099. public function getOSSInfoForCardTemplateWithOptions($runtime)
  1100. {
  1101. $req = new OpenApiRequest([]);
  1102. $params = new Params([
  1103. 'action' => 'GetOSSInfoForCardTemplate',
  1104. 'version' => '2017-05-25',
  1105. 'protocol' => 'HTTPS',
  1106. 'pathname' => '/',
  1107. 'method' => 'POST',
  1108. 'authType' => 'AK',
  1109. 'style' => 'RPC',
  1110. 'reqBodyType' => 'formData',
  1111. 'bodyType' => 'json',
  1112. ]);
  1113. return GetOSSInfoForCardTemplateResponse::fromMap($this->callApi($params, $req, $runtime));
  1114. }
  1115. /**
  1116. * @summary Queries the OSS configuration information about card messages.
  1117. * *
  1118. * @description Resources such as images and videos used for card message templates can be uploaded to Object Storage Service (OSS) buckets for storage. For more information, see [Upload files to OSS](https://help.aliyun.com/document_detail/437303.html).
  1119. * ### QPS limit
  1120. * You can call this operation up to 300 times per second per account. If the number of the calls per second exceeds the limit, throttling is triggered. As a result, your business may be affected. We recommend that you take note of the limit when you call this operation.
  1121. * *
  1122. * @return GetOSSInfoForCardTemplateResponse GetOSSInfoForCardTemplateResponse
  1123. */
  1124. public function getOSSInfoForCardTemplate()
  1125. {
  1126. $runtime = new RuntimeOptions([]);
  1127. return $this->getOSSInfoForCardTemplateWithOptions($runtime);
  1128. }
  1129. /**
  1130. * @summary 短信上传文件,获取授权信息
  1131. * *
  1132. * @param GetOSSInfoForUploadFileRequest $request GetOSSInfoForUploadFileRequest
  1133. * @param RuntimeOptions $runtime runtime options for this request RuntimeOptions
  1134. *
  1135. * @return GetOSSInfoForUploadFileResponse GetOSSInfoForUploadFileResponse
  1136. */
  1137. public function getOSSInfoForUploadFileWithOptions($request, $runtime)
  1138. {
  1139. Utils::validateModel($request);
  1140. $query = [];
  1141. if (!Utils::isUnset($request->bizType)) {
  1142. $query['BizType'] = $request->bizType;
  1143. }
  1144. if (!Utils::isUnset($request->ownerId)) {
  1145. $query['OwnerId'] = $request->ownerId;
  1146. }
  1147. if (!Utils::isUnset($request->resourceOwnerAccount)) {
  1148. $query['ResourceOwnerAccount'] = $request->resourceOwnerAccount;
  1149. }
  1150. if (!Utils::isUnset($request->resourceOwnerId)) {
  1151. $query['ResourceOwnerId'] = $request->resourceOwnerId;
  1152. }
  1153. $req = new OpenApiRequest([
  1154. 'query' => OpenApiUtilClient::query($query),
  1155. ]);
  1156. $params = new Params([
  1157. 'action' => 'GetOSSInfoForUploadFile',
  1158. 'version' => '2017-05-25',
  1159. 'protocol' => 'HTTPS',
  1160. 'pathname' => '/',
  1161. 'method' => 'POST',
  1162. 'authType' => 'AK',
  1163. 'style' => 'RPC',
  1164. 'reqBodyType' => 'formData',
  1165. 'bodyType' => 'json',
  1166. ]);
  1167. return GetOSSInfoForUploadFileResponse::fromMap($this->callApi($params, $req, $runtime));
  1168. }
  1169. /**
  1170. * @summary 短信上传文件,获取授权信息
  1171. * *
  1172. * @param GetOSSInfoForUploadFileRequest $request GetOSSInfoForUploadFileRequest
  1173. *
  1174. * @return GetOSSInfoForUploadFileResponse GetOSSInfoForUploadFileResponse
  1175. */
  1176. public function getOSSInfoForUploadFile($request)
  1177. {
  1178. $runtime = new RuntimeOptions([]);
  1179. return $this->getOSSInfoForUploadFileWithOptions($request, $runtime);
  1180. }
  1181. /**
  1182. * @summary 查询短信签名详情
  1183. * *
  1184. * @param GetSmsSignRequest $request GetSmsSignRequest
  1185. * @param RuntimeOptions $runtime runtime options for this request RuntimeOptions
  1186. *
  1187. * @return GetSmsSignResponse GetSmsSignResponse
  1188. */
  1189. public function getSmsSignWithOptions($request, $runtime)
  1190. {
  1191. Utils::validateModel($request);
  1192. $query = [];
  1193. if (!Utils::isUnset($request->ownerId)) {
  1194. $query['OwnerId'] = $request->ownerId;
  1195. }
  1196. if (!Utils::isUnset($request->resourceOwnerAccount)) {
  1197. $query['ResourceOwnerAccount'] = $request->resourceOwnerAccount;
  1198. }
  1199. if (!Utils::isUnset($request->resourceOwnerId)) {
  1200. $query['ResourceOwnerId'] = $request->resourceOwnerId;
  1201. }
  1202. if (!Utils::isUnset($request->signName)) {
  1203. $query['SignName'] = $request->signName;
  1204. }
  1205. $req = new OpenApiRequest([
  1206. 'query' => OpenApiUtilClient::query($query),
  1207. ]);
  1208. $params = new Params([
  1209. 'action' => 'GetSmsSign',
  1210. 'version' => '2017-05-25',
  1211. 'protocol' => 'HTTPS',
  1212. 'pathname' => '/',
  1213. 'method' => 'POST',
  1214. 'authType' => 'AK',
  1215. 'style' => 'RPC',
  1216. 'reqBodyType' => 'formData',
  1217. 'bodyType' => 'json',
  1218. ]);
  1219. return GetSmsSignResponse::fromMap($this->callApi($params, $req, $runtime));
  1220. }
  1221. /**
  1222. * @summary 查询短信签名详情
  1223. * *
  1224. * @param GetSmsSignRequest $request GetSmsSignRequest
  1225. *
  1226. * @return GetSmsSignResponse GetSmsSignResponse
  1227. */
  1228. public function getSmsSign($request)
  1229. {
  1230. $runtime = new RuntimeOptions([]);
  1231. return $this->getSmsSignWithOptions($request, $runtime);
  1232. }
  1233. /**
  1234. * @summary 查询文本短信模板详情
  1235. * *
  1236. * @param GetSmsTemplateRequest $request GetSmsTemplateRequest
  1237. * @param RuntimeOptions $runtime runtime options for this request RuntimeOptions
  1238. *
  1239. * @return GetSmsTemplateResponse GetSmsTemplateResponse
  1240. */
  1241. public function getSmsTemplateWithOptions($request, $runtime)
  1242. {
  1243. Utils::validateModel($request);
  1244. $query = [];
  1245. if (!Utils::isUnset($request->ownerId)) {
  1246. $query['OwnerId'] = $request->ownerId;
  1247. }
  1248. if (!Utils::isUnset($request->resourceOwnerAccount)) {
  1249. $query['ResourceOwnerAccount'] = $request->resourceOwnerAccount;
  1250. }
  1251. if (!Utils::isUnset($request->resourceOwnerId)) {
  1252. $query['ResourceOwnerId'] = $request->resourceOwnerId;
  1253. }
  1254. if (!Utils::isUnset($request->templateCode)) {
  1255. $query['TemplateCode'] = $request->templateCode;
  1256. }
  1257. $req = new OpenApiRequest([
  1258. 'query' => OpenApiUtilClient::query($query),
  1259. ]);
  1260. $params = new Params([
  1261. 'action' => 'GetSmsTemplate',
  1262. 'version' => '2017-05-25',
  1263. 'protocol' => 'HTTPS',
  1264. 'pathname' => '/',
  1265. 'method' => 'POST',
  1266. 'authType' => 'AK',
  1267. 'style' => 'RPC',
  1268. 'reqBodyType' => 'formData',
  1269. 'bodyType' => 'json',
  1270. ]);
  1271. return GetSmsTemplateResponse::fromMap($this->callApi($params, $req, $runtime));
  1272. }
  1273. /**
  1274. * @summary 查询文本短信模板详情
  1275. * *
  1276. * @param GetSmsTemplateRequest $request GetSmsTemplateRequest
  1277. *
  1278. * @return GetSmsTemplateResponse GetSmsTemplateResponse
  1279. */
  1280. public function getSmsTemplate($request)
  1281. {
  1282. $runtime = new RuntimeOptions([]);
  1283. return $this->getSmsTemplateWithOptions($request, $runtime);
  1284. }
  1285. /**
  1286. * @summary Queries the tags of a message template.
  1287. * *
  1288. * @description ### QPS limit
  1289. * You can call this operation up to 50 times per second per account. If the number of the calls per second exceeds the limit, throttling is triggered. As a result, your business may be affected. We recommend that you take note of the limit when you call this operation.
  1290. * *
  1291. * @param ListTagResourcesRequest $request ListTagResourcesRequest
  1292. * @param RuntimeOptions $runtime runtime options for this request RuntimeOptions
  1293. *
  1294. * @return ListTagResourcesResponse ListTagResourcesResponse
  1295. */
  1296. public function listTagResourcesWithOptions($request, $runtime)
  1297. {
  1298. Utils::validateModel($request);
  1299. $query = [];
  1300. if (!Utils::isUnset($request->nextToken)) {
  1301. $query['NextToken'] = $request->nextToken;
  1302. }
  1303. if (!Utils::isUnset($request->ownerId)) {
  1304. $query['OwnerId'] = $request->ownerId;
  1305. }
  1306. if (!Utils::isUnset($request->pageSize)) {
  1307. $query['PageSize'] = $request->pageSize;
  1308. }
  1309. if (!Utils::isUnset($request->prodCode)) {
  1310. $query['ProdCode'] = $request->prodCode;
  1311. }
  1312. if (!Utils::isUnset($request->regionId)) {
  1313. $query['RegionId'] = $request->regionId;
  1314. }
  1315. if (!Utils::isUnset($request->resourceId)) {
  1316. $query['ResourceId'] = $request->resourceId;
  1317. }
  1318. if (!Utils::isUnset($request->resourceOwnerAccount)) {
  1319. $query['ResourceOwnerAccount'] = $request->resourceOwnerAccount;
  1320. }
  1321. if (!Utils::isUnset($request->resourceOwnerId)) {
  1322. $query['ResourceOwnerId'] = $request->resourceOwnerId;
  1323. }
  1324. if (!Utils::isUnset($request->resourceType)) {
  1325. $query['ResourceType'] = $request->resourceType;
  1326. }
  1327. if (!Utils::isUnset($request->tag)) {
  1328. $query['Tag'] = $request->tag;
  1329. }
  1330. $req = new OpenApiRequest([
  1331. 'query' => OpenApiUtilClient::query($query),
  1332. ]);
  1333. $params = new Params([
  1334. 'action' => 'ListTagResources',
  1335. 'version' => '2017-05-25',
  1336. 'protocol' => 'HTTPS',
  1337. 'pathname' => '/',
  1338. 'method' => 'POST',
  1339. 'authType' => 'AK',
  1340. 'style' => 'RPC',
  1341. 'reqBodyType' => 'formData',
  1342. 'bodyType' => 'json',
  1343. ]);
  1344. return ListTagResourcesResponse::fromMap($this->callApi($params, $req, $runtime));
  1345. }
  1346. /**
  1347. * @summary Queries the tags of a message template.
  1348. * *
  1349. * @description ### QPS limit
  1350. * You can call this operation up to 50 times per second per account. If the number of the calls per second exceeds the limit, throttling is triggered. As a result, your business may be affected. We recommend that you take note of the limit when you call this operation.
  1351. * *
  1352. * @param ListTagResourcesRequest $request ListTagResourcesRequest
  1353. *
  1354. * @return ListTagResourcesResponse ListTagResourcesResponse
  1355. */
  1356. public function listTagResources($request)
  1357. {
  1358. $runtime = new RuntimeOptions([]);
  1359. return $this->listTagResourcesWithOptions($request, $runtime);
  1360. }
  1361. /**
  1362. * @summary Modifies a rejected signature and submit it for approval. Signatures that are pending approval or have been approved cannot be modified.
  1363. * *
  1364. * @description You can call the operation or use the [Alibaba Cloud SMS console](https://dysms.console.aliyun.com/dysms.htm#/overview) to modify an existing signature and submit the signature for approval. The signature must comply with the [signature specifications](https://help.aliyun.com/document_detail/108076.html).
  1365. * For more information, see [Usage notes](https://help.aliyun.com/document_detail/55324.html).
  1366. * ### QPS limits
  1367. * You can call this operation up to 1,000 times per second per account. If the number of calls per second exceeds the limit, throttling is triggered. As a result, your business may be affected. We recommend that you take note of the limit when you call this operation.
  1368. * >
  1369. * * Signatures pending approval cannot be modified.
  1370. * * You cannot modify a signature after it is approved. If you no longer need the signature, you can delete it.
  1371. * * If you are an individual user, you cannot apply for a new signature on the same day that your signature is rejected or deleted. We recommend that you modify the rejected signature and submit it again.
  1372. * *
  1373. * @param ModifySmsSignRequest $request ModifySmsSignRequest
  1374. * @param RuntimeOptions $runtime runtime options for this request RuntimeOptions
  1375. *
  1376. * @return ModifySmsSignResponse ModifySmsSignResponse
  1377. */
  1378. public function modifySmsSignWithOptions($request, $runtime)
  1379. {
  1380. Utils::validateModel($request);
  1381. $query = [];
  1382. if (!Utils::isUnset($request->ownerId)) {
  1383. $query['OwnerId'] = $request->ownerId;
  1384. }
  1385. if (!Utils::isUnset($request->remark)) {
  1386. $query['Remark'] = $request->remark;
  1387. }
  1388. if (!Utils::isUnset($request->resourceOwnerAccount)) {
  1389. $query['ResourceOwnerAccount'] = $request->resourceOwnerAccount;
  1390. }
  1391. if (!Utils::isUnset($request->resourceOwnerId)) {
  1392. $query['ResourceOwnerId'] = $request->resourceOwnerId;
  1393. }
  1394. if (!Utils::isUnset($request->signName)) {
  1395. $query['SignName'] = $request->signName;
  1396. }
  1397. if (!Utils::isUnset($request->signSource)) {
  1398. $query['SignSource'] = $request->signSource;
  1399. }
  1400. if (!Utils::isUnset($request->signType)) {
  1401. $query['SignType'] = $request->signType;
  1402. }
  1403. $body = [];
  1404. if (!Utils::isUnset($request->signFileList)) {
  1405. $body['SignFileList'] = $request->signFileList;
  1406. }
  1407. $req = new OpenApiRequest([
  1408. 'query' => OpenApiUtilClient::query($query),
  1409. 'body' => OpenApiUtilClient::parseToMap($body),
  1410. ]);
  1411. $params = new Params([
  1412. 'action' => 'ModifySmsSign',
  1413. 'version' => '2017-05-25',
  1414. 'protocol' => 'HTTPS',
  1415. 'pathname' => '/',
  1416. 'method' => 'POST',
  1417. 'authType' => 'AK',
  1418. 'style' => 'RPC',
  1419. 'reqBodyType' => 'formData',
  1420. 'bodyType' => 'json',
  1421. ]);
  1422. return ModifySmsSignResponse::fromMap($this->callApi($params, $req, $runtime));
  1423. }
  1424. /**
  1425. * @summary Modifies a rejected signature and submit it for approval. Signatures that are pending approval or have been approved cannot be modified.
  1426. * *
  1427. * @description You can call the operation or use the [Alibaba Cloud SMS console](https://dysms.console.aliyun.com/dysms.htm#/overview) to modify an existing signature and submit the signature for approval. The signature must comply with the [signature specifications](https://help.aliyun.com/document_detail/108076.html).
  1428. * For more information, see [Usage notes](https://help.aliyun.com/document_detail/55324.html).
  1429. * ### QPS limits
  1430. * You can call this operation up to 1,000 times per second per account. If the number of calls per second exceeds the limit, throttling is triggered. As a result, your business may be affected. We recommend that you take note of the limit when you call this operation.
  1431. * >
  1432. * * Signatures pending approval cannot be modified.
  1433. * * You cannot modify a signature after it is approved. If you no longer need the signature, you can delete it.
  1434. * * If you are an individual user, you cannot apply for a new signature on the same day that your signature is rejected or deleted. We recommend that you modify the rejected signature and submit it again.
  1435. * *
  1436. * @param ModifySmsSignRequest $request ModifySmsSignRequest
  1437. *
  1438. * @return ModifySmsSignResponse ModifySmsSignResponse
  1439. */
  1440. public function modifySmsSign($request)
  1441. {
  1442. $runtime = new RuntimeOptions([]);
  1443. return $this->modifySmsSignWithOptions($request, $runtime);
  1444. }
  1445. /**
  1446. * @summary Modifies the information of an unapproved message template and submits it for review again.
  1447. * *
  1448. * @description After you apply for a message template, if the template fails to pass the review, you can call this operation to modify the template and submit the template again. You can call this operation to modify only a template for a specific message type.
  1449. * The template content must comply with the [SMS template specifications](https://help.aliyun.com/document_detail/108253.html).
  1450. * For more information, see [Usage notes](https://help.aliyun.com/document_detail/55324.html).
  1451. * ### QPS limit
  1452. * You can call this operation up to 1,000 times per second per account. If the number of calls per second exceeds the limit, throttling is triggered. As a result, your business may be affected. We recommend that you take note of the limit when you call this operation.
  1453. * *
  1454. * @param ModifySmsTemplateRequest $request ModifySmsTemplateRequest
  1455. * @param RuntimeOptions $runtime runtime options for this request RuntimeOptions
  1456. *
  1457. * @return ModifySmsTemplateResponse ModifySmsTemplateResponse
  1458. */
  1459. public function modifySmsTemplateWithOptions($request, $runtime)
  1460. {
  1461. Utils::validateModel($request);
  1462. $query = [];
  1463. if (!Utils::isUnset($request->ownerId)) {
  1464. $query['OwnerId'] = $request->ownerId;
  1465. }
  1466. if (!Utils::isUnset($request->remark)) {
  1467. $query['Remark'] = $request->remark;
  1468. }
  1469. if (!Utils::isUnset($request->resourceOwnerAccount)) {
  1470. $query['ResourceOwnerAccount'] = $request->resourceOwnerAccount;
  1471. }
  1472. if (!Utils::isUnset($request->resourceOwnerId)) {
  1473. $query['ResourceOwnerId'] = $request->resourceOwnerId;
  1474. }
  1475. if (!Utils::isUnset($request->templateCode)) {
  1476. $query['TemplateCode'] = $request->templateCode;
  1477. }
  1478. if (!Utils::isUnset($request->templateContent)) {
  1479. $query['TemplateContent'] = $request->templateContent;
  1480. }
  1481. if (!Utils::isUnset($request->templateName)) {
  1482. $query['TemplateName'] = $request->templateName;
  1483. }
  1484. if (!Utils::isUnset($request->templateType)) {
  1485. $query['TemplateType'] = $request->templateType;
  1486. }
  1487. $req = new OpenApiRequest([
  1488. 'query' => OpenApiUtilClient::query($query),
  1489. ]);
  1490. $params = new Params([
  1491. 'action' => 'ModifySmsTemplate',
  1492. 'version' => '2017-05-25',
  1493. 'protocol' => 'HTTPS',
  1494. 'pathname' => '/',
  1495. 'method' => 'POST',
  1496. 'authType' => 'AK',
  1497. 'style' => 'RPC',
  1498. 'reqBodyType' => 'formData',
  1499. 'bodyType' => 'json',
  1500. ]);
  1501. return ModifySmsTemplateResponse::fromMap($this->callApi($params, $req, $runtime));
  1502. }
  1503. /**
  1504. * @summary Modifies the information of an unapproved message template and submits it for review again.
  1505. * *
  1506. * @description After you apply for a message template, if the template fails to pass the review, you can call this operation to modify the template and submit the template again. You can call this operation to modify only a template for a specific message type.
  1507. * The template content must comply with the [SMS template specifications](https://help.aliyun.com/document_detail/108253.html).
  1508. * For more information, see [Usage notes](https://help.aliyun.com/document_detail/55324.html).
  1509. * ### QPS limit
  1510. * You can call this operation up to 1,000 times per second per account. If the number of calls per second exceeds the limit, throttling is triggered. As a result, your business may be affected. We recommend that you take note of the limit when you call this operation.
  1511. * *
  1512. * @param ModifySmsTemplateRequest $request ModifySmsTemplateRequest
  1513. *
  1514. * @return ModifySmsTemplateResponse ModifySmsTemplateResponse
  1515. */
  1516. public function modifySmsTemplate($request)
  1517. {
  1518. $runtime = new RuntimeOptions([]);
  1519. return $this->modifySmsTemplateWithOptions($request, $runtime);
  1520. }
  1521. /**
  1522. * @summary Queries the review status of a message template.
  1523. * *
  1524. * @description ### QPS limit
  1525. * You can call this operation up to 300 times per second per account. If the number of the calls per second exceeds the limit, throttling is triggered. As a result, your business may be affected. We recommend that you take note of the limit when you call this operation.
  1526. * *
  1527. * @param QueryCardSmsTemplateRequest $request QueryCardSmsTemplateRequest
  1528. * @param RuntimeOptions $runtime runtime options for this request RuntimeOptions
  1529. *
  1530. * @return QueryCardSmsTemplateResponse QueryCardSmsTemplateResponse
  1531. */
  1532. public function queryCardSmsTemplateWithOptions($request, $runtime)
  1533. {
  1534. Utils::validateModel($request);
  1535. $query = [];
  1536. if (!Utils::isUnset($request->templateCode)) {
  1537. $query['TemplateCode'] = $request->templateCode;
  1538. }
  1539. $req = new OpenApiRequest([
  1540. 'query' => OpenApiUtilClient::query($query),
  1541. ]);
  1542. $params = new Params([
  1543. 'action' => 'QueryCardSmsTemplate',
  1544. 'version' => '2017-05-25',
  1545. 'protocol' => 'HTTPS',
  1546. 'pathname' => '/',
  1547. 'method' => 'POST',
  1548. 'authType' => 'AK',
  1549. 'style' => 'RPC',
  1550. 'reqBodyType' => 'formData',
  1551. 'bodyType' => 'json',
  1552. ]);
  1553. return QueryCardSmsTemplateResponse::fromMap($this->callApi($params, $req, $runtime));
  1554. }
  1555. /**
  1556. * @summary Queries the review status of a message template.
  1557. * *
  1558. * @description ### QPS limit
  1559. * You can call this operation up to 300 times per second per account. If the number of the calls per second exceeds the limit, throttling is triggered. As a result, your business may be affected. We recommend that you take note of the limit when you call this operation.
  1560. * *
  1561. * @param QueryCardSmsTemplateRequest $request QueryCardSmsTemplateRequest
  1562. *
  1563. * @return QueryCardSmsTemplateResponse QueryCardSmsTemplateResponse
  1564. */
  1565. public function queryCardSmsTemplate($request)
  1566. {
  1567. $runtime = new RuntimeOptions([]);
  1568. return $this->queryCardSmsTemplateWithOptions($request, $runtime);
  1569. }
  1570. /**
  1571. * @summary Queries sent card messages.
  1572. * *
  1573. * @description ### QPS limit
  1574. * You can call this operation up to 300 times per second per account. If the number of the calls per second exceeds the limit, throttling is triggered. As a result, your business may be affected. We recommend that you take note of the limit when you call this operation.
  1575. * *
  1576. * @param QueryCardSmsTemplateReportRequest $request QueryCardSmsTemplateReportRequest
  1577. * @param RuntimeOptions $runtime runtime options for this request RuntimeOptions
  1578. *
  1579. * @return QueryCardSmsTemplateReportResponse QueryCardSmsTemplateReportResponse
  1580. */
  1581. public function queryCardSmsTemplateReportWithOptions($request, $runtime)
  1582. {
  1583. Utils::validateModel($request);
  1584. $query = [];
  1585. if (!Utils::isUnset($request->endDate)) {
  1586. $query['EndDate'] = $request->endDate;
  1587. }
  1588. if (!Utils::isUnset($request->startDate)) {
  1589. $query['StartDate'] = $request->startDate;
  1590. }
  1591. if (!Utils::isUnset($request->templateCodes)) {
  1592. $query['TemplateCodes'] = $request->templateCodes;
  1593. }
  1594. $req = new OpenApiRequest([
  1595. 'query' => OpenApiUtilClient::query($query),
  1596. ]);
  1597. $params = new Params([
  1598. 'action' => 'QueryCardSmsTemplateReport',
  1599. 'version' => '2017-05-25',
  1600. 'protocol' => 'HTTPS',
  1601. 'pathname' => '/',
  1602. 'method' => 'POST',
  1603. 'authType' => 'AK',
  1604. 'style' => 'RPC',
  1605. 'reqBodyType' => 'formData',
  1606. 'bodyType' => 'json',
  1607. ]);
  1608. return QueryCardSmsTemplateReportResponse::fromMap($this->callApi($params, $req, $runtime));
  1609. }
  1610. /**
  1611. * @summary Queries sent card messages.
  1612. * *
  1613. * @description ### QPS limit
  1614. * You can call this operation up to 300 times per second per account. If the number of the calls per second exceeds the limit, throttling is triggered. As a result, your business may be affected. We recommend that you take note of the limit when you call this operation.
  1615. * *
  1616. * @param QueryCardSmsTemplateReportRequest $request QueryCardSmsTemplateReportRequest
  1617. *
  1618. * @return QueryCardSmsTemplateReportResponse QueryCardSmsTemplateReportResponse
  1619. */
  1620. public function queryCardSmsTemplateReport($request)
  1621. {
  1622. $runtime = new RuntimeOptions([]);
  1623. return $this->queryCardSmsTemplateReportWithOptions($request, $runtime);
  1624. }
  1625. /**
  1626. * @summary Checks whether a mobile phone number can receive card messages.
  1627. * *
  1628. * @param QueryMobilesCardSupportRequest $tmpReq QueryMobilesCardSupportRequest
  1629. * @param RuntimeOptions $runtime runtime options for this request RuntimeOptions
  1630. *
  1631. * @return QueryMobilesCardSupportResponse QueryMobilesCardSupportResponse
  1632. */
  1633. public function queryMobilesCardSupportWithOptions($tmpReq, $runtime)
  1634. {
  1635. Utils::validateModel($tmpReq);
  1636. $request = new QueryMobilesCardSupportShrinkRequest([]);
  1637. OpenApiUtilClient::convert($tmpReq, $request);
  1638. if (!Utils::isUnset($tmpReq->mobiles)) {
  1639. $request->mobilesShrink = OpenApiUtilClient::arrayToStringWithSpecifiedStyle($tmpReq->mobiles, 'Mobiles', 'json');
  1640. }
  1641. $query = [];
  1642. if (!Utils::isUnset($request->mobilesShrink)) {
  1643. $query['Mobiles'] = $request->mobilesShrink;
  1644. }
  1645. if (!Utils::isUnset($request->templateCode)) {
  1646. $query['TemplateCode'] = $request->templateCode;
  1647. }
  1648. $req = new OpenApiRequest([
  1649. 'query' => OpenApiUtilClient::query($query),
  1650. ]);
  1651. $params = new Params([
  1652. 'action' => 'QueryMobilesCardSupport',
  1653. 'version' => '2017-05-25',
  1654. 'protocol' => 'HTTPS',
  1655. 'pathname' => '/',
  1656. 'method' => 'POST',
  1657. 'authType' => 'AK',
  1658. 'style' => 'RPC',
  1659. 'reqBodyType' => 'formData',
  1660. 'bodyType' => 'json',
  1661. ]);
  1662. return QueryMobilesCardSupportResponse::fromMap($this->callApi($params, $req, $runtime));
  1663. }
  1664. /**
  1665. * @summary Checks whether a mobile phone number can receive card messages.
  1666. * *
  1667. * @param QueryMobilesCardSupportRequest $request QueryMobilesCardSupportRequest
  1668. *
  1669. * @return QueryMobilesCardSupportResponse QueryMobilesCardSupportResponse
  1670. */
  1671. public function queryMobilesCardSupport($request)
  1672. {
  1673. $runtime = new RuntimeOptions([]);
  1674. return $this->queryMobilesCardSupportWithOptions($request, $runtime);
  1675. }
  1676. /**
  1677. * @summary 点击明细查询
  1678. * *
  1679. * @param QueryPageSmartShortUrlLogRequest $request QueryPageSmartShortUrlLogRequest
  1680. * @param RuntimeOptions $runtime runtime options for this request RuntimeOptions
  1681. *
  1682. * @return QueryPageSmartShortUrlLogResponse QueryPageSmartShortUrlLogResponse
  1683. */
  1684. public function queryPageSmartShortUrlLogWithOptions($request, $runtime)
  1685. {
  1686. Utils::validateModel($request);
  1687. $query = [];
  1688. if (!Utils::isUnset($request->createDateEnd)) {
  1689. $query['CreateDateEnd'] = $request->createDateEnd;
  1690. }
  1691. if (!Utils::isUnset($request->createDateStart)) {
  1692. $query['CreateDateStart'] = $request->createDateStart;
  1693. }
  1694. if (!Utils::isUnset($request->ownerId)) {
  1695. $query['OwnerId'] = $request->ownerId;
  1696. }
  1697. if (!Utils::isUnset($request->pageNo)) {
  1698. $query['PageNo'] = $request->pageNo;
  1699. }
  1700. if (!Utils::isUnset($request->pageSize)) {
  1701. $query['PageSize'] = $request->pageSize;
  1702. }
  1703. if (!Utils::isUnset($request->phoneNumber)) {
  1704. $query['PhoneNumber'] = $request->phoneNumber;
  1705. }
  1706. if (!Utils::isUnset($request->resourceOwnerAccount)) {
  1707. $query['ResourceOwnerAccount'] = $request->resourceOwnerAccount;
  1708. }
  1709. if (!Utils::isUnset($request->resourceOwnerId)) {
  1710. $query['ResourceOwnerId'] = $request->resourceOwnerId;
  1711. }
  1712. if (!Utils::isUnset($request->shortUrl)) {
  1713. $query['ShortUrl'] = $request->shortUrl;
  1714. }
  1715. $req = new OpenApiRequest([
  1716. 'query' => OpenApiUtilClient::query($query),
  1717. ]);
  1718. $params = new Params([
  1719. 'action' => 'QueryPageSmartShortUrlLog',
  1720. 'version' => '2017-05-25',
  1721. 'protocol' => 'HTTPS',
  1722. 'pathname' => '/',
  1723. 'method' => 'POST',
  1724. 'authType' => 'AK',
  1725. 'style' => 'RPC',
  1726. 'reqBodyType' => 'formData',
  1727. 'bodyType' => 'json',
  1728. ]);
  1729. return QueryPageSmartShortUrlLogResponse::fromMap($this->callApi($params, $req, $runtime));
  1730. }
  1731. /**
  1732. * @summary 点击明细查询
  1733. * *
  1734. * @param QueryPageSmartShortUrlLogRequest $request QueryPageSmartShortUrlLogRequest
  1735. *
  1736. * @return QueryPageSmartShortUrlLogResponse QueryPageSmartShortUrlLogResponse
  1737. */
  1738. public function queryPageSmartShortUrlLog($request)
  1739. {
  1740. $runtime = new RuntimeOptions([]);
  1741. return $this->queryPageSmartShortUrlLogWithOptions($request, $runtime);
  1742. }
  1743. /**
  1744. * @summary Queries the information about a message.
  1745. * *
  1746. * @param QuerySendDetailsRequest $request QuerySendDetailsRequest
  1747. * @param RuntimeOptions $runtime runtime options for this request RuntimeOptions
  1748. *
  1749. * @return QuerySendDetailsResponse QuerySendDetailsResponse
  1750. */
  1751. public function querySendDetailsWithOptions($request, $runtime)
  1752. {
  1753. Utils::validateModel($request);
  1754. $query = [];
  1755. if (!Utils::isUnset($request->bizId)) {
  1756. $query['BizId'] = $request->bizId;
  1757. }
  1758. if (!Utils::isUnset($request->currentPage)) {
  1759. $query['CurrentPage'] = $request->currentPage;
  1760. }
  1761. if (!Utils::isUnset($request->ownerId)) {
  1762. $query['OwnerId'] = $request->ownerId;
  1763. }
  1764. if (!Utils::isUnset($request->pageSize)) {
  1765. $query['PageSize'] = $request->pageSize;
  1766. }
  1767. if (!Utils::isUnset($request->phoneNumber)) {
  1768. $query['PhoneNumber'] = $request->phoneNumber;
  1769. }
  1770. if (!Utils::isUnset($request->resourceOwnerAccount)) {
  1771. $query['ResourceOwnerAccount'] = $request->resourceOwnerAccount;
  1772. }
  1773. if (!Utils::isUnset($request->resourceOwnerId)) {
  1774. $query['ResourceOwnerId'] = $request->resourceOwnerId;
  1775. }
  1776. if (!Utils::isUnset($request->sendDate)) {
  1777. $query['SendDate'] = $request->sendDate;
  1778. }
  1779. $req = new OpenApiRequest([
  1780. 'query' => OpenApiUtilClient::query($query),
  1781. ]);
  1782. $params = new Params([
  1783. 'action' => 'QuerySendDetails',
  1784. 'version' => '2017-05-25',
  1785. 'protocol' => 'HTTPS',
  1786. 'pathname' => '/',
  1787. 'method' => 'POST',
  1788. 'authType' => 'AK',
  1789. 'style' => 'RPC',
  1790. 'reqBodyType' => 'formData',
  1791. 'bodyType' => 'json',
  1792. ]);
  1793. return QuerySendDetailsResponse::fromMap($this->callApi($params, $req, $runtime));
  1794. }
  1795. /**
  1796. * @summary Queries the information about a message.
  1797. * *
  1798. * @param QuerySendDetailsRequest $request QuerySendDetailsRequest
  1799. *
  1800. * @return QuerySendDetailsResponse QuerySendDetailsResponse
  1801. */
  1802. public function querySendDetails($request)
  1803. {
  1804. $runtime = new RuntimeOptions([]);
  1805. return $this->querySendDetailsWithOptions($request, $runtime);
  1806. }
  1807. /**
  1808. * @summary Queries message delivery details.
  1809. * *
  1810. * @description You can call the operation to query message delivery details, including the number of delivered messages, the number of messages with delivery receipts, and the time that a message is sent. If a large number of messages are sent on the specified date, you can specify the number of items displayed on each page and the number of pages to view the details by page.
  1811. * ### QPS limits
  1812. * You can call this operation up to 20 times per second per account. If the number of the calls per second exceeds the limit, throttling is triggered. As a result, your business may be affected. We recommend that you take note of the limit when you call this operation.
  1813. * *
  1814. * @param QuerySendStatisticsRequest $request QuerySendStatisticsRequest
  1815. * @param RuntimeOptions $runtime runtime options for this request RuntimeOptions
  1816. *
  1817. * @return QuerySendStatisticsResponse QuerySendStatisticsResponse
  1818. */
  1819. public function querySendStatisticsWithOptions($request, $runtime)
  1820. {
  1821. Utils::validateModel($request);
  1822. $query = [];
  1823. if (!Utils::isUnset($request->endDate)) {
  1824. $query['EndDate'] = $request->endDate;
  1825. }
  1826. if (!Utils::isUnset($request->isGlobe)) {
  1827. $query['IsGlobe'] = $request->isGlobe;
  1828. }
  1829. if (!Utils::isUnset($request->ownerId)) {
  1830. $query['OwnerId'] = $request->ownerId;
  1831. }
  1832. if (!Utils::isUnset($request->pageIndex)) {
  1833. $query['PageIndex'] = $request->pageIndex;
  1834. }
  1835. if (!Utils::isUnset($request->pageSize)) {
  1836. $query['PageSize'] = $request->pageSize;
  1837. }
  1838. if (!Utils::isUnset($request->resourceOwnerAccount)) {
  1839. $query['ResourceOwnerAccount'] = $request->resourceOwnerAccount;
  1840. }
  1841. if (!Utils::isUnset($request->resourceOwnerId)) {
  1842. $query['ResourceOwnerId'] = $request->resourceOwnerId;
  1843. }
  1844. if (!Utils::isUnset($request->signName)) {
  1845. $query['SignName'] = $request->signName;
  1846. }
  1847. if (!Utils::isUnset($request->startDate)) {
  1848. $query['StartDate'] = $request->startDate;
  1849. }
  1850. if (!Utils::isUnset($request->templateType)) {
  1851. $query['TemplateType'] = $request->templateType;
  1852. }
  1853. $req = new OpenApiRequest([
  1854. 'query' => OpenApiUtilClient::query($query),
  1855. ]);
  1856. $params = new Params([
  1857. 'action' => 'QuerySendStatistics',
  1858. 'version' => '2017-05-25',
  1859. 'protocol' => 'HTTPS',
  1860. 'pathname' => '/',
  1861. 'method' => 'POST',
  1862. 'authType' => 'AK',
  1863. 'style' => 'RPC',
  1864. 'reqBodyType' => 'formData',
  1865. 'bodyType' => 'json',
  1866. ]);
  1867. return QuerySendStatisticsResponse::fromMap($this->callApi($params, $req, $runtime));
  1868. }
  1869. /**
  1870. * @summary Queries message delivery details.
  1871. * *
  1872. * @description You can call the operation to query message delivery details, including the number of delivered messages, the number of messages with delivery receipts, and the time that a message is sent. If a large number of messages are sent on the specified date, you can specify the number of items displayed on each page and the number of pages to view the details by page.
  1873. * ### QPS limits
  1874. * You can call this operation up to 20 times per second per account. If the number of the calls per second exceeds the limit, throttling is triggered. As a result, your business may be affected. We recommend that you take note of the limit when you call this operation.
  1875. * *
  1876. * @param QuerySendStatisticsRequest $request QuerySendStatisticsRequest
  1877. *
  1878. * @return QuerySendStatisticsResponse QuerySendStatisticsResponse
  1879. */
  1880. public function querySendStatistics($request)
  1881. {
  1882. $runtime = new RuntimeOptions([]);
  1883. return $this->querySendStatisticsWithOptions($request, $runtime);
  1884. }
  1885. /**
  1886. * @summary Queries the status of a short URL.
  1887. * *
  1888. * @description ### QPS limits
  1889. * You can call this operation up to 20 times per second per account. If the number of the calls per second exceeds the limit, throttling is triggered. As a result, your business may be affected. We recommend that you take note of the limit when you call this operation.
  1890. * *
  1891. * @param QueryShortUrlRequest $request QueryShortUrlRequest
  1892. * @param RuntimeOptions $runtime runtime options for this request RuntimeOptions
  1893. *
  1894. * @return QueryShortUrlResponse QueryShortUrlResponse
  1895. */
  1896. public function queryShortUrlWithOptions($request, $runtime)
  1897. {
  1898. Utils::validateModel($request);
  1899. $query = [];
  1900. if (!Utils::isUnset($request->ownerId)) {
  1901. $query['OwnerId'] = $request->ownerId;
  1902. }
  1903. if (!Utils::isUnset($request->resourceOwnerAccount)) {
  1904. $query['ResourceOwnerAccount'] = $request->resourceOwnerAccount;
  1905. }
  1906. if (!Utils::isUnset($request->resourceOwnerId)) {
  1907. $query['ResourceOwnerId'] = $request->resourceOwnerId;
  1908. }
  1909. $body = [];
  1910. if (!Utils::isUnset($request->shortUrl)) {
  1911. $body['ShortUrl'] = $request->shortUrl;
  1912. }
  1913. $req = new OpenApiRequest([
  1914. 'query' => OpenApiUtilClient::query($query),
  1915. 'body' => OpenApiUtilClient::parseToMap($body),
  1916. ]);
  1917. $params = new Params([
  1918. 'action' => 'QueryShortUrl',
  1919. 'version' => '2017-05-25',
  1920. 'protocol' => 'HTTPS',
  1921. 'pathname' => '/',
  1922. 'method' => 'POST',
  1923. 'authType' => 'AK',
  1924. 'style' => 'RPC',
  1925. 'reqBodyType' => 'formData',
  1926. 'bodyType' => 'json',
  1927. ]);
  1928. return QueryShortUrlResponse::fromMap($this->callApi($params, $req, $runtime));
  1929. }
  1930. /**
  1931. * @summary Queries the status of a short URL.
  1932. * *
  1933. * @description ### QPS limits
  1934. * You can call this operation up to 20 times per second per account. If the number of the calls per second exceeds the limit, throttling is triggered. As a result, your business may be affected. We recommend that you take note of the limit when you call this operation.
  1935. * *
  1936. * @param QueryShortUrlRequest $request QueryShortUrlRequest
  1937. *
  1938. * @return QueryShortUrlResponse QueryShortUrlResponse
  1939. */
  1940. public function queryShortUrl($request)
  1941. {
  1942. $runtime = new RuntimeOptions([]);
  1943. return $this->queryShortUrlWithOptions($request, $runtime);
  1944. }
  1945. /**
  1946. * @summary Queries the status of a signature.
  1947. * *
  1948. * @description After you apply for an SMS signature, you can query its status by using the [Alibaba Cloud SMS console](https://dysms.console.aliyun.com/dysms.htm) or calling the operation. If the signature is rejected, you can modify the signature based on the reason why it is rejected.
  1949. * ### QPS limits
  1950. * You can call this API operation up to 500 times per second per account. If the number of the calls per second exceeds the limit, throttling is triggered. As a result, your business may be affected. We recommend that you take note of the limit when you call this operation.
  1951. * *
  1952. * @param QuerySmsSignRequest $request QuerySmsSignRequest
  1953. * @param RuntimeOptions $runtime runtime options for this request RuntimeOptions
  1954. *
  1955. * @return QuerySmsSignResponse QuerySmsSignResponse
  1956. */
  1957. public function querySmsSignWithOptions($request, $runtime)
  1958. {
  1959. Utils::validateModel($request);
  1960. $query = [];
  1961. if (!Utils::isUnset($request->ownerId)) {
  1962. $query['OwnerId'] = $request->ownerId;
  1963. }
  1964. if (!Utils::isUnset($request->resourceOwnerAccount)) {
  1965. $query['ResourceOwnerAccount'] = $request->resourceOwnerAccount;
  1966. }
  1967. if (!Utils::isUnset($request->resourceOwnerId)) {
  1968. $query['ResourceOwnerId'] = $request->resourceOwnerId;
  1969. }
  1970. if (!Utils::isUnset($request->signName)) {
  1971. $query['SignName'] = $request->signName;
  1972. }
  1973. $req = new OpenApiRequest([
  1974. 'query' => OpenApiUtilClient::query($query),
  1975. ]);
  1976. $params = new Params([
  1977. 'action' => 'QuerySmsSign',
  1978. 'version' => '2017-05-25',
  1979. 'protocol' => 'HTTPS',
  1980. 'pathname' => '/',
  1981. 'method' => 'POST',
  1982. 'authType' => 'AK',
  1983. 'style' => 'RPC',
  1984. 'reqBodyType' => 'formData',
  1985. 'bodyType' => 'json',
  1986. ]);
  1987. return QuerySmsSignResponse::fromMap($this->callApi($params, $req, $runtime));
  1988. }
  1989. /**
  1990. * @summary Queries the status of a signature.
  1991. * *
  1992. * @description After you apply for an SMS signature, you can query its status by using the [Alibaba Cloud SMS console](https://dysms.console.aliyun.com/dysms.htm) or calling the operation. If the signature is rejected, you can modify the signature based on the reason why it is rejected.
  1993. * ### QPS limits
  1994. * You can call this API operation up to 500 times per second per account. If the number of the calls per second exceeds the limit, throttling is triggered. As a result, your business may be affected. We recommend that you take note of the limit when you call this operation.
  1995. * *
  1996. * @param QuerySmsSignRequest $request QuerySmsSignRequest
  1997. *
  1998. * @return QuerySmsSignResponse QuerySmsSignResponse
  1999. */
  2000. public function querySmsSign($request)
  2001. {
  2002. $runtime = new RuntimeOptions([]);
  2003. return $this->querySmsSignWithOptions($request, $runtime);
  2004. }
  2005. /**
  2006. * @summary Queries message signatures by page.
  2007. * *
  2008. * @description You can call this operation to query the details of message signatures, including the name, creation time, and approval status of each signature. If a message template is rejected, the reason is returned. Modify the message signature based on the reason.
  2009. * ### QPS limit
  2010. * You can call this operation up to 10 times per second per account. If the number of calls per second exceeds the limit, throttling is triggered. As a result, your business may be affected. We recommend that you take note of the limit when you call this operation.
  2011. * *
  2012. * @param QuerySmsSignListRequest $request QuerySmsSignListRequest
  2013. * @param RuntimeOptions $runtime runtime options for this request RuntimeOptions
  2014. *
  2015. * @return QuerySmsSignListResponse QuerySmsSignListResponse
  2016. */
  2017. public function querySmsSignListWithOptions($request, $runtime)
  2018. {
  2019. Utils::validateModel($request);
  2020. $query = [];
  2021. if (!Utils::isUnset($request->ownerId)) {
  2022. $query['OwnerId'] = $request->ownerId;
  2023. }
  2024. if (!Utils::isUnset($request->pageIndex)) {
  2025. $query['PageIndex'] = $request->pageIndex;
  2026. }
  2027. if (!Utils::isUnset($request->pageSize)) {
  2028. $query['PageSize'] = $request->pageSize;
  2029. }
  2030. if (!Utils::isUnset($request->resourceOwnerAccount)) {
  2031. $query['ResourceOwnerAccount'] = $request->resourceOwnerAccount;
  2032. }
  2033. if (!Utils::isUnset($request->resourceOwnerId)) {
  2034. $query['ResourceOwnerId'] = $request->resourceOwnerId;
  2035. }
  2036. $req = new OpenApiRequest([
  2037. 'query' => OpenApiUtilClient::query($query),
  2038. ]);
  2039. $params = new Params([
  2040. 'action' => 'QuerySmsSignList',
  2041. 'version' => '2017-05-25',
  2042. 'protocol' => 'HTTPS',
  2043. 'pathname' => '/',
  2044. 'method' => 'POST',
  2045. 'authType' => 'AK',
  2046. 'style' => 'RPC',
  2047. 'reqBodyType' => 'formData',
  2048. 'bodyType' => 'json',
  2049. ]);
  2050. return QuerySmsSignListResponse::fromMap($this->callApi($params, $req, $runtime));
  2051. }
  2052. /**
  2053. * @summary Queries message signatures by page.
  2054. * *
  2055. * @description You can call this operation to query the details of message signatures, including the name, creation time, and approval status of each signature. If a message template is rejected, the reason is returned. Modify the message signature based on the reason.
  2056. * ### QPS limit
  2057. * You can call this operation up to 10 times per second per account. If the number of calls per second exceeds the limit, throttling is triggered. As a result, your business may be affected. We recommend that you take note of the limit when you call this operation.
  2058. * *
  2059. * @param QuerySmsSignListRequest $request QuerySmsSignListRequest
  2060. *
  2061. * @return QuerySmsSignListResponse QuerySmsSignListResponse
  2062. */
  2063. public function querySmsSignList($request)
  2064. {
  2065. $runtime = new RuntimeOptions([]);
  2066. return $this->querySmsSignListWithOptions($request, $runtime);
  2067. }
  2068. /**
  2069. * @summary Queries the approval status of a message template.
  2070. * *
  2071. * @description After you create a message template, you can call this operation to query the approval status of the template. If a message template is rejected, the reason is returned. Modify the message template based on the reason.
  2072. * ### QPS limit
  2073. * You can call this operation up to 5,000 times per second per account. If the number of calls per second exceeds the limit, throttling is triggered. As a result, your business may be affected. We recommend that you take note of the limit when you call this operation.
  2074. * *
  2075. * @param QuerySmsTemplateRequest $request QuerySmsTemplateRequest
  2076. * @param RuntimeOptions $runtime runtime options for this request RuntimeOptions
  2077. *
  2078. * @return QuerySmsTemplateResponse QuerySmsTemplateResponse
  2079. */
  2080. public function querySmsTemplateWithOptions($request, $runtime)
  2081. {
  2082. Utils::validateModel($request);
  2083. $query = [];
  2084. if (!Utils::isUnset($request->ownerId)) {
  2085. $query['OwnerId'] = $request->ownerId;
  2086. }
  2087. if (!Utils::isUnset($request->resourceOwnerAccount)) {
  2088. $query['ResourceOwnerAccount'] = $request->resourceOwnerAccount;
  2089. }
  2090. if (!Utils::isUnset($request->resourceOwnerId)) {
  2091. $query['ResourceOwnerId'] = $request->resourceOwnerId;
  2092. }
  2093. if (!Utils::isUnset($request->templateCode)) {
  2094. $query['TemplateCode'] = $request->templateCode;
  2095. }
  2096. $req = new OpenApiRequest([
  2097. 'query' => OpenApiUtilClient::query($query),
  2098. ]);
  2099. $params = new Params([
  2100. 'action' => 'QuerySmsTemplate',
  2101. 'version' => '2017-05-25',
  2102. 'protocol' => 'HTTPS',
  2103. 'pathname' => '/',
  2104. 'method' => 'POST',
  2105. 'authType' => 'AK',
  2106. 'style' => 'RPC',
  2107. 'reqBodyType' => 'formData',
  2108. 'bodyType' => 'json',
  2109. ]);
  2110. return QuerySmsTemplateResponse::fromMap($this->callApi($params, $req, $runtime));
  2111. }
  2112. /**
  2113. * @summary Queries the approval status of a message template.
  2114. * *
  2115. * @description After you create a message template, you can call this operation to query the approval status of the template. If a message template is rejected, the reason is returned. Modify the message template based on the reason.
  2116. * ### QPS limit
  2117. * You can call this operation up to 5,000 times per second per account. If the number of calls per second exceeds the limit, throttling is triggered. As a result, your business may be affected. We recommend that you take note of the limit when you call this operation.
  2118. * *
  2119. * @param QuerySmsTemplateRequest $request QuerySmsTemplateRequest
  2120. *
  2121. * @return QuerySmsTemplateResponse QuerySmsTemplateResponse
  2122. */
  2123. public function querySmsTemplate($request)
  2124. {
  2125. $runtime = new RuntimeOptions([]);
  2126. return $this->querySmsTemplateWithOptions($request, $runtime);
  2127. }
  2128. /**
  2129. * @summary Queries message templates.
  2130. * *
  2131. * @description You can call this operation to query the details of message templates, including the name, creation time, and approval status of each template. If a message template is rejected, the reason is returned. Modify the message template based on the reason.
  2132. * ### QPS limit
  2133. * You can call this operation up to 10 times per second per account. If the number of calls per second exceeds the limit, throttling is triggered. As a result, your business may be affected. We recommend that you take note of the limit when you call this operation.
  2134. * *
  2135. * @param QuerySmsTemplateListRequest $request QuerySmsTemplateListRequest
  2136. * @param RuntimeOptions $runtime runtime options for this request RuntimeOptions
  2137. *
  2138. * @return QuerySmsTemplateListResponse QuerySmsTemplateListResponse
  2139. */
  2140. public function querySmsTemplateListWithOptions($request, $runtime)
  2141. {
  2142. Utils::validateModel($request);
  2143. $query = [];
  2144. if (!Utils::isUnset($request->ownerId)) {
  2145. $query['OwnerId'] = $request->ownerId;
  2146. }
  2147. if (!Utils::isUnset($request->pageIndex)) {
  2148. $query['PageIndex'] = $request->pageIndex;
  2149. }
  2150. if (!Utils::isUnset($request->pageSize)) {
  2151. $query['PageSize'] = $request->pageSize;
  2152. }
  2153. if (!Utils::isUnset($request->resourceOwnerAccount)) {
  2154. $query['ResourceOwnerAccount'] = $request->resourceOwnerAccount;
  2155. }
  2156. if (!Utils::isUnset($request->resourceOwnerId)) {
  2157. $query['ResourceOwnerId'] = $request->resourceOwnerId;
  2158. }
  2159. $req = new OpenApiRequest([
  2160. 'query' => OpenApiUtilClient::query($query),
  2161. ]);
  2162. $params = new Params([
  2163. 'action' => 'QuerySmsTemplateList',
  2164. 'version' => '2017-05-25',
  2165. 'protocol' => 'HTTPS',
  2166. 'pathname' => '/',
  2167. 'method' => 'POST',
  2168. 'authType' => 'AK',
  2169. 'style' => 'RPC',
  2170. 'reqBodyType' => 'formData',
  2171. 'bodyType' => 'json',
  2172. ]);
  2173. return QuerySmsTemplateListResponse::fromMap($this->callApi($params, $req, $runtime));
  2174. }
  2175. /**
  2176. * @summary Queries message templates.
  2177. * *
  2178. * @description You can call this operation to query the details of message templates, including the name, creation time, and approval status of each template. If a message template is rejected, the reason is returned. Modify the message template based on the reason.
  2179. * ### QPS limit
  2180. * You can call this operation up to 10 times per second per account. If the number of calls per second exceeds the limit, throttling is triggered. As a result, your business may be affected. We recommend that you take note of the limit when you call this operation.
  2181. * *
  2182. * @param QuerySmsTemplateListRequest $request QuerySmsTemplateListRequest
  2183. *
  2184. * @return QuerySmsTemplateListResponse QuerySmsTemplateListResponse
  2185. */
  2186. public function querySmsTemplateList($request)
  2187. {
  2188. $runtime = new RuntimeOptions([]);
  2189. return $this->querySmsTemplateListWithOptions($request, $runtime);
  2190. }
  2191. /**
  2192. * @summary Sends multiple card messages at a time.
  2193. * *
  2194. * @description You can call the operation to send multiple card messages to a maximum of mobile phone numbers at a time. Different signatures and rollback settings can be specified for the mobile phone numbers.
  2195. * ### QPS limit
  2196. * You can call this operation up to 1,000 times per second per account. If the number of the calls per second exceeds the limit, throttling is triggered. As a result, your business may be affected. We recommend that you take note of the limit when you call this operation.
  2197. * *
  2198. * @param SendBatchCardSmsRequest $request SendBatchCardSmsRequest
  2199. * @param RuntimeOptions $runtime runtime options for this request RuntimeOptions
  2200. *
  2201. * @return SendBatchCardSmsResponse SendBatchCardSmsResponse
  2202. */
  2203. public function sendBatchCardSmsWithOptions($request, $runtime)
  2204. {
  2205. Utils::validateModel($request);
  2206. $query = [];
  2207. if (!Utils::isUnset($request->cardTemplateCode)) {
  2208. $query['CardTemplateCode'] = $request->cardTemplateCode;
  2209. }
  2210. if (!Utils::isUnset($request->cardTemplateParamJson)) {
  2211. $query['CardTemplateParamJson'] = $request->cardTemplateParamJson;
  2212. }
  2213. if (!Utils::isUnset($request->digitalTemplateCode)) {
  2214. $query['DigitalTemplateCode'] = $request->digitalTemplateCode;
  2215. }
  2216. if (!Utils::isUnset($request->digitalTemplateParamJson)) {
  2217. $query['DigitalTemplateParamJson'] = $request->digitalTemplateParamJson;
  2218. }
  2219. if (!Utils::isUnset($request->fallbackType)) {
  2220. $query['FallbackType'] = $request->fallbackType;
  2221. }
  2222. if (!Utils::isUnset($request->outId)) {
  2223. $query['OutId'] = $request->outId;
  2224. }
  2225. if (!Utils::isUnset($request->phoneNumberJson)) {
  2226. $query['PhoneNumberJson'] = $request->phoneNumberJson;
  2227. }
  2228. if (!Utils::isUnset($request->signNameJson)) {
  2229. $query['SignNameJson'] = $request->signNameJson;
  2230. }
  2231. if (!Utils::isUnset($request->smsTemplateCode)) {
  2232. $query['SmsTemplateCode'] = $request->smsTemplateCode;
  2233. }
  2234. if (!Utils::isUnset($request->smsTemplateParamJson)) {
  2235. $query['SmsTemplateParamJson'] = $request->smsTemplateParamJson;
  2236. }
  2237. if (!Utils::isUnset($request->smsUpExtendCodeJson)) {
  2238. $query['SmsUpExtendCodeJson'] = $request->smsUpExtendCodeJson;
  2239. }
  2240. if (!Utils::isUnset($request->templateCode)) {
  2241. $query['TemplateCode'] = $request->templateCode;
  2242. }
  2243. if (!Utils::isUnset($request->templateParamJson)) {
  2244. $query['TemplateParamJson'] = $request->templateParamJson;
  2245. }
  2246. $req = new OpenApiRequest([
  2247. 'query' => OpenApiUtilClient::query($query),
  2248. ]);
  2249. $params = new Params([
  2250. 'action' => 'SendBatchCardSms',
  2251. 'version' => '2017-05-25',
  2252. 'protocol' => 'HTTPS',
  2253. 'pathname' => '/',
  2254. 'method' => 'POST',
  2255. 'authType' => 'AK',
  2256. 'style' => 'RPC',
  2257. 'reqBodyType' => 'formData',
  2258. 'bodyType' => 'json',
  2259. ]);
  2260. return SendBatchCardSmsResponse::fromMap($this->callApi($params, $req, $runtime));
  2261. }
  2262. /**
  2263. * @summary Sends multiple card messages at a time.
  2264. * *
  2265. * @description You can call the operation to send multiple card messages to a maximum of mobile phone numbers at a time. Different signatures and rollback settings can be specified for the mobile phone numbers.
  2266. * ### QPS limit
  2267. * You can call this operation up to 1,000 times per second per account. If the number of the calls per second exceeds the limit, throttling is triggered. As a result, your business may be affected. We recommend that you take note of the limit when you call this operation.
  2268. * *
  2269. * @param SendBatchCardSmsRequest $request SendBatchCardSmsRequest
  2270. *
  2271. * @return SendBatchCardSmsResponse SendBatchCardSmsResponse
  2272. */
  2273. public function sendBatchCardSms($request)
  2274. {
  2275. $runtime = new RuntimeOptions([]);
  2276. return $this->sendBatchCardSmsWithOptions($request, $runtime);
  2277. }
  2278. /**
  2279. * @summary Uses a single message template and multiple signatures to send messages to multiple recipients.
  2280. * *
  2281. * @description You can call the operation to send messages to a maximum of 100 recipients at a time.
  2282. * *
  2283. * @param SendBatchSmsRequest $request SendBatchSmsRequest
  2284. * @param RuntimeOptions $runtime runtime options for this request RuntimeOptions
  2285. *
  2286. * @return SendBatchSmsResponse SendBatchSmsResponse
  2287. */
  2288. public function sendBatchSmsWithOptions($request, $runtime)
  2289. {
  2290. Utils::validateModel($request);
  2291. $query = [];
  2292. if (!Utils::isUnset($request->outId)) {
  2293. $query['OutId'] = $request->outId;
  2294. }
  2295. if (!Utils::isUnset($request->ownerId)) {
  2296. $query['OwnerId'] = $request->ownerId;
  2297. }
  2298. if (!Utils::isUnset($request->resourceOwnerAccount)) {
  2299. $query['ResourceOwnerAccount'] = $request->resourceOwnerAccount;
  2300. }
  2301. if (!Utils::isUnset($request->resourceOwnerId)) {
  2302. $query['ResourceOwnerId'] = $request->resourceOwnerId;
  2303. }
  2304. if (!Utils::isUnset($request->templateCode)) {
  2305. $query['TemplateCode'] = $request->templateCode;
  2306. }
  2307. $body = [];
  2308. if (!Utils::isUnset($request->phoneNumberJson)) {
  2309. $body['PhoneNumberJson'] = $request->phoneNumberJson;
  2310. }
  2311. if (!Utils::isUnset($request->signNameJson)) {
  2312. $body['SignNameJson'] = $request->signNameJson;
  2313. }
  2314. if (!Utils::isUnset($request->smsUpExtendCodeJson)) {
  2315. $body['SmsUpExtendCodeJson'] = $request->smsUpExtendCodeJson;
  2316. }
  2317. if (!Utils::isUnset($request->templateParamJson)) {
  2318. $body['TemplateParamJson'] = $request->templateParamJson;
  2319. }
  2320. $req = new OpenApiRequest([
  2321. 'query' => OpenApiUtilClient::query($query),
  2322. 'body' => OpenApiUtilClient::parseToMap($body),
  2323. ]);
  2324. $params = new Params([
  2325. 'action' => 'SendBatchSms',
  2326. 'version' => '2017-05-25',
  2327. 'protocol' => 'HTTPS',
  2328. 'pathname' => '/',
  2329. 'method' => 'POST',
  2330. 'authType' => 'AK',
  2331. 'style' => 'RPC',
  2332. 'reqBodyType' => 'formData',
  2333. 'bodyType' => 'json',
  2334. ]);
  2335. return SendBatchSmsResponse::fromMap($this->callApi($params, $req, $runtime));
  2336. }
  2337. /**
  2338. * @summary Uses a single message template and multiple signatures to send messages to multiple recipients.
  2339. * *
  2340. * @description You can call the operation to send messages to a maximum of 100 recipients at a time.
  2341. * *
  2342. * @param SendBatchSmsRequest $request SendBatchSmsRequest
  2343. *
  2344. * @return SendBatchSmsResponse SendBatchSmsResponse
  2345. */
  2346. public function sendBatchSms($request)
  2347. {
  2348. $runtime = new RuntimeOptions([]);
  2349. return $this->sendBatchSmsWithOptions($request, $runtime);
  2350. }
  2351. /**
  2352. * @summary Sends a card message.
  2353. * *
  2354. * @description * Make sure that the message template that you want to use has been approved. If the mobile phone number of a recipient does not support card messages, the SendCardSms operation allows the rollback feature to ensure successful delivery.
  2355. * * When you call the SendCardSms operation to send card messages, the operation checks whether the mobile phone numbers of the recipients support card messages. If the mobile phone numbers do not support card messages, you can specify whether to enable rollback. Otherwise, the card message cannot be delivered.
  2356. * ### QPS limit
  2357. * You can call this operation up to 1,000 times per second per account. If the number of the calls per second exceeds the limit, throttling is triggered. As a result, your business may be affected. We recommend that you take note of the limit when you call this operation.
  2358. * *
  2359. * @param SendCardSmsRequest $request SendCardSmsRequest
  2360. * @param RuntimeOptions $runtime runtime options for this request RuntimeOptions
  2361. *
  2362. * @return SendCardSmsResponse SendCardSmsResponse
  2363. */
  2364. public function sendCardSmsWithOptions($request, $runtime)
  2365. {
  2366. Utils::validateModel($request);
  2367. $query = [];
  2368. if (!Utils::isUnset($request->cardObjects)) {
  2369. $query['CardObjects'] = $request->cardObjects;
  2370. }
  2371. if (!Utils::isUnset($request->cardTemplateCode)) {
  2372. $query['CardTemplateCode'] = $request->cardTemplateCode;
  2373. }
  2374. if (!Utils::isUnset($request->digitalTemplateCode)) {
  2375. $query['DigitalTemplateCode'] = $request->digitalTemplateCode;
  2376. }
  2377. if (!Utils::isUnset($request->digitalTemplateParam)) {
  2378. $query['DigitalTemplateParam'] = $request->digitalTemplateParam;
  2379. }
  2380. if (!Utils::isUnset($request->fallbackType)) {
  2381. $query['FallbackType'] = $request->fallbackType;
  2382. }
  2383. if (!Utils::isUnset($request->outId)) {
  2384. $query['OutId'] = $request->outId;
  2385. }
  2386. if (!Utils::isUnset($request->signName)) {
  2387. $query['SignName'] = $request->signName;
  2388. }
  2389. if (!Utils::isUnset($request->smsTemplateCode)) {
  2390. $query['SmsTemplateCode'] = $request->smsTemplateCode;
  2391. }
  2392. if (!Utils::isUnset($request->smsTemplateParam)) {
  2393. $query['SmsTemplateParam'] = $request->smsTemplateParam;
  2394. }
  2395. if (!Utils::isUnset($request->smsUpExtendCode)) {
  2396. $query['SmsUpExtendCode'] = $request->smsUpExtendCode;
  2397. }
  2398. if (!Utils::isUnset($request->templateCode)) {
  2399. $query['TemplateCode'] = $request->templateCode;
  2400. }
  2401. if (!Utils::isUnset($request->templateParam)) {
  2402. $query['TemplateParam'] = $request->templateParam;
  2403. }
  2404. $req = new OpenApiRequest([
  2405. 'query' => OpenApiUtilClient::query($query),
  2406. ]);
  2407. $params = new Params([
  2408. 'action' => 'SendCardSms',
  2409. 'version' => '2017-05-25',
  2410. 'protocol' => 'HTTPS',
  2411. 'pathname' => '/',
  2412. 'method' => 'POST',
  2413. 'authType' => 'AK',
  2414. 'style' => 'RPC',
  2415. 'reqBodyType' => 'formData',
  2416. 'bodyType' => 'json',
  2417. ]);
  2418. return SendCardSmsResponse::fromMap($this->callApi($params, $req, $runtime));
  2419. }
  2420. /**
  2421. * @summary Sends a card message.
  2422. * *
  2423. * @description * Make sure that the message template that you want to use has been approved. If the mobile phone number of a recipient does not support card messages, the SendCardSms operation allows the rollback feature to ensure successful delivery.
  2424. * * When you call the SendCardSms operation to send card messages, the operation checks whether the mobile phone numbers of the recipients support card messages. If the mobile phone numbers do not support card messages, you can specify whether to enable rollback. Otherwise, the card message cannot be delivered.
  2425. * ### QPS limit
  2426. * You can call this operation up to 1,000 times per second per account. If the number of the calls per second exceeds the limit, throttling is triggered. As a result, your business may be affected. We recommend that you take note of the limit when you call this operation.
  2427. * *
  2428. * @param SendCardSmsRequest $request SendCardSmsRequest
  2429. *
  2430. * @return SendCardSmsResponse SendCardSmsResponse
  2431. */
  2432. public function sendCardSms($request)
  2433. {
  2434. $runtime = new RuntimeOptions([]);
  2435. return $this->sendCardSmsWithOptions($request, $runtime);
  2436. }
  2437. /**
  2438. * @summary Sends a message. Before you call this operation, submit a message signature and message template, and make sure that the signature and template are approved.
  2439. * *
  2440. * @description * This operation is mainly used to send a single message. In special scenarios, you can send multiple messages with the same content to a maximum of 1,000 mobile numbers. Note that group sending may be delayed.
  2441. * * To send messages with different signatures and template content to multiple mobile numbers in a single request, call the [SendBatchSms](https://help.aliyun.com/document_detail/102364.html) operation.
  2442. * * You are charged for using Alibaba Cloud Short Message Service (SMS) based on the amount of messages sent. For more information, see [Pricing](https://www.aliyun.com/price/product#/sms/detail).
  2443. * * If your verification code signature and general-purpose signature have the same name, the system uses the general-purpose signature to send messages by default.
  2444. * *
  2445. * @param SendSmsRequest $request SendSmsRequest
  2446. * @param RuntimeOptions $runtime runtime options for this request RuntimeOptions
  2447. *
  2448. * @return SendSmsResponse SendSmsResponse
  2449. */
  2450. public function sendSmsWithOptions($request, $runtime)
  2451. {
  2452. Utils::validateModel($request);
  2453. $query = [];
  2454. if (!Utils::isUnset($request->outId)) {
  2455. $query['OutId'] = $request->outId;
  2456. }
  2457. if (!Utils::isUnset($request->ownerId)) {
  2458. $query['OwnerId'] = $request->ownerId;
  2459. }
  2460. if (!Utils::isUnset($request->phoneNumbers)) {
  2461. $query['PhoneNumbers'] = $request->phoneNumbers;
  2462. }
  2463. if (!Utils::isUnset($request->resourceOwnerAccount)) {
  2464. $query['ResourceOwnerAccount'] = $request->resourceOwnerAccount;
  2465. }
  2466. if (!Utils::isUnset($request->resourceOwnerId)) {
  2467. $query['ResourceOwnerId'] = $request->resourceOwnerId;
  2468. }
  2469. if (!Utils::isUnset($request->signName)) {
  2470. $query['SignName'] = $request->signName;
  2471. }
  2472. if (!Utils::isUnset($request->smsUpExtendCode)) {
  2473. $query['SmsUpExtendCode'] = $request->smsUpExtendCode;
  2474. }
  2475. if (!Utils::isUnset($request->templateCode)) {
  2476. $query['TemplateCode'] = $request->templateCode;
  2477. }
  2478. if (!Utils::isUnset($request->templateParam)) {
  2479. $query['TemplateParam'] = $request->templateParam;
  2480. }
  2481. $req = new OpenApiRequest([
  2482. 'query' => OpenApiUtilClient::query($query),
  2483. ]);
  2484. $params = new Params([
  2485. 'action' => 'SendSms',
  2486. 'version' => '2017-05-25',
  2487. 'protocol' => 'HTTPS',
  2488. 'pathname' => '/',
  2489. 'method' => 'POST',
  2490. 'authType' => 'AK',
  2491. 'style' => 'RPC',
  2492. 'reqBodyType' => 'formData',
  2493. 'bodyType' => 'json',
  2494. ]);
  2495. return SendSmsResponse::fromMap($this->callApi($params, $req, $runtime));
  2496. }
  2497. /**
  2498. * @summary Sends a message. Before you call this operation, submit a message signature and message template, and make sure that the signature and template are approved.
  2499. * *
  2500. * @description * This operation is mainly used to send a single message. In special scenarios, you can send multiple messages with the same content to a maximum of 1,000 mobile numbers. Note that group sending may be delayed.
  2501. * * To send messages with different signatures and template content to multiple mobile numbers in a single request, call the [SendBatchSms](https://help.aliyun.com/document_detail/102364.html) operation.
  2502. * * You are charged for using Alibaba Cloud Short Message Service (SMS) based on the amount of messages sent. For more information, see [Pricing](https://www.aliyun.com/price/product#/sms/detail).
  2503. * * If your verification code signature and general-purpose signature have the same name, the system uses the general-purpose signature to send messages by default.
  2504. * *
  2505. * @param SendSmsRequest $request SendSmsRequest
  2506. *
  2507. * @return SendSmsResponse SendSmsResponse
  2508. */
  2509. public function sendSms($request)
  2510. {
  2511. $runtime = new RuntimeOptions([]);
  2512. return $this->sendSmsWithOptions($request, $runtime);
  2513. }
  2514. /**
  2515. * @summary Reports the status of an OTP message to Alibaba Cloud SMS.
  2516. * *
  2517. * @description Metrics:
  2518. * * Requested OTP messages
  2519. * * Verified OTP messages
  2520. * An OTP conversion rate is calculated based on the following formula: OTP conversion rate = Number of verified OTP messages/Number of requested OTP messages.
  2521. * > If you call the SmsConversion operation to query OTP conversion rates, your business may be affected. We recommend that you perform the following operations: 1. Call the SmsConversion operation in an asynchronous manner by configuring queues or events. 2. Manually degrade your services or use a circuit breaker to automatically degrade services.
  2522. * *
  2523. * @param SmsConversionIntlRequest $request SmsConversionIntlRequest
  2524. * @param RuntimeOptions $runtime runtime options for this request RuntimeOptions
  2525. *
  2526. * @return SmsConversionIntlResponse SmsConversionIntlResponse
  2527. */
  2528. public function smsConversionIntlWithOptions($request, $runtime)
  2529. {
  2530. Utils::validateModel($request);
  2531. $query = [];
  2532. if (!Utils::isUnset($request->conversionTime)) {
  2533. $query['ConversionTime'] = $request->conversionTime;
  2534. }
  2535. if (!Utils::isUnset($request->delivered)) {
  2536. $query['Delivered'] = $request->delivered;
  2537. }
  2538. if (!Utils::isUnset($request->messageId)) {
  2539. $query['MessageId'] = $request->messageId;
  2540. }
  2541. if (!Utils::isUnset($request->ownerId)) {
  2542. $query['OwnerId'] = $request->ownerId;
  2543. }
  2544. if (!Utils::isUnset($request->resourceOwnerAccount)) {
  2545. $query['ResourceOwnerAccount'] = $request->resourceOwnerAccount;
  2546. }
  2547. if (!Utils::isUnset($request->resourceOwnerId)) {
  2548. $query['ResourceOwnerId'] = $request->resourceOwnerId;
  2549. }
  2550. $req = new OpenApiRequest([
  2551. 'query' => OpenApiUtilClient::query($query),
  2552. ]);
  2553. $params = new Params([
  2554. 'action' => 'SmsConversionIntl',
  2555. 'version' => '2017-05-25',
  2556. 'protocol' => 'HTTPS',
  2557. 'pathname' => '/',
  2558. 'method' => 'POST',
  2559. 'authType' => 'AK',
  2560. 'style' => 'RPC',
  2561. 'reqBodyType' => 'formData',
  2562. 'bodyType' => 'json',
  2563. ]);
  2564. return SmsConversionIntlResponse::fromMap($this->callApi($params, $req, $runtime));
  2565. }
  2566. /**
  2567. * @summary Reports the status of an OTP message to Alibaba Cloud SMS.
  2568. * *
  2569. * @description Metrics:
  2570. * * Requested OTP messages
  2571. * * Verified OTP messages
  2572. * An OTP conversion rate is calculated based on the following formula: OTP conversion rate = Number of verified OTP messages/Number of requested OTP messages.
  2573. * > If you call the SmsConversion operation to query OTP conversion rates, your business may be affected. We recommend that you perform the following operations: 1. Call the SmsConversion operation in an asynchronous manner by configuring queues or events. 2. Manually degrade your services or use a circuit breaker to automatically degrade services.
  2574. * *
  2575. * @param SmsConversionIntlRequest $request SmsConversionIntlRequest
  2576. *
  2577. * @return SmsConversionIntlResponse SmsConversionIntlResponse
  2578. */
  2579. public function smsConversionIntl($request)
  2580. {
  2581. $runtime = new RuntimeOptions([]);
  2582. return $this->smsConversionIntlWithOptions($request, $runtime);
  2583. }
  2584. /**
  2585. * @summary Attaches tags to a message template.
  2586. * *
  2587. * @description ### QPS limit
  2588. * You can call this operation up to 50 times per second per account. If the number of the calls per second exceeds the limit, throttling is triggered. As a result, your business may be affected. We recommend that you take note of the limit when you call this operation.
  2589. * *
  2590. * @param TagResourcesRequest $request TagResourcesRequest
  2591. * @param RuntimeOptions $runtime runtime options for this request RuntimeOptions
  2592. *
  2593. * @return TagResourcesResponse TagResourcesResponse
  2594. */
  2595. public function tagResourcesWithOptions($request, $runtime)
  2596. {
  2597. Utils::validateModel($request);
  2598. $query = [];
  2599. if (!Utils::isUnset($request->ownerId)) {
  2600. $query['OwnerId'] = $request->ownerId;
  2601. }
  2602. if (!Utils::isUnset($request->prodCode)) {
  2603. $query['ProdCode'] = $request->prodCode;
  2604. }
  2605. if (!Utils::isUnset($request->regionId)) {
  2606. $query['RegionId'] = $request->regionId;
  2607. }
  2608. if (!Utils::isUnset($request->resourceId)) {
  2609. $query['ResourceId'] = $request->resourceId;
  2610. }
  2611. if (!Utils::isUnset($request->resourceOwnerAccount)) {
  2612. $query['ResourceOwnerAccount'] = $request->resourceOwnerAccount;
  2613. }
  2614. if (!Utils::isUnset($request->resourceOwnerId)) {
  2615. $query['ResourceOwnerId'] = $request->resourceOwnerId;
  2616. }
  2617. if (!Utils::isUnset($request->resourceType)) {
  2618. $query['ResourceType'] = $request->resourceType;
  2619. }
  2620. if (!Utils::isUnset($request->tag)) {
  2621. $query['Tag'] = $request->tag;
  2622. }
  2623. $req = new OpenApiRequest([
  2624. 'query' => OpenApiUtilClient::query($query),
  2625. ]);
  2626. $params = new Params([
  2627. 'action' => 'TagResources',
  2628. 'version' => '2017-05-25',
  2629. 'protocol' => 'HTTPS',
  2630. 'pathname' => '/',
  2631. 'method' => 'POST',
  2632. 'authType' => 'AK',
  2633. 'style' => 'RPC',
  2634. 'reqBodyType' => 'formData',
  2635. 'bodyType' => 'json',
  2636. ]);
  2637. return TagResourcesResponse::fromMap($this->callApi($params, $req, $runtime));
  2638. }
  2639. /**
  2640. * @summary Attaches tags to a message template.
  2641. * *
  2642. * @description ### QPS limit
  2643. * You can call this operation up to 50 times per second per account. If the number of the calls per second exceeds the limit, throttling is triggered. As a result, your business may be affected. We recommend that you take note of the limit when you call this operation.
  2644. * *
  2645. * @param TagResourcesRequest $request TagResourcesRequest
  2646. *
  2647. * @return TagResourcesResponse TagResourcesResponse
  2648. */
  2649. public function tagResources($request)
  2650. {
  2651. $runtime = new RuntimeOptions([]);
  2652. return $this->tagResourcesWithOptions($request, $runtime);
  2653. }
  2654. /**
  2655. * @param UntagResourcesRequest $request UntagResourcesRequest
  2656. * @param RuntimeOptions $runtime runtime options for this request RuntimeOptions
  2657. *
  2658. * @return UntagResourcesResponse UntagResourcesResponse
  2659. */
  2660. public function untagResourcesWithOptions($request, $runtime)
  2661. {
  2662. Utils::validateModel($request);
  2663. $query = [];
  2664. if (!Utils::isUnset($request->all)) {
  2665. $query['All'] = $request->all;
  2666. }
  2667. if (!Utils::isUnset($request->ownerId)) {
  2668. $query['OwnerId'] = $request->ownerId;
  2669. }
  2670. if (!Utils::isUnset($request->prodCode)) {
  2671. $query['ProdCode'] = $request->prodCode;
  2672. }
  2673. if (!Utils::isUnset($request->regionId)) {
  2674. $query['RegionId'] = $request->regionId;
  2675. }
  2676. if (!Utils::isUnset($request->resourceId)) {
  2677. $query['ResourceId'] = $request->resourceId;
  2678. }
  2679. if (!Utils::isUnset($request->resourceOwnerAccount)) {
  2680. $query['ResourceOwnerAccount'] = $request->resourceOwnerAccount;
  2681. }
  2682. if (!Utils::isUnset($request->resourceOwnerId)) {
  2683. $query['ResourceOwnerId'] = $request->resourceOwnerId;
  2684. }
  2685. if (!Utils::isUnset($request->resourceType)) {
  2686. $query['ResourceType'] = $request->resourceType;
  2687. }
  2688. if (!Utils::isUnset($request->tagKey)) {
  2689. $query['TagKey'] = $request->tagKey;
  2690. }
  2691. $req = new OpenApiRequest([
  2692. 'query' => OpenApiUtilClient::query($query),
  2693. ]);
  2694. $params = new Params([
  2695. 'action' => 'UntagResources',
  2696. 'version' => '2017-05-25',
  2697. 'protocol' => 'HTTPS',
  2698. 'pathname' => '/',
  2699. 'method' => 'POST',
  2700. 'authType' => 'AK',
  2701. 'style' => 'RPC',
  2702. 'reqBodyType' => 'formData',
  2703. 'bodyType' => 'json',
  2704. ]);
  2705. return UntagResourcesResponse::fromMap($this->callApi($params, $req, $runtime));
  2706. }
  2707. /**
  2708. * @param UntagResourcesRequest $request UntagResourcesRequest
  2709. *
  2710. * @return UntagResourcesResponse UntagResourcesResponse
  2711. */
  2712. public function untagResources($request)
  2713. {
  2714. $runtime = new RuntimeOptions([]);
  2715. return $this->untagResourcesWithOptions($request, $runtime);
  2716. }
  2717. /**
  2718. * @summary 修改文本短信签名
  2719. * *
  2720. * @param UpdateSmsSignRequest $tmpReq UpdateSmsSignRequest
  2721. * @param RuntimeOptions $runtime runtime options for this request RuntimeOptions
  2722. *
  2723. * @return UpdateSmsSignResponse UpdateSmsSignResponse
  2724. */
  2725. public function updateSmsSignWithOptions($tmpReq, $runtime)
  2726. {
  2727. Utils::validateModel($tmpReq);
  2728. $request = new UpdateSmsSignShrinkRequest([]);
  2729. OpenApiUtilClient::convert($tmpReq, $request);
  2730. if (!Utils::isUnset($tmpReq->moreData)) {
  2731. $request->moreDataShrink = OpenApiUtilClient::arrayToStringWithSpecifiedStyle($tmpReq->moreData, 'MoreData', 'json');
  2732. }
  2733. $query = [];
  2734. if (!Utils::isUnset($request->applySceneContent)) {
  2735. $query['ApplySceneContent'] = $request->applySceneContent;
  2736. }
  2737. if (!Utils::isUnset($request->moreDataShrink)) {
  2738. $query['MoreData'] = $request->moreDataShrink;
  2739. }
  2740. if (!Utils::isUnset($request->ownerId)) {
  2741. $query['OwnerId'] = $request->ownerId;
  2742. }
  2743. if (!Utils::isUnset($request->qualificationId)) {
  2744. $query['QualificationId'] = $request->qualificationId;
  2745. }
  2746. if (!Utils::isUnset($request->remark)) {
  2747. $query['Remark'] = $request->remark;
  2748. }
  2749. if (!Utils::isUnset($request->resourceOwnerAccount)) {
  2750. $query['ResourceOwnerAccount'] = $request->resourceOwnerAccount;
  2751. }
  2752. if (!Utils::isUnset($request->resourceOwnerId)) {
  2753. $query['ResourceOwnerId'] = $request->resourceOwnerId;
  2754. }
  2755. if (!Utils::isUnset($request->signName)) {
  2756. $query['SignName'] = $request->signName;
  2757. }
  2758. if (!Utils::isUnset($request->signSource)) {
  2759. $query['SignSource'] = $request->signSource;
  2760. }
  2761. if (!Utils::isUnset($request->signType)) {
  2762. $query['SignType'] = $request->signType;
  2763. }
  2764. if (!Utils::isUnset($request->thirdParty)) {
  2765. $query['ThirdParty'] = $request->thirdParty;
  2766. }
  2767. $req = new OpenApiRequest([
  2768. 'query' => OpenApiUtilClient::query($query),
  2769. ]);
  2770. $params = new Params([
  2771. 'action' => 'UpdateSmsSign',
  2772. 'version' => '2017-05-25',
  2773. 'protocol' => 'HTTPS',
  2774. 'pathname' => '/',
  2775. 'method' => 'POST',
  2776. 'authType' => 'AK',
  2777. 'style' => 'RPC',
  2778. 'reqBodyType' => 'formData',
  2779. 'bodyType' => 'json',
  2780. ]);
  2781. return UpdateSmsSignResponse::fromMap($this->callApi($params, $req, $runtime));
  2782. }
  2783. /**
  2784. * @summary 修改文本短信签名
  2785. * *
  2786. * @param UpdateSmsSignRequest $request UpdateSmsSignRequest
  2787. *
  2788. * @return UpdateSmsSignResponse UpdateSmsSignResponse
  2789. */
  2790. public function updateSmsSign($request)
  2791. {
  2792. $runtime = new RuntimeOptions([]);
  2793. return $this->updateSmsSignWithOptions($request, $runtime);
  2794. }
  2795. /**
  2796. * @summary 修改文本短信模板
  2797. * *
  2798. * @param UpdateSmsTemplateRequest $tmpReq UpdateSmsTemplateRequest
  2799. * @param RuntimeOptions $runtime runtime options for this request RuntimeOptions
  2800. *
  2801. * @return UpdateSmsTemplateResponse UpdateSmsTemplateResponse
  2802. */
  2803. public function updateSmsTemplateWithOptions($tmpReq, $runtime)
  2804. {
  2805. Utils::validateModel($tmpReq);
  2806. $request = new UpdateSmsTemplateShrinkRequest([]);
  2807. OpenApiUtilClient::convert($tmpReq, $request);
  2808. if (!Utils::isUnset($tmpReq->moreData)) {
  2809. $request->moreDataShrink = OpenApiUtilClient::arrayToStringWithSpecifiedStyle($tmpReq->moreData, 'MoreData', 'json');
  2810. }
  2811. $query = [];
  2812. if (!Utils::isUnset($request->applySceneContent)) {
  2813. $query['ApplySceneContent'] = $request->applySceneContent;
  2814. }
  2815. if (!Utils::isUnset($request->intlType)) {
  2816. $query['IntlType'] = $request->intlType;
  2817. }
  2818. if (!Utils::isUnset($request->moreDataShrink)) {
  2819. $query['MoreData'] = $request->moreDataShrink;
  2820. }
  2821. if (!Utils::isUnset($request->ownerId)) {
  2822. $query['OwnerId'] = $request->ownerId;
  2823. }
  2824. if (!Utils::isUnset($request->relatedSignName)) {
  2825. $query['RelatedSignName'] = $request->relatedSignName;
  2826. }
  2827. if (!Utils::isUnset($request->remark)) {
  2828. $query['Remark'] = $request->remark;
  2829. }
  2830. if (!Utils::isUnset($request->resourceOwnerAccount)) {
  2831. $query['ResourceOwnerAccount'] = $request->resourceOwnerAccount;
  2832. }
  2833. if (!Utils::isUnset($request->resourceOwnerId)) {
  2834. $query['ResourceOwnerId'] = $request->resourceOwnerId;
  2835. }
  2836. if (!Utils::isUnset($request->templateCode)) {
  2837. $query['TemplateCode'] = $request->templateCode;
  2838. }
  2839. if (!Utils::isUnset($request->templateContent)) {
  2840. $query['TemplateContent'] = $request->templateContent;
  2841. }
  2842. if (!Utils::isUnset($request->templateName)) {
  2843. $query['TemplateName'] = $request->templateName;
  2844. }
  2845. if (!Utils::isUnset($request->templateRule)) {
  2846. $query['TemplateRule'] = $request->templateRule;
  2847. }
  2848. if (!Utils::isUnset($request->templateType)) {
  2849. $query['TemplateType'] = $request->templateType;
  2850. }
  2851. $req = new OpenApiRequest([
  2852. 'query' => OpenApiUtilClient::query($query),
  2853. ]);
  2854. $params = new Params([
  2855. 'action' => 'UpdateSmsTemplate',
  2856. 'version' => '2017-05-25',
  2857. 'protocol' => 'HTTPS',
  2858. 'pathname' => '/',
  2859. 'method' => 'POST',
  2860. 'authType' => 'AK',
  2861. 'style' => 'RPC',
  2862. 'reqBodyType' => 'formData',
  2863. 'bodyType' => 'json',
  2864. ]);
  2865. return UpdateSmsTemplateResponse::fromMap($this->callApi($params, $req, $runtime));
  2866. }
  2867. /**
  2868. * @summary 修改文本短信模板
  2869. * *
  2870. * @param UpdateSmsTemplateRequest $request UpdateSmsTemplateRequest
  2871. *
  2872. * @return UpdateSmsTemplateResponse UpdateSmsTemplateResponse
  2873. */
  2874. public function updateSmsTemplate($request)
  2875. {
  2876. $runtime = new RuntimeOptions([]);
  2877. return $this->updateSmsTemplateWithOptions($request, $runtime);
  2878. }
  2879. }