[{"data":1,"prerenderedAt":852},["ShallowReactive",2],{"navigation":3,"\u002Fuser":43,"\u002Fuser-surround":847},[4,8,13,18,23,28,33,38],{"title":5,"path":6,"stem":7},"Getting started","\u002F","index",{"title":9,"path":10,"stem":11,"order":12},"Numbers","\u002Fnumbers","numbers",1,{"title":14,"path":15,"stem":16,"order":17},"Rent","\u002Frent","rent",2,{"title":19,"path":20,"stem":21,"order":22},"User","\u002Fuser","user",3,{"title":24,"path":25,"stem":26,"order":27},"Free numbers","\u002Ffree","free",4,{"title":29,"path":30,"stem":31,"order":32},"Webhooks","\u002Fwebhooks","webhooks",5,{"title":34,"path":35,"stem":36,"order":37},"Testing","\u002Ftesting","testing",6,{"title":39,"path":40,"stem":41,"order":42},"Changelog","\u002Fchangelog","changelog",7,{"id":44,"title":19,"body":45,"description":841,"extension":842,"meta":843,"navigation":844,"path":20,"seo":845,"stem":21,"__hash__":846},"docs\u002Fuser.md",{"type":46,"value":47,"toc":833},"minimark",[48,52,56,90,116,179,200,203,206,225,294,357,361,364,396,473,550,554,561,582,601,613,617,620,636,649,653,656,692,748,829],[49,50,51],"h2",{"id":51},"balance",[53,54,55],"p",{},"Balance in USD.",[57,58,63],"pre",{"className":59,"code":60,"language":61,"meta":62,"style":62},"language-kotlin shiki shiki-themes material-theme-lighter material-theme material-theme-palenight","suspend fun balance(): Balance\n","kotlin","",[64,65,66],"code",{"__ignoreMap":62},[67,68,70,74,78,82,86],"span",{"class":69,"line":12},"line",[67,71,73],{"class":72},"spNyl","suspend",[67,75,77],{"class":76},"sMK4o"," fun",[67,79,81],{"class":80},"s2Zo4"," balance",[67,83,85],{"class":84},"sTEyZ","(): ",[67,87,89],{"class":88},"sBMFI","Balance\n",[53,91,92,95,96,99,100,103,104,107,108,111,112,115],{},[64,93,94],{},"Balance",": ",[64,97,98],{},"balance()"," includes the sum frozen by numbers and unconfirmed rents in progress (",[64,101,102],{},"zbalance()",", which may be negative): available = ",[64,105,106],{},"balance() − max(zbalance(), 0)",". ",[64,109,110],{},"income()"," is the partner income (",[64,113,114],{},"null"," when not sent). The server caches the answer for 60 s.",[57,117,119],{"className":59,"code":118,"language":61,"meta":62,"style":62},"val b = client.user.balance()\nval available = b.balance() - maxOf(b.zbalance(), 0.0)\n",[64,120,121,140],{"__ignoreMap":62},[67,122,123,126,129,132,135,137],{"class":69,"line":12},[67,124,125],{"class":76},"val",[67,127,128],{"class":84}," b ",[67,130,131],{"class":76},"=",[67,133,134],{"class":84}," client.user.",[67,136,51],{"class":80},[67,138,139],{"class":84},"()\n",[67,141,142,144,147,149,152,154,157,160,163,166,169,172,176],{"class":69,"line":17},[67,143,125],{"class":76},[67,145,146],{"class":84}," available ",[67,148,131],{"class":76},[67,150,151],{"class":84}," b.",[67,153,51],{"class":80},[67,155,156],{"class":84},"() ",[67,158,159],{"class":76},"-",[67,161,162],{"class":80}," maxOf",[67,164,165],{"class":84},"(b.",[67,167,168],{"class":80},"zbalance",[67,170,171],{"class":84},"(), ",[67,173,175],{"class":174},"sbssI","0.0",[67,177,178],{"class":84},")\n",[53,180,181,182,185,186,189,190,189,193,189,196,199],{},"Errors: ",[64,183,184],{},"ApiException"," ",[64,187,188],{},"ERROR_WRONG_KEY",", ",[64,191,192],{},"ACCOUNT_BLOCKED",[64,194,195],{},"API_ACCESS_DISABLED",[64,197,198],{},"API_ACCESS_IP",".",[49,201,202],{"id":202},"profile",[53,204,205],{},"The account profile.",[57,207,209],{"className":59,"code":208,"language":61,"meta":62,"style":62},"suspend fun profile(): Profile\n",[64,210,211],{"__ignoreMap":62},[67,212,213,215,217,220,222],{"class":69,"line":12},[67,214,73],{"class":72},[67,216,77],{"class":76},[67,218,219],{"class":80}," profile",[67,221,85],{"class":84},[67,223,224],{"class":88},"Profile\n",[53,226,227,95,230,189,233,189,236,189,239,189,242,189,245,189,248,189,251,254,255,258,259,189,262,254,265,189,268,271,272,258,275,254,278,189,281,283,284,254,287,290,291,293],{},[64,228,229],{},"Profile",[64,231,232],{},"id()",[64,234,235],{},"name()",[64,237,238],{},"username()",[64,240,241],{},"email()",[64,243,244],{},"locale()",[64,246,247],{},"currency()",[64,249,250],{},"numberCountry()",[64,252,253],{},"numberReject()"," (",[64,256,257],{},"List\u003CString>","), ",[64,260,261],{},"webhookUrl()",[64,263,264],{},"apiAccess()",[64,266,267],{},"true",[64,269,270],{},"false"," when API access is disabled in the profile, or a map of allowed IPs, as a Gson ",[64,273,274],{},"JsonElement",[64,276,277],{},"number()",[64,279,280],{},"Long",[64,282,114],{}," when no phone is linked), ",[64,285,286],{},"country()",[64,288,289],{},"String"," or ",[64,292,114],{},"), ….",[57,295,297],{"className":59,"code":296,"language":61,"meta":62,"style":62},"val p = client.user.profile()\nprintln(\"${p.email()} ${p.webhookUrl()}\")\n",[64,298,299,314],{"__ignoreMap":62},[67,300,301,303,306,308,310,312],{"class":69,"line":12},[67,302,125],{"class":76},[67,304,305],{"class":84}," p ",[67,307,131],{"class":76},[67,309,134],{"class":84},[67,311,202],{"class":80},[67,313,139],{"class":84},[67,315,316,319,322,326,329,332,335,338,341,344,346,349,351,353,355],{"class":69,"line":17},[67,317,318],{"class":80},"println",[67,320,321],{"class":84},"(",[67,323,325],{"class":324},"sfazB","\"",[67,327,328],{"class":76},"${",[67,330,331],{"class":84},"p.",[67,333,334],{"class":80},"email",[67,336,337],{"class":84},"()",[67,339,340],{"class":76},"}",[67,342,343],{"class":76}," ${",[67,345,331],{"class":84},[67,347,348],{"class":80},"webhookUrl",[67,350,337],{"class":84},[67,352,340],{"class":76},[67,354,325],{"class":324},[67,356,178],{"class":84},[49,358,360],{"id":359},"paymenthistory","paymentHistory",[53,362,363],{},"Top-up orders (paginated, newest first) and the available payment methods.",[57,365,367],{"className":59,"code":366,"language":61,"meta":62,"style":62},"suspend fun paymentHistory(page: Int = 1): PaymentHistory\n",[64,368,369],{"__ignoreMap":62},[67,370,371,373,375,378,381,384,387,390,393],{"class":69,"line":12},[67,372,73],{"class":72},[67,374,77],{"class":76},[67,376,377],{"class":80}," paymentHistory",[67,379,380],{"class":84},"(page: ",[67,382,383],{"class":88},"Int",[67,385,386],{"class":76}," =",[67,388,389],{"class":174}," 1",[67,391,392],{"class":84},"): ",[67,394,395],{"class":88},"PaymentHistory\n",[53,397,398,95,401,254,404,258,407,189,410,189,413,189,416,107,418,421,422,425,426,428,429,432,433,107,435,437,438,189,441,444,445,95,448,189,451,189,454,189,457,189,460,189,463,189,466,189,469,472],{},[64,399,400],{},"PaymentHistory",[64,402,403],{},"orders()",[64,405,406],{},"Paginator\u003CPaymentOrder>",[64,408,409],{},"paylist()",[64,411,412],{},"domains()",[64,414,415],{},"forms()",[64,417,247],{},[64,419,420],{},"PaymentOrder.sum()"," stays a decimal string (",[64,423,424],{},"\"89.00\"","); ",[64,427,247],{}," and ",[64,430,431],{},"formText()"," may be ",[64,434,114],{},[64,436,409],{}," maps a group id to its payment methods; when the ids are 0, 1, 2… the server sends a JSON array, whose items are keyed ",[64,439,440],{},"\"0\"",[64,442,443],{},"\"1\"",", ….\n",[64,446,447],{},"Paginator\u003CT>",[64,449,450],{},"data()",[64,452,453],{},"currentPage()",[64,455,456],{},"lastPage()",[64,458,459],{},"perPage()",[64,461,462],{},"total()",[64,464,465],{},"from()",[64,467,468],{},"to()",[64,470,471],{},"nextPageUrl()",", ….",[57,474,476],{"className":59,"code":475,"language":61,"meta":62,"style":62},"val orders = client.user.paymentHistory().orders()\nprintln(\"${orders.total()} orders, page ${orders.currentPage()}\u002F${orders.lastPage()}\")\n",[64,477,478,499],{"__ignoreMap":62},[67,479,480,482,485,487,489,491,494,497],{"class":69,"line":12},[67,481,125],{"class":76},[67,483,484],{"class":84}," orders ",[67,486,131],{"class":76},[67,488,134],{"class":84},[67,490,360],{"class":80},[67,492,493],{"class":84},"().",[67,495,496],{"class":80},"orders",[67,498,139],{"class":84},[67,500,501,503,505,507,509,512,515,517,519,522,524,526,529,531,533,535,537,539,542,544,546,548],{"class":69,"line":17},[67,502,318],{"class":80},[67,504,321],{"class":84},[67,506,325],{"class":324},[67,508,328],{"class":76},[67,510,511],{"class":84},"orders.",[67,513,514],{"class":80},"total",[67,516,337],{"class":84},[67,518,340],{"class":76},[67,520,521],{"class":324}," orders, page ",[67,523,328],{"class":76},[67,525,511],{"class":84},[67,527,528],{"class":80},"currentPage",[67,530,337],{"class":84},[67,532,340],{"class":76},[67,534,6],{"class":324},[67,536,328],{"class":76},[67,538,511],{"class":84},[67,540,541],{"class":80},"lastPage",[67,543,337],{"class":84},[67,545,340],{"class":76},[67,547,325],{"class":324},[67,549,178],{"class":84},[49,551,553],{"id":552},"setwebhookurl","setWebhookUrl",[53,555,556,557,560],{},"Set the URL that receives SMS webhooks (see ",[558,559,29],"a",{"href":30},").",[57,562,564],{"className":59,"code":563,"language":61,"meta":62,"style":62},"suspend fun setWebhookUrl(url: String)\n",[64,565,566],{"__ignoreMap":62},[67,567,568,570,572,575,578,580],{"class":69,"line":12},[67,569,73],{"class":72},[67,571,77],{"class":76},[67,573,574],{"class":80}," setWebhookUrl",[67,576,577],{"class":84},"(url: ",[67,579,289],{"class":88},[67,581,178],{"class":84},[57,583,585],{"className":59,"code":584,"language":61,"meta":62,"style":62},"client.user.setWebhookUrl(\"https:\u002F\u002Fexample.com\u002Fonlinesim-hook\")\n",[64,586,587],{"__ignoreMap":62},[67,588,589,592,594,596,599],{"class":69,"line":12},[67,590,591],{"class":84},"client.user.",[67,593,553],{"class":80},[67,595,321],{"class":84},[67,597,598],{"class":324},"\"https:\u002F\u002Fexample.com\u002Fonlinesim-hook\"",[67,600,178],{"class":84},[53,602,181,603,185,605,608,609,612],{},[64,604,184],{},[64,606,607],{},"VALIDATION_ERROR"," for an invalid URL; ",[64,610,611],{},"message"," holds the server's field messages.",[49,614,616],{"id":615},"clearwebhookurl","clearWebhookUrl",[53,618,619],{},"Remove the webhook URL, also from operations in progress.",[57,621,623],{"className":59,"code":622,"language":61,"meta":62,"style":62},"suspend fun clearWebhookUrl()\n",[64,624,625],{"__ignoreMap":62},[67,626,627,629,631,634],{"class":69,"line":12},[67,628,73],{"class":72},[67,630,77],{"class":76},[67,632,633],{"class":80}," clearWebhookUrl",[67,635,139],{"class":84},[57,637,639],{"className":59,"code":638,"language":61,"meta":62,"style":62},"client.user.clearWebhookUrl()\n",[64,640,641],{"__ignoreMap":62},[67,642,643,645,647],{"class":69,"line":12},[67,644,591],{"class":84},[67,646,616],{"class":80},[67,648,139],{"class":84},[49,650,652],{"id":651},"webhooklogs","webhookLogs",[53,654,655],{},"Webhook delivery log, newest first, 10 per page.",[57,657,659],{"className":59,"code":658,"language":61,"meta":62,"style":62},"suspend fun webhookLogs(page: Int = 1): Paginator\u003CWebhookLog>\n",[64,660,661],{"__ignoreMap":62},[67,662,663,665,667,670,672,674,676,678,680,683,686,689],{"class":69,"line":12},[67,664,73],{"class":72},[67,666,77],{"class":76},[67,668,669],{"class":80}," webhookLogs",[67,671,380],{"class":84},[67,673,383],{"class":88},[67,675,386],{"class":76},[67,677,389],{"class":174},[67,679,392],{"class":84},[67,681,682],{"class":88},"Paginator",[67,684,685],{"class":84},"\u003C",[67,687,688],{"class":88},"WebhookLog",[67,690,691],{"class":84},">\n",[53,693,694,95,696,189,698,189,701,189,703,189,706,189,709,189,712,189,715,189,718,721,722,724,725,290,728,189,731,724,733,189,736,290,739,189,742,744,745,560],{},[64,695,688],{},[64,697,232],{},[64,699,700],{},"userId()",[64,702,261],{},[64,704,705],{},"type()",[64,707,708],{},"params()",[64,710,711],{},"status()",[64,713,714],{},"error()",[64,716,717],{},"createdAt()",[64,719,720],{},"updatedAt()"," — ",[64,723,705],{}," is ",[64,726,727],{},"receiving_sms",[64,729,730],{},"rent_sms",[64,732,711],{},[64,734,735],{},"success",[64,737,738],{},"fail",[64,740,741],{},"pending",[64,743,708],{}," the payload that was sent (",[64,746,747],{},"WebhookPayload",[57,749,751],{"className":59,"code":750,"language":61,"meta":62,"style":62},"for (log in client.user.webhookLogs().data()) {\n    println(\"${log.createdAt()} ${log.status()} ${log.error()}\")\n}\n",[64,752,753,777,824],{"__ignoreMap":62},[67,754,755,759,762,765,767,769,771,774],{"class":69,"line":12},[67,756,758],{"class":757},"s7zQu","for",[67,760,761],{"class":84}," (log ",[67,763,764],{"class":76},"in",[67,766,134],{"class":84},[67,768,652],{"class":80},[67,770,493],{"class":84},[67,772,773],{"class":80},"data",[67,775,776],{"class":84},"()) {\n",[67,778,779,782,784,786,788,791,794,796,798,800,802,805,807,809,811,813,816,818,820,822],{"class":69,"line":17},[67,780,781],{"class":80},"    println",[67,783,321],{"class":84},[67,785,325],{"class":324},[67,787,328],{"class":76},[67,789,790],{"class":84},"log.",[67,792,793],{"class":80},"createdAt",[67,795,337],{"class":84},[67,797,340],{"class":76},[67,799,343],{"class":76},[67,801,790],{"class":84},[67,803,804],{"class":80},"status",[67,806,337],{"class":84},[67,808,340],{"class":76},[67,810,343],{"class":76},[67,812,790],{"class":84},[67,814,815],{"class":80},"error",[67,817,337],{"class":84},[67,819,340],{"class":76},[67,821,325],{"class":324},[67,823,178],{"class":84},[67,825,826],{"class":69,"line":22},[67,827,828],{"class":84},"}\n",[830,831,832],"style",{},"html pre.shiki code .spNyl, html code.shiki .spNyl{--shiki-light:#9C3EDA;--shiki-default:#C792EA;--shiki-dark:#C792EA}html pre.shiki code .sMK4o, html code.shiki .sMK4o{--shiki-light:#39ADB5;--shiki-default:#89DDFF;--shiki-dark:#89DDFF}html pre.shiki code .s2Zo4, html code.shiki .s2Zo4{--shiki-light:#6182B8;--shiki-default:#82AAFF;--shiki-dark:#82AAFF}html pre.shiki code .sTEyZ, html code.shiki .sTEyZ{--shiki-light:#90A4AE;--shiki-default:#EEFFFF;--shiki-dark:#BABED8}html pre.shiki code .sBMFI, html code.shiki .sBMFI{--shiki-light:#E2931D;--shiki-default:#FFCB6B;--shiki-dark:#FFCB6B}html .light .shiki span {color: var(--shiki-light);background: var(--shiki-light-bg);font-style: var(--shiki-light-font-style);font-weight: var(--shiki-light-font-weight);text-decoration: var(--shiki-light-text-decoration);}html.light .shiki span {color: var(--shiki-light);background: var(--shiki-light-bg);font-style: var(--shiki-light-font-style);font-weight: var(--shiki-light-font-weight);text-decoration: var(--shiki-light-text-decoration);}html .default .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}html.dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}html pre.shiki code .sbssI, html code.shiki .sbssI{--shiki-light:#F76D47;--shiki-default:#F78C6C;--shiki-dark:#F78C6C}html pre.shiki code .sfazB, html code.shiki .sfazB{--shiki-light:#91B859;--shiki-default:#C3E88D;--shiki-dark:#C3E88D}html pre.shiki code .s7zQu, html code.shiki .s7zQu{--shiki-light:#39ADB5;--shiki-light-font-style:italic;--shiki-default:#89DDFF;--shiki-default-font-style:italic;--shiki-dark:#89DDFF;--shiki-dark-font-style:italic}",{"title":62,"searchDepth":17,"depth":17,"links":834},[835,836,837,838,839,840],{"id":51,"depth":17,"text":51},{"id":202,"depth":17,"text":202},{"id":359,"depth":17,"text":360},{"id":552,"depth":17,"text":553},{"id":615,"depth":17,"text":616},{"id":651,"depth":17,"text":652},"Balance, profile, payments and the webhook URL — client.user.","md",{},{"order":22},{"title":19,"description":841},"BgQUHYoNdIMEDydrATdaF-_uP6S98tCtG14wqyLU_TY",[848,850],{"title":34,"path":35,"stem":36,"description":849,"order":37},"Test your integration offline with MockOnlineSim — no network, key or money.",{"title":29,"path":30,"stem":31,"description":851,"order":32},"Receive SMS as HTTP callbacks and parse them with parseWebhook.",1795165467553]